Sync files between multiple pi-top[4]s

In anticipation of a couple Robotics Kits being delivered this next week. I got to thinking that I would love to have a set up that code written and saved could be put on both pi-top[4]s to keep the code the same whether it is new code written or update to code (and save time transferring the code manually or writing it twice).

I’ve included a diagram of what I’ve come up with, in case anyone else finds it useful.

I’ve installed an open source software called Syncthing (syncthing.net) on all devices (both pi-top[4]s, an optional RPi and the desktop/laptop that code will be written/saved on). With devices connected to one another – laptop to the RPi (for backups) and the the RPi connected to both pi-top[4]s – code is written/updated and then saved to a shared folder and all devices automatically sync. Sync doesn’t matter where the code originates (on one of the pi-top[4]s, on the RPi or the laptop, all devices stay in sync).

You can eliminate the middle RPi and just sync between the laptop and pi-top[4]s (and you’re not just limited to two pi-top[4]s… so great for a classroom setting). However, I like having the RPi in the middle that backs up the code because if I introduce another pi-top[4], all I have to do is sync it with that connection which takes less time, etc.

Check out the PiMyLifeUp website for a great article on how to install Syncthing: https://pimylifeup.com/raspberry-pi-syncthing/

2 Likes

Hi @Tom-B, sounds interesting - would love to chat about your requirements for this at some point, if you send me a DM we can set something up :+1:

1 Like

Hey, I have a solution but it is somewhat intense for new users… rclone and a cloud drive would be perfect for this. I personally use rclone and a custom made service for the system daemon to automatically start the drive service at start up. If you would like to know more, let me know and I can point you in the right direction and also send over the code for what I have done to set it up.