Syncing Savedata Across Platforms with FreeFileSync¶
FreeFileSync is an open-source program that allows you to monitor files, see when they change, and then sync them to another location when they do.
Instead of syncing directly between locations like with SyncThing, we're going to use FreeFileSync to first sync the files to cloud storage like Dropbox, Google Drive, OneDrive or ProtonDrive, and from there copy them to the save file's location.
Requirements¶
- Install FreeFileSync on your device, and every other device.
- Your cloud storage must be installed as an app, so its space can be treated like "any other folder" on your file system.
Usage¶
Preparing Directories¶
- In our cloud storage, create a
Save Datafolder. - Inside of
Save Data, create a folder for each game you'd like to sync. (Example:/Save Data/OOT) - Inside the game folder, create a folder called
Versions(Example:/Save Data/OOT/Versions)
Creating a Profile¶
- Open FreeFileSync. If it isn't your first time using it, go to
File > New. - There are two panes, representing the locations where the file exists, and where the file will be copied to. On the left pane, find your savedata file or folder. Click and drag it onto the left pane.
- Open your
Save Datafolder. Drag the folder for your game to the right pane. - Click the "Compare" button at the top. In the middle of the screen, you should see arrows pointing right. This means that the files on the left pane are newer than the ones on the right (since well, they don't exist on the right).
- Before you click "Synchronize" in the top-right, click the green gear icon.
- From there, change the "Recycle bin" option to "Versioning" in the "Delete and Overwrite" seciton of the "Synchronization" Tab.
- In the same area, change "Naming convention" to "Time stamp [File]". This means that if a file is overwritten, it will be renamed and moved into a folder.
- Change the
Last x days,Minimumand/orMaximumbackups to your liking. Anything not meeting these will be deleted. For example, I haveMaximumset to 10; when I create a version after the 10th, the oldest one will be deleted. If none are checked, it will keep all versions. - For "Move files to a user-defined folder", select Browse, then navigate to your
Versionsfolder. - We're almost done. Click the "Filter" tab of the window we're in. In the "Exclude:" box, add
\Versions\. This will keep your Versions folder from being synced back and forth. - Hit "OK" and then click "Compare". It should show you the files being created. Hit "Synchronize" to sync them.
On your second device, you're essentially going to do the same thing, only in reverse: your left pane will be your Save Data folder, and your right will be the game's savedata location. You'll also need to set up the Exclusion in the same way.
This means that you'll always have the most current version of the save file/directory on your cloud storage, but only if you manually trigger the Synchronization.
Making it Automatic¶
When you have the profile open in FreeFileSync:
- Press File, and then "Save as Batch Job." Check "Run Minimzed" and "Auto-Close". Save this file somewhere.
- When you installed FreeFileSync, you should have also installed RealTimeSync automatically. Search for it and open it.
- Go to File and then Open. Open the Batch Job file you just created.
- Hit "Start." When you do, your files will auto-sync when changes are noticed by RealTimeSync.
Starting it with Windows Startup¶
- Open your batch file in RealTimeSync.
- Create a new file in Notepad.
- At the bottom of the RealTimeSync window, copy the "Command line to run when changes are detected".
- Paste it into the text file.
-
One line above it, add
@echo off. Your file should look like this:@echo off start "realtimesync" "[Insert the path to your RealTimeSync Install]" "[Insert the path to your Batch Job]" -
Press
WIN + R. In the box, typeshell:startup - In Notepad, save the text file you're making into this folder. However, instead of a
.txtextension, give it a.batextention. Alternatively, you can save it as a.txtand then change the extension to.bat.
The startup folder contains things that will run when Windows starts. When Windows starts, it'll start your .bat (batch) file, and begin monitoring your files.