w82 Posted March 12, 2016 Report Share Posted March 12, 2016 Hi, Over the last month, I've had a lot of trouble with BTSync and had to reinstall several times. Each time I've done this, I have lost all the config options (mainly the shares). I'm now on the official debian version, but am confused which config files I should back-up. I want to get to the stage where I can install BTSync on a freshly formatted device, restore a config, and all the old settings and shares are there and working. Can anyone advise which folders and files are essential to be backed-up to make this happen? Thanks Will Quote Link to comment Share on other sites More sharing options...
RomanZ Posted March 14, 2016 Report Share Posted March 14, 2016 Hi Will, There are 2 ways : You need to backup whole storage folder. Though, you'll need to be careful and ensure that folders path does not change. Make your own config, with pre-defined folders (only standard folders supported). In this case, you'll need to keep only this config folder, Sync will create all other folders from it. Quote Link to comment Share on other sites More sharing options...
w82 Posted March 16, 2016 Author Report Share Posted March 16, 2016 Hi Roman, Thanks. Option 2 makes more sense I think. So I took a look at the config and have tried to populate "Shared folders section" without luck. I've used the key for a shared folder from another BTSync instance on another device. Is this correct? When I run BTsync, the folder isn't appearing, so I've obviously done something wrong and I'm sure it's to do with the key. The docs for shared folders in configs is a bit sparse, so would love your help if you get time Thanks Will Quote Link to comment Share on other sites More sharing options...
Helen Posted March 17, 2016 Report Share Posted March 17, 2016 Will, is config valid? You can run it through a json validator. And does sync have rw access to the chosen directory? Check this. Quote Link to comment Share on other sites More sharing options...
w82 Posted March 18, 2016 Author Report Share Posted March 18, 2016 (edited) Hi Helen, I've managed to sort it, thanks. Here are my findings for backing things up on debian / raspberry pi. Config Webui and shared folders can't work together, so you can't monitor things in the web interface. To add a shared folder, you need a key which you can generate - then just use this key on other devices. Save the config file with a unique name so it isn't automatically over-written, and make a backup of it in a completely separate folder which isn't touched. Keep it safe! To run this config using systemd, create a new service file. This is mine. Save and overwrite it in /lib/systemd/system/btsync.service [Unit] Description=BitTorrent Sync service Documentation=http://help.getsync.com/ After=network.target [Service] Type=forking User=pi Group=pi UMask=0002 Restart=on-failure PermissionsStartOnly=true PIDFile=/var/run/btsync/btsync.pid ExecStartPre=/bin/mkdir -p /var/run/btsync ExecStartPre=/bin/chown -R pi:pi /var/run/btsync ExecStart=/usr/bin/btsync --config /home/pi/.config/btsync/config2.json I'm running it as pi instead of btsync in order to preserve permissions. When you upgrade btsync, all your settings are overwritten - including /lib/systemd/system/btsync.service. So, once you've installed btsync or upgraded, run a script to restore your backups: sudo systemctl stop btsync.service sleep 2 sudo rm /lib/systemd/system/btsync.service sudo cp /home/pi/btsyncconfig/btsync.service /lib/systemd/system/btsync.service sudo systemctl daemon-reload sudo systemctl start btsync.service This will run btsync using my backed-up config and all the old shares are still there. Hope this helps someone Will Edited March 18, 2016 by w82 Quote Link to comment Share on other sites More sharing options...
Helen Posted March 18, 2016 Report Share Posted March 18, 2016 thank you Will! Much appreciated, your guide can be useful for others. yes, indeed, webui and "shared_folders" cannot live together in one config. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.