Storage path is the directory where the Agent keeps its setting, database files, debug logs and other service information. By default, storage is created in the directories mentioned here.
It's possible to keep the storage on a different location. Follow the steps below for each of the operating systems. Mind the peculiarities and limitations for each. It is vital that the user under who Agent runs has recursive read-write access to the new storage location
There are two ways to do it on Windows. Only local drives can be used for new storage location. Network shares are not available for Agents service session - you will need to map them in the service session using this guide.
1) Use registry editor.
- Stop Resilio Connect Agent service. Copy its current storage folder to the new location.
- Open registry editor (Ctrl+R -> regedit) and navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\connectsvc
- edit key ImagePath and add
"/STORAGE" "D:\Path\to\storage"(with quotes) at the end of the line
- start the service
2) Use Agent configuration file.
This is a good way in case of mass deployment of agents.
- stop the Agent if it's already installed and running.
- add line
"storage_path": "D:\\Storage\\ConnectAgent",(mind double slash and missing trailing slash) into the configuration file. Be sure to stick to json format.
- start the Agent.
To ensure that the Agent indeed uses the new storage location, you may remove or rename sync.log file in it before starting the Agent. New sync.log file shall be created after start. Another way to verify it is after starting the Agent to look inside sync.pid file, which is a regular text file, and see that current Agent's PID is written there.
After you have confirmed that the new storage is used by the Agent and that the settings are all preserved, it's safe to clear space on the previous storage location.
Depending on how you have Resilio Connect Agent installed, use either of the methods
1) This is just downloaded and launched rslagent binary file
- stop rslagent process.
- copy the content of current storage to the new location
- point the Agent to the new storage location. One of the options is to add
--storage /path/to/new/storageparameter to the launch line. The launch line must have also
--serverparameter 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
- start the agent.
2) Agent is installed through package manager
- stop the service.
- edit file /lib/systemd/system/resilio-agent.service and change variable
AGENT_LIB_DIRwhich is later used in
--storageparameter. Also, edit path to sync.pid file and put the same path as in storage.
- run command
sudo systemctl daemon-reloadstart the service.
- start the service and check its status to verify that new storage is indeed used. New folder shall be created and store Agent's service files. After you have confirmed that the new storage is used by the Agent and that the settings are all preserved, it's safe to clear space on the previous storage location.
On MacOS this can be achieved by editing Agent's configuration file.
- stop Resilio Connect Agent
- copy the content of current storage folder to the new location
- edit configuration file* and add line
"storage_path": "/path/to/new/storage",into the configuration file. Be sure to stick to json format. Put the edited sync.conf file to the new storage. On macOS, please use a plaint text editor to avoid extra formatting in the file:
- start Resilio Connect Agent**
* The tricky part on macOS is that sync.conf file is located in Agent's storage.
If you already run the Agent with config file, do not delete the previous storage folder until you start and stop the Agent at least once for it to save the new storage path in its settings.
** If you didn't run the Agent with configuration file, first launch shall be made from the Terminal.app with command
/Applications/Resilio\ Connect\ Agent.app/Content/MacOS/Resilio\ Connect\ Agent --config /path/to/sync.conf