I manage a small network of Windows computers and Syncthing is used between them along with a server that has regular snapshots. There was a unintended mass deletion from a device so I reverted the filesystem to a older snapshot. However now I’m stuck with cleaning up a bunch of empty folders and (possibly) lingering files. So far here’s the timeline of actions.
- Deletions noticed
- Shutoff Syncthing on the server
zfs rollback xxx/yyy@zzz
find /syncthing/path/. -type f -exec touch {} +
- Start Syncthing on the server
- I should’ve started Syncthing with the
-pause
switch here.
- I should’ve started Syncthing with the
- Pause all folders
- Set all folders to “Send Only”
- Resume all folders
- Wait till clients get the touched “new” files
- Return folders to “Send & Receive”
Everything’s just about back where it should, but I have a bunch of empty folders (around 500) on the clients that Syncthing refuses to delete. This might’ve been caused by the rollback I did, or was there before this and nobody informed me (I don’t regularly check Syncthing.)
If anyone has any comments on what I did and what I should do in the future that’d be great, but I still have the empty folders issue. I tried setting the clients to Receive only hoping I’d get a “Delete Local Changes” option, but no dice. These are Windows machines and so far I’m guessing I have to whip up a PowerShell script to discard the empty folders and fix any other folders manually, but if there’s some Syncthing feature I’m missing to help me that’d be great to know.
2 posts - 2 participants