Migrating Resilio Agents to a new server
This guide will help you migrate Resilio Agent to the new server preserving its configuration.
Migration of the Agent implies moving its storage folder to the new server. Storage folder is the directory where the Agent keeps its setting, database files, debug logs and other service information. For default storage folder location, see Storage Folder.
Before migrating the Agent, see these common recommendations
- To ease the migration, it is highly advisable to migrate the Agent when it's mainly idle, not busy with file transfers.
- Do not perform upgrade during the migration. Install the same Agent version as was installed on the older server.
- The migrated Agent may request approval on MC. It's OK, proceed with approval.
- After the migration is completed, uninstall and do not start the previous Agent installation on the older server.
- Make sure the agent has access to the files it was syncing before via the same path that is configured in the Job settings.
- Stop Resilio Active Everywhere Agent service.
- Install Resilio Active Everywhere Agent on the new server. Do not launch it.
- If the Agent's storage was encrypted on the old server (for versions 3.6 and newer), copy the encryption key (environment variable value) to the new server and set it up the same way.
- Copy the content of its current storage folder to the exact same location on the new server. If you're using a custom storage folder location, refer to Change storage path location for the Resilio Agent for instructions on adjusting the path on the new server accordingly.
- Start the Resilio Active Everywhere Agent service on the new server. It is expected that the Agent will reconnect to the Management Console and not create a new Agent entity there.
- Recheck the jobs and Agent configuration. If you verify that everything is in order, you can clear the storage and Agent installation on the old server.
Depending on how you have Resilio Active Everywhere Agent installed, use either of the
methods
rslagent binary file downloaded and launched
- Stop the
rslagent
process. - If the Agent's storage was encrypted on the old server (for versions 3.6 and newer), copy the encryption key (environment variable value) to the new server and set it up the same way.
- Copy the content of current storage to the new server.
-
Download the Agent binary and point it to the new storage location. Depending on how it was set up on the older server, two options are possible:
- One of the options is to add
--storage /path/to/new/storage
parameter to the launch line. The launch line must have also--server
parameter to connect to the Management Console. - Another option is to add
"storage_path": "/path/to/new/storage",
into the configuration file. Configuration file must have Management Server configured as well. Be sure to stick to json format
- One of the options is to add
-
Start the Agent.
Agent is installed through package manager
- Stop the daemon.
- If the Agent's storage was encrypted on the old server (for versions 3.6 and newer), copy the encryption key (environment variable value) to the new server and set it up the same way.
- Copy content of the current storage folder to the same location on the new server. For default storage folder location, see Storage Folder.
- If you know you had adjusted the service file in some way so that it's not default one anymore, copy it to the new server as /lib/systemd/system/resilio-agent.service.d.
- Install the service, do not start it.
- Run command
sudo systemctl daemon-reload
. - Start the daemon.
It is expected that the Agent will reconnect to the Management Console and not create a new Agent entity there. Recheck the jobs and Agent configuration. If everything seems OK, you can clear the storage and Agent installation on the old server.
- Stop Resilio Active Everywhere Agent.
- If the Agent's storage was encrypted on the old server (for versions 3.6 and newer), copy the encryption key (environment variable value) to the new server and set it up the same way.
- Copy the content of current storage folder to the exact same location on the new device, including the sync.conf file if it's there.
- If you're using a custom storage folder location, refer to Change storage path location for the Resilio Agent for instructions on adjusting the path on the new server accordingly.
- Download and launch Resilio Active Everywhere Agent on the new device.
It is expected that the Agent will reconnect to the Management Console and not create a new Agent entity there. - Recheck the jobs and Agent configuration. If everything seems OK, you can clear the storage and Agent installation on the old server.