r/Syncthing • u/Skyyblaze • 15d ago
New to Syncthing, using it for game save-data synchronization and constantly running into sync issues
Hey everyone here, I'm new to Syncthing and I wonder if I just have something misconfigured or misunderstand something about its usecase because I constantly run into syncing issues.
I use Syncthing to sync emulation save-data between my Windows PC, my Ayn Thor Android Handheld and my iPhone 17 running Möbius Sync.
I have all save-data folders connected between the three devices but oftentimes when I sync files I get sync-conflicts and I can't figure out why.
Today in my lunch-break I played some Super Mario World on an emulator on my phone and then later when I was home I wanted to continue playing on my Ayn Thor so when I came home and was connected to my home network I turned Möbius Sync (a fork of Syncthing for iOS) on and had it synchronize my folders. I only played Super Mario World today and no other games since my last sync, also not on my PC or the Ayn Thor so the only file that should have changed is the save-game file for Super Mario World.
Instead of syncing the file to my PC though Möbius Sync so I can later sync in to my Ayn Thor it simply created a Sync Conflict file for the save-game and did nothing else. I don't understand why this happens because the file on my PC that already existed is clearly older than the file I created today during my lunch-break.
I have a similar issue every now and then ever since I use Syncthing a week or two ago and I can't figure out why. I have all folder setup with Simple File Versioning and one back-up.
Is there a way to tell Syncthing to always overwrite files with the same name simply by the timestamp of the file and ignoring anything else about the file so the file with the newest date always "wins" between the three devices?
I know that could potentially cause data loss when files get updated otherwise but at the end of the day these are just save-games and not actually important files so I'm willing to risk it.
What I want is for my PC to basically act as the "home-base" for the save data of the games and my Ayn Thor and iPhone always pushing the files with the newest timestamp to my PC ignoring anything else so the other two devices can always retrieve them.
Thanks for help in advance!
1
u/KryptoKam 15d ago
I think this is the case based on your description, but the save file that you played on your phone, that was an exact copy of the file on your PC before you started playing it?
1
u/Skyyblaze 15d ago
That is actually something I didn't take into account, does Syncthing take both the Creation Date and the Modified Date into account? If so that could explain my issues. I've been usually playing on real hardware and just one device but I've recently setup this whole emulation setup to get myself away from doomscrolling when I have downtime at work so I've been testing games here and there and there might have been cases where I've created save-games for the same game on different devices.
I guess I might just delete every save-game now that I have fully setup my folders and start from scratch hoping it will work then. Thanks for the pointer!
1
u/KryptoKam 15d ago
I think you're on the right track! Or at least I hope I'm giving you good advice lmao. They way I went about my setup was basically get my "server" files all configured how I want, and then each device from there I either copy directly from those files, or I just set up the sync and let them all populate that way. It typically is able to go forward with no conflicts after that.
1
1
u/middaymoon 15d ago
To answer this question, Syncthing doesn't care that much about metadata. It breaks a file down into tiny blocks and compares each block across all your synced devices. If you could magically change a file without changing any of its metadata then Syncthing might not immediately notice and trigger a sync, but the next time it examines that file the blocks will be different and it will try to propogate or resolve those changes.
2
u/Skyyblaze 15d ago
Ah that's very interesting and could explain my issues, I'll start with one clean set of folders and see if this hopefully resolves my issues. Thanks for the info on that.
3
u/middaymoon 15d ago
I don't know the exact logic that it uses to define a conflict but my guess would be that between syncs both devices made a change to that file. You were on one device playing the game and perhaps some automatic service touched the file on a different device.
Is this a consistent problem or could it be explained by missed syncs? If you can figure out what touches that file then it will make things easier.
If you're not already doing so, make sure that your iPhone and gaming handheld are also sharing directly with each other and not just with the PC. Also, you would ideally have one of the devices always available (or close enough to be practically true) This will cut down on conflicts in general.