Having a lot of agents in your environment you can use Connect's Distribution job to update them. Follow the steps:
- Ensure that your target OSes meet the prerequisites (specific for each OS, see below)
- Create Distribution job.
- Source path should contain at least 2 files for each OS you plan to update: a script and a binary. See particular OS below, files section.
- Ensure to enable one of triggers "Run script when agent completes download" or "Run script when all agents complete download".
- Get the OS-specific command and put it into relevant OS script box.
- Ensure that job only runs manually
- Run the job once ready.
Test your update
It is strongly recommended to test your update on a small group of computers first
Prerequisites
- Ensure your Agents on windows run as "SYSTEM" or user account with admin privileges. If they run under "Local Service" account, automatic update is not possible due to security subsystem limitations.
- Ensure your agents have Powershell 4.0 or newer
Files
These files must be delivered to your Windows destination (download these scripts. Binaries should be downloaded from Resilio Connect download site):
Resilio-Connect-Agent_x64.exe
Resilio-Connect-Agent.exe
agent_upgrade.ps1
Job Path
Job path could be any, but we recommend to set it to "C:\ResilioUpgrade" to find easily upgrade logs if something goes wrong.
Command
Use this command in the "Windows" section of the "After agent completes downloading" trigger):
powershell.exe -NoProfile -Command "$PSVersionTable.PSVersion.Major" > ps.version set /p PSVER=<ps.version if %PSVER% LSS 4 ( echo Powershell version is older than 4.0, automatic upgrade not possible exit /b 17 ) if not exist "agent_upgrade.ps1" ( echo agent_upgrade.ps1 script not found exit /b 4 ) findstr /I "HTML" agent_upgrade.ps1 > NULL if %ERRORLEVEL%==0 ( echo agent_upgrade.ps1 script is actually an HTML page, please re-download from github exit /b 18 ) powershell.exe -NoProfile -ExecutionPolicy Bypass -File agent_upgrade.ps1 -Verify > verify.log 2>&1 set ERR=%ERRORLEVEL% if %ERR%==1 ( echo No need to upgrade, same version detected type verify.log exit /b 0 ) if %ERR% GEQ 2 ( type verify.log exit /b %ERR% ) echo %APPDATA%\Resilio Connect Agent Service>oldstorage.path powershell.exe -NoProfile -ExecutionPolicy Bypass -File agent_upgrade.ps1 -CreateUpgradeTask powershell.exe -NoProfile -ExecutionPolicy Bypass -File agent_upgrade.ps1 -RunUpgradeTask
Output
Agent will be updated and reconnect to Console. Fetch the script logs from job details dialog to see if anything went wrong.
Option to skip x86
If you are not running any x86 computers you can avoid delivering x86 binary to save your traffic. Also add the -NoX86exeCheck
parameter to the line containing ...-Verify...
of the script you copy to the trigger to avoid script failing due to missing executable:
powershell.exe -NoProfile -ExecutionPolicy Bypass -File agent_upgrade.ps1 -Verify -NoX86exeCheck > verify.log 2>&1
Option to skip updating Explorer extensions
If you are not using Selective Sync you can skip updating Explorer extensions and avoid Explorer being restarted during upgrade. To do it add the -NoExtensionUpgrade
parameter to the script you copy to the trigger, the line containing ...agent_upgrade.ps1
-CreateUpgradeTask...
:
powershell.exe -NoProfile -ExecutionPolicy Bypass -File agent_upgrade.ps1 -CreateUpgradeTask -NoExtensionUpgrade
As Agent runs under rslagent or local user account, update cannot be triggered by Agent itself due to Linux security model.
Use your Linux packet manager to update your packages. When installed via Resilio official repository Agent will update automatically only to latest minor version with next system update. If you are ready to update your Resilio Agent for Linux to latest major version, please add new major version repository as mentions in this instruction.
Remote updating of NAS is not possible. For NAS devices use new NAS packages to update Agents.
Prerequisites
Resilio Connect Agent app must be installed in system's global "/Applications" folder. Please ensure that user with admin privileges logged in during the update. The script will prompt for admin password during update to actually replace application bundles.
Files
These files must be delivered to your OS X destination:
Resilio-Connect-Agent.dmg
- agent_update_mac
If your agent runs as root user, use agent_update_mac_as_root script instead.
Command
Use this commands in "OS X" section of the "After agent completes downloading" trigger to load and execute the "agent_update_mac" script
chmod +x agent_update_mac
nohup ./agent_update_mac &
Output
The script will show system notifications once starting update and once done. Also, script will ask for admin password, so minor user interaction required. Output log file "update-<date>.log" will spawn in each Agent's storage folder. Use it to debug any issues that arise during update.