I have been trying to run resilio-sync as a personal backup cloud for my phone for a few weeks, using a raspberry pi 2 and an external HDD.
I've installed following the instructions here:
https://www.resilio.com/blog/official-linux-packages-for-sync-now-available
and made sure I enabled automatic startup with:
sudo systemctl enable resilio-sync
no problems so far, until I try to acess the webgui and setup my folders in the HDD (permission error)
So I edited the file in /etc/resilio-sync/config.json and added the line
"directory_root" : "/pathtodrive",
I stopped the service, and used the config file with:
sudo rslsync --config /etc/resilio-sync/config.json
At that time everything looks fine and I can add my folders without any problem.
Unfortunately, whenever I reboot the pi, or it gets powered down, I always need to stop the service and point it to the config file on reboot, because the configurations get "lost" somehow. My directory_root folder disappers from the preferences in the webgui, and the folders I setup are not longer there.
Shouldn't my configurations be used everytime the service starts? Why do I always have to configure sync manually? I think I'm missing something.
This is my status report BTW:
sudo service resilio-sync status
● resilio-sync.service - Resilio Sync service
Loaded: loaded (/lib/systemd/system/resilio-sync.service; enabled)
Active: active (running) since Mon 2017-01-02 23:14:15 GMT; 8h ago
Docs: http://help.getsync.com/
Process: 577 ExecStart=/usr/bin/rslsync --config /etc/resilio-sync/config.json (code=exited, status=0/SUCCESS)
Process: 571 ExecStartPre=/bin/chown -R rslsync:rslsync /var/run/resilio-sync (code=exited, status=0/SUCCESS)
Process: 561 ExecStartPre=/bin/mkdir -p /var/run/resilio-sync (code=exited, status=0/SUCCESS)
Main PID: 657 (rslsync)
CGroup: /system.slice/resilio-sync.service
└─657 /usr/bin/rslsync --config /etc/resilio-sync/config.json
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
I've been trying to solve this for weeks now...