Hi,
I’m trying to update OH from 2.4.0 to 2.5.7 and the PowerShell script fails on the backup phase.
My platform information:
- Hardware: Intel Core i5 -2400 @3.1GHz
- Architecture: x64/4.00GB
- OS: Windows Server 2012 R2 Essential
- Java Runtime Environment: Java 8
- openHAB version: 2.4.0
Here is the log I got:
c:\openHAB2\runtime\bin>update.bat 2.5.7
#################################
# openHAB 2.x.x update script #
#################################
Checking whether a service exists
Checking the specified openHAB directory
Using C:\openHAB2\conf as conf folder
Using C:\openHAB2\userdata as userdata folder
Using C:\openHAB2\runtime as runtime folder
Using C:\openHAB2\addons as addons folder
The current version is 2.4.0
Changing location to C:\openHAB2
Creating temporary update directory C:\Users\OH_User\AppData\Local\Temp\openhab
Downloading the openHAB 2.5.7 distribution to C:\Users\OH_User\AppData\Local\Temp\openhab\openhab-2.5.7.zip
Downloaded 81539K of 81539K [100%]
Finished Download
Extracting the archive (C:\Users\OH_User\AppData\Local\Temp\openhab\openhab-2.5.7.zip) to C:\Users\OH_User\AppData\Local\Temp\openhab\update
#########################################################################################################################################
# New update.ps1 was found - executing it instead (found in C:\Users\OH_User\AppData\Local\Temp\openhab\update\runtime\bin\update.ps1) #
#########################################################################################################################################
#################################
# openHAB 2.x.x update script #
#################################
Checking whether a service exists
Checking the specified openHAB directory
Using C:\openHAB2\conf as conf folder
Using C:\openHAB2\userdata as userdata folder
Using C:\openHAB2\runtime as runtime folder
Using C:\openHAB2\addons as addons folder
The current version is 2.4.0
Changing location to C:\openHAB2
Upgrading to version 2.5.7
Making a backup of your distribution to C:\Users\OH_User\AppData\Local\Temp\openhab\backup-2.4.0
Creating backup directories in C:\Users\OH_User\AppData\Local\Temp\openhab\backup-2.4.0
Copying directory conf, userdata and runtime to C:\Users\OH_User\AppData\Local\Temp\openhab\backup-2.4.0\conf
#######################################################################################################
# Could not backup existing distribution to C:\Users\OH_User\AppData\Local\Temp\openhab\backup-2.4.0 #
#######################################################################################################
PrintAndReturn : Could not find a part of the path 'C:\Users\OH_User\AppData\Local\Temp\openhab\backup-2.4.0\userdata\kar\openhab-addons-2.2.0\org\eclipse\smarthome\extensionservice\org.eclipse.smarthome.extensionservice.marketplace.automation\0.10.0.b1\org.eclipse.smarthome.extensionservice.marketplace.automation-0.10.0.b1.jar'.
At C:\Users\OH_User\AppData\Local\Temp\openhab\update\runtime\bin\update.ps1:644 char:14
+ ... exit PrintAndReturn "Could not backup existing distribution to ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,PrintAndReturn
Press any key to continue . . .
c:\openHAB2\runtime\bin>
I tried to copy the missing file manually to the target directory and I got windows error message which says the path is too long. See error message:
I assume this is the reason for this issue.
Does anyone encountered this issue?
Thanks!
Shlomi
