Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| syncthing [2021/12/15 07:37] – amend info about savestates, minor cleanup atari | syncthing [2025/04/08 16:17] (current) – peterbozso | ||
|---|---|---|---|
| Line 12: | Line 12: | ||
| * It should go without saying, when syncing savestates ensure that both systems have the same emulator selected. Certain platforms may have a different default emulator for a given system. | * It should go without saying, when syncing savestates ensure that both systems have the same emulator selected. Certain platforms may have a different default emulator for a given system. | ||
| - | ===== Synchronize saves across multiple Batocera nodes ===== | + | ===== Cluster configuration |
| - | ==== Cluster configuration ==== | ||
| * If you have a machine that is up 24/7, like a NAS or a personal server, you can install Syncthing on this machine, and put it in your Syncthing cluster. As it is always up, your Batocera machines will synchronize with this central server. For example, an [[https:// | * If you have a machine that is up 24/7, like a NAS or a personal server, you can install Syncthing on this machine, and put it in your Syncthing cluster. As it is always up, your Batocera machines will synchronize with this central server. For example, an [[https:// | ||
| * If you don't have a machine running 24/7, when you synchronize files across two Batocera nodes (or more), you need to make sure both of them are up and running during the file synchronization processes. | * If you don't have a machine running 24/7, when you synchronize files across two Batocera nodes (or more), you need to make sure both of them are up and running during the file synchronization processes. | ||
| Line 21: | Line 20: | ||
| ==== Initial setup ==== | ==== Initial setup ==== | ||
| - | First, | + | First, enable Syncthing on all the Batocera machines you want to use for saves synchronization. |
| + | |||
| + | On each machine with Batocera | ||
| + | |||
| + | | ||
| + | |||
| + | On each machine | ||
| | | ||
| - | Once this is done, reboot | + | Once this is done, reboot Batocera. When Batocera is back up, on another computer on the same local network, open a web browser to '' |
| You will have a Synthing web UI where the configuration process start. | You will have a Synthing web UI where the configuration process start. | ||
| First, a few housekeeping items: | First, a few housekeeping items: | ||
| - | | + | |
| - | {{ :: | + | - A warning that the process should not run as a privileged user. At the moment, this is a limitation you need to accept to use Syncthing on Batocera.\\ {{:: |
| - | * A warning that the process should not run as a privileged user. At the moment, this is a limitation you need to accept to use Syncthing on Batocera. | ||
| - | {{ :: | ||
| - | |||
| Now let's move on to the configuration: | Now let's move on to the configuration: | ||
| + | - Settings: this is the main page where you can define a Syncthing name for your Batocera unit, and on the GUI tab you can put a login/ | ||
| + | In Batocera **v33**, if **ENFORCE SECURITY** is " | ||
| - | * Settings: | + | 1. Disable |
| - | {{ :: | + | |
| - | * Once you have this basic setup done on at least two Syncthing nodes (i.e. two Batocera machines with Synchthing on, or a Batocera + your central server for saves), you can create a cluster of Syncthing nodes, by telling each node which are the other machines where you want to share your saved files. You can add a friendly name for each machine, internally Syncthing identifies them with a self-generated '' | + | 2. Or create a SSH tunnel from another machine. |
| - | {{ :: | + | For example, on a Linux host you can '' |
| + | </ | ||
| + | - Once you have this basic setup done on at least two Syncthing nodes (i.e. two Batocera machines with Synchthing on, or a Batocera + your central server for saves), you can create a cluster of Syncthing nodes, by telling each node which are the other machines where you want to share your saved files. Click **Add Remote Device...**. You can add a friendly name for each machine, internally Syncthing identifies them with a self-generated '' | ||
| + | - Now that we have our cluster of Syncthing nodes, we can configure the folders that need to be synchronized across them. In our example here, we want to synchronize the games save files in ''/ | ||
| + | - Then on the " | ||
| + | - You need to repeat that on all nodes, but if your nodes are on the same network, they might be auto-discovered and announce their shared folders to the other nodes to provide a one-click easy addition.\\ {{:: | ||
| + | - If you run Batocera on a PC x86_64, as well as other SBC, there might be save folders you want to ignore for the synchronization. Typically, flatpak and Windows games aren't necessary on a SBC and eat up quite a lot of storage. So, you can define some patterns that you want to ignore. On my PC x86_64, I put '' | ||
| + | The ignore syntax is very powerful, its full documentation is available at https:// | ||
| + | </ | ||
| + | - Once the shares are configured, you should see on the UI a progress for the initial synchronization. Depending on the size of your shared files, it might take some time, but you can follow the process on this screen.\\ {{:: | ||
| - | * Now that we have our cluster of Syncthing nodes, we can configure the folders that need to be synchronized across them. In our example here, we want to synchronize the games save files in ''/ | + | ===== Operational running ===== |
| - | {{ :: | + | |
| - | * Then on the " | + | * At any given time, you can check the status of the synchronization across the cluster of Syncthing |
| - | {{ ::syncthing_5_sharing_folder.png? | + | {{ ::syncthing_8_progress_multiple_devices.png? |
| + | * Right now, when a new save file is added, or when a save file is updated on a node, you need to " | ||
| - | * You need to repeat that on all nodes, but if your nodes are on the same network, they might be auto-discovered and announce their shared folders to the other nodes to provide a one-click easy addition. | + | ===== Manual execution ===== |
| - | {{ :: | + | |
| - | * If you run Batocera on a PC x86_64, as well as other SBC, there might be save folders you want to ignore for the synchronization. Typically, flatpak and Windows games aren't necessary on a SBC and eat up quite a lot of storage. So, you can define some patterns that you want to ignore. On my PC x86_64, I put '' | + | Here are a few handy SSH commands: |
| - | {{ :syncthing_9_ignore.png? | + | * **Run sync: |
| + | * **Open the Syncthing UI in Batocera: | ||
| + | * **Open the Syncthing command line via SSH: | ||
| + | | ||
| + | | ||
| - | * Once the shares are configured, you should see on the UI a progress for the initial synchronization. Depending on the size of your shared files, it might take some time, but you can follow the process on this screen. | + | ===== Advanced configuration ===== |
| - | {{ :: | + | |
| + | Syncthing' | ||
| - | ==== Operational running | + | ===== Troubleshooting ===== |
| - | * At any given time, you can check the status | + | |
| - | {{ ::syncthing_8_progress_multiple_devices.png? | + | In case something goes wrong with Syncthing, a useful log to check is at ''/ |
| + | |||
| + | Further help can be found at [[https:// | ||
| + | |||
| + | ===== Generic cloud backup ===== | ||
| + | |||
| + | https:// | ||
| + | |||
| + | The use-case | ||
| + | |||
| + | This solution uses [[https:// | ||
| + | |||
| + | A detailed description of how this works and setup instructions for it is on [[https://gitlab.com/ | ||
| - | * Right now, when a new save file is added, or when a save file is updated on a node, you need to " | ||
- syncthing.1639553828.txt.gz
- Last modified: 4 years ago
- by atari