Setting up BitTorrent Sync on your RetroPie install
-
I've started using BitTorrent Sync to keep multiple RetroPie consoles in sync (same roms and save states). I thought this forum might benefit from the knowledge, so I'll try to write a guide.
First, make sure you're in your home folder:
cd /home/pi
Then, download the latest version of btsync:
wget "https://download-cdn.getsync.com/stable/linux-arm/resilio-sync_arm.tar.gz"
Next, extract the file you just downloaded:
tar xzf resilio-sync_arm.tar.gz
next, you need to set the program to auto-start with your raspberry pi. You'll need to add it to /etc/rc.local for that. Start the text editor:
sudo nano /etc/rc.local
Then add this line before the last commented line:
/home/pi/rslsync --webui.listen 0.0.0.0:8888
That will start the server up when you start up your pi. One last thing, get your IP address with
ifconfig
Then
sudo reboot
your pi. Once it's back up, go to a web browser on your computer and type inhttp://YOURIPHERE:8888
making sure to insert the IP address you got from running ifconfig. This will load a web interface for btsync, and you should be able to set it up pretty easily from there (the program guides you through it at that point).This is how I got it up and working for myself, couldn't find a guide anywhere that went from start to finish, so I hope this helps you out. NOTE: This DOES have btsync running as root, for me that's not a big deal as these are dedicated gaming machines but it could present a security risk. For me, the benefits outweigh the risks.
Hope this helps someone out there!
-
@bfenty really cool stuff man, thanks for taking some time to write up a guide. This should be added to the wiki. I have to update a couple systems soon, I will definitely be trying this method.
-
I really like this idea. For things to work correctly do you have to keep one Pi on all the time?
-
The sync happens very quickly. I use it to keep my portable system in sync with my TV-connected system. The TV system is always on, but in theory, as long as they're both on at the same time for a few minutes at a time, they should sync just fine. I would recommend, however, that one system be always-on to make sure that everything stays nicely in sync.
Another option would be to have a 'server' someplace, like a computer that's already always on, and just sync with that, too. You could use that to just create a backup to protect from SD corruption.
-
@bfenty brilliant idea!
-
Sorry for bumping this thread, but this is quite a nice feature and something I wanted to do myself, since I have multiple devices that I play on and switch between. It's also the first hit when you google RetroPie + Resilio.
I used this guide and it gave me a little bit of a headache. Running Resilio as root isn't just a problem for security, it also causes problems with it's intended feature - saving games. The reason is that RetroArch (which runs all of the emulators) is not running as root, so any files Resilio creates, running as root, can not be changed by RetroArch. That means a save created or modified by one of the other devices and synced to RetroPie through Resilio can not be touched by RetroArch (which is running as the regular user 'pi').
I recommend instead installing Resilio the regular way (check a guide for Debian or Ubuntu) and then run it as the user pi. -
This script is to make ResilioSync an always running service so any changes made are automatically uploaded to your master repo.
Run the commands, make the changes and then restart the service. I made my initial repo on my master server and added my main retropie to the sync group, waited for 100% sync and then added the rest of my devices exactly the same way.
Open the resilio gui by going to retropieIP:8888/gui/
wget -c https://download-cdn.resilio.com/2.6.3/Debian/resilio-sync_2.6.3-1_armhf.deb sudo dpkg -i resilio-sync_2.6.3-1_armhf.deb sudo systemctl enable resilio-sync sudo nano /lib/systemd/system/resilio-sync.service sudo sed -i "s/rslsync/pi/g" /lib/systemd/system/resilio-sync.service
sudo nano /lib/systemd/system/resilio-sync.service
Go in and edit the file and change out this line
ExecStart=/usr/bin/pi--config ${SYNC_CONF_DIR}/config.jsonto
ExecStart=/usr/bin/rslsync --config ${SYNC_CONF_DIR}/config.json
sudo systemctl daemon-reload sudo systemctl restart resilio-sync
When u go to make the sync, I used /home/pi/RetroPie/roms
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.