Cannot restore from staggered versions on macOS (files are present in .stversions)

Hi, I have a share with staggered versioning configured. A folder was deleted on the remote, and the deletion got synced to my computer. I would now like to restore it, but cannot.

I can see the versioned files in the .stversions on my computer.

When I open the restore versions dialog on the web client, it does get populated with the versioned files, and I am able to see all previous versions of the file.

However, when I select any file and click Restore, it shows a dialog that says “Some items could not be restored”, and lists all of the selected files. Each file has an error message that says “staggered versioner: restore: version not found”.

I have tried restarting Syncthing as well as updating it. I have tried leaving “Versions Path” to its default blank value as well as explicitly setting it to “.stversions”. None of that solved the issue. The problem occurs whether I try to restore a single file or an entire directory.

I could manually move the files from .stversions to their original location and rename them, but there are 100s of files so that is not very practical.

My file verisoning configuration is as follows:

  • File Versioning: Staggered File Versioning
  • Maximum Age: 365 days
  • Versions Path: blank or “.stversions”
  • Cleanup Interval: 3600 seconds

Syncthing version: syncthing-macos 1.27.2-1

macOS version: Ventura 13.2.1 (Apple M1 Pro)

Can you enable versioner debug logging in “Actions → Logs → Debugging Facilities” first, then try to restore the file, and then post the logs here?

2024-01-11 13:01:07 too many files in step -> delete .mozilla/firefox/1hoenuhw.default-release/cookies~20240111-120055.sqlite-wal
2024-01-11 13:01:13 restore: experiments/certbot/.git/hooks/prepare-commit-msg~20240108-225931.sample lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/hooks/prepare-commit-msg~20240108-225931.sample: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/05/b62b16b47e77f88658387f980c1a16488f5edd~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/05/b62b16b47e77f88658387f980c1a16488f5edd~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/4f/4cdca2027e955f3ce1e0766d2184eb1a941593~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/4f/4cdca2027e955f3ce1e0766d2184eb1a941593~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/90/091a56613050f0fb979b23a94cbb0642da9964~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/90/091a56613050f0fb979b23a94cbb0642da9964~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/a8/15c79d016703c21e6ef1bb4bf806d3fe10bf37~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/a8/15c79d016703c21e6ef1bb4bf806d3fe10bf37~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/c1/d690d02de719990811c78f4ecdfcdcdf7b2f3a~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/c1/d690d02de719990811c78f4ecdfcdcdf7b2f3a~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/c5/e104cf009f2276eda8b2869092e022a71d8d9b~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/c5/e104cf009f2276eda8b2869092e022a71d8d9b~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/0e/549fa480689377c9cca4cd0d37c59bf5f0b8e9~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/0e/549fa480689377c9cca4cd0d37c59bf5f0b8e9~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/3b/b0769f498d0add788cf4672a51f42ed408a956~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/3b/b0769f498d0add788cf4672a51f42ed408a956~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/5a/f3368b62b1b61e10fdfe981e205e4a75f44def~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/5a/f3368b62b1b61e10fdfe981e205e4a75f44def~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/75/4e5745188bff5dc00f7866d08e96a1bf0484fa~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/75/4e5745188bff5dc00f7866d08e96a1bf0484fa~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/7f/3a3d3291af86125a30ac2dedb7c9b93b00e641~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/7f/3a3d3291af86125a30ac2dedb7c9b93b00e641~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/refs/heads/main~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/refs/heads/main~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/~20240110-185810.DS_Store lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/~20240110-185810.DS_Store: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/00/c28337723b9358c31b2dfcdeaff8fd78c3d0a3~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/00/c28337723b9358c31b2dfcdeaff8fd78c3d0a3~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/0f/00b7afbb0781f7a8dfc35d3c8b73f534932595~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/0f/00b7afbb0781f7a8dfc35d3c8b73f534932595~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/48/c78daacdf683ddeb8d567ab7b081c6a7353632~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/48/c78daacdf683ddeb8d567ab7b081c6a7353632~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/hooks/update~20240108-225931.sample lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/hooks/update~20240108-225931.sample: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/logs/refs/heads/main~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/logs/refs/heads/main~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/98/ec03f1610f5c92b042e38e453bd95963015c83~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/98/ec03f1610f5c92b042e38e453bd95963015c83~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/c8/46234c236f57381e1cb92b9fada2af089ea017~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/c8/46234c236f57381e1cb92b9fada2af089ea017~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/cf/bf9b291cdcbb4d2ced97c003cc3c6ab38bcc5c~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/cf/bf9b291cdcbb4d2ced97c003cc3c6ab38bcc5c~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/d5/97aaa59d216aa1e0c5c907dd48ba7acda643a8~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/d5/97aaa59d216aa1e0c5c907dd48ba7acda643a8~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/hooks/pre-commit~20240108-225931.sample lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/hooks/pre-commit~20240108-225931.sample: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/hooks/pre-receive~20240108-225931.sample lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/hooks/pre-receive~20240108-225931.sample: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/26/78d0c5c871bde3ee3c085d155a16ccc65fb099~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/26/78d0c5c871bde3ee3c085d155a16ccc65fb099~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/8d/0ba174c7f16716e606bea9e244d8844ea0566c~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/8d/0ba174c7f16716e606bea9e244d8844ea0566c~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/9f/b6847d682ece5f6ceff8910d779d63a3429860~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/9f/b6847d682ece5f6ceff8910d779d63a3429860~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/d3/a521d1d3bcaa693e58e9dfe86bbc2ca69be360~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/d3/a521d1d3bcaa693e58e9dfe86bbc2ca69be360~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/e3/0b35ef0dbeddfddbee8a7ea6fc5be4979ce964~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/e3/0b35ef0dbeddfddbee8a7ea6fc5be4979ce964~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/config~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/config~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/hooks/pre-applypatch~20240108-225931.sample lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/hooks/pre-applypatch~20240108-225931.sample: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/37/2f84276d428765c4de00de9ddd09af34f93dbb~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/37/2f84276d428765c4de00de9ddd09af34f93dbb~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/COMMIT_EDITMSG~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/COMMIT_EDITMSG~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/HEAD~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/HEAD~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/logs/HEAD~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/logs/HEAD~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/16/81efadd6de0b921f1ef4f877fb764ed68cd25c~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/16/81efadd6de0b921f1ef4f877fb764ed68cd25c~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/86/562db8f7ead10128ab4f13cb627cc843ab312e~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/86/562db8f7ead10128ab4f13cb627cc843ab312e~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/d1/3b7ffe237de41057eb7adce98460cff9fc99de~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/d1/3b7ffe237de41057eb7adce98460cff9fc99de~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/d6/4cff4b41cef1b8be3dff5a71195a172041ccb0~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/d6/4cff4b41cef1b8be3dff5a71195a172041ccb0~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/refs/~20240110-185815.DS_Store lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/refs/~20240110-185815.DS_Store: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/94/9d8932139d4cffb7b4eccafa647709f6aeb50d~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/94/9d8932139d4cffb7b4eccafa647709f6aeb50d~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/bb/1ed876868aabec1773dd0b1d4a9cdeda7beeb3~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/bb/1ed876868aabec1773dd0b1d4a9cdeda7beeb3~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/index~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/index~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/logs/refs/~20240110-185810.DS_Store lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/logs/refs/~20240110-185810.DS_Store: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/15/11e4b4449918580b788d08498f009e94f6974f~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/15/11e4b4449918580b788d08498f009e94f6974f~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/51/8dd98bd8e75cc9f506faaa81be2a8c88d94b91~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/51/8dd98bd8e75cc9f506faaa81be2a8c88d94b91~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/51/ec35e43f4401d3517a07219caad658872b614c~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/51/ec35e43f4401d3517a07219caad658872b614c~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/9b/ecf4d29120b4a67d4f7f5f0b8431663b61c923~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/9b/ecf4d29120b4a67d4f7f5f0b8431663b61c923~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/cc/7956b53e8b47464134a11e51b55f41bec9ea14~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/cc/7956b53e8b47464134a11e51b55f41bec9ea14~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/ef/5d56cf2b85581934ecbed8cbf2b760b07a78f2~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/ef/5d56cf2b85581934ecbed8cbf2b760b07a78f2~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/hooks/commit-msg~20240108-225931.sample lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/hooks/commit-msg~20240108-225931.sample: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/logs/~20240110-185810.DS_Store lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/logs/~20240110-185810.DS_Store: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/15/de96f93dfa85dffd37dd1ee4baf238eb8b2036~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/15/de96f93dfa85dffd37dd1ee4baf238eb8b2036~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/2f/feb29e82378e10e697d4859c3933aa77d50621~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/2f/feb29e82378e10e697d4859c3933aa77d50621~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/3e/4a2a2b4fc52e7f61947c384c8236f658d146fb~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/3e/4a2a2b4fc52e7f61947c384c8236f658d146fb~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/75/a1f8b4f7fef19e9fe68eb42a3f469a7ddb8426~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/75/a1f8b4f7fef19e9fe68eb42a3f469a7ddb8426~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/b8/d8718419c9a8fd606a97d8fb09d0d30596937f~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/b8/d8718419c9a8fd606a97d8fb09d0d30596937f~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/ff/bd59ec7260f50e78ff51a1b38a78ef520e9f19~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/ff/bd59ec7260f50e78ff51a1b38a78ef520e9f19~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/description~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/description~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/hooks/pre-push~20240108-225931.sample lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/hooks/pre-push~20240108-225931.sample: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/1d/4f1b3f0b26a64117599a1751c62c969b9b1d62~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/1d/4f1b3f0b26a64117599a1751c62c969b9b1d62~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/33/e43575a5d2e58a8156630e7dcbe460813509f7~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/33/e43575a5d2e58a8156630e7dcbe460813509f7~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/39/e401fc411d9ed8d70c7c721a51c9b93bdd4be7~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/39/e401fc411d9ed8d70c7c721a51c9b93bdd4be7~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/84/e225b56e3f5d0a5bbfa60c20af3d7d59b96581~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/84/e225b56e3f5d0a5bbfa60c20af3d7d59b96581~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/a3/33a59a94cf225ab1d5fd952388aac91efc8b6e~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/a3/33a59a94cf225ab1d5fd952388aac91efc8b6e~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/a7/105e57164b981c1909c999658c3c5bc17a51ea~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/a7/105e57164b981c1909c999658c3c5bc17a51ea~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/hooks/pre-merge-commit~20240108-225931.sample lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/hooks/pre-merge-commit~20240108-225931.sample: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/hooks/push-to-checkout~20240108-225931.sample lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/hooks/push-to-checkout~20240108-225931.sample: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/3d/c67ff597f61ccf2fcfc98cbf4c71c52c9718e1~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/3d/c67ff597f61ccf2fcfc98cbf4c71c52c9718e1~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/4a/5bb44d50eed84a3791d24f58205e9346339f8f~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/4a/5bb44d50eed84a3791d24f58205e9346339f8f~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/a4/11f4f3656b84f4c63fc8913a8fbcc9bd314d07~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/a4/11f4f3656b84f4c63fc8913a8fbcc9bd314d07~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/bb/64f61a9223203e41aa63f3035535f09a372632~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/bb/64f61a9223203e41aa63f3035535f09a372632~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/bf/1cd649f880d9dc1e2da984cc8a880eace0bba8~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/bf/1cd649f880d9dc1e2da984cc8a880eace0bba8~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/c3/b233752b913196c1c3cb0c2e992a6152fd3783~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/c3/b233752b913196c1c3cb0c2e992a6152fd3783~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/d0/02fdda36571194b65954f0980ccd87f3cc4a5d~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/d0/02fdda36571194b65954f0980ccd87f3cc4a5d~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/e9/f52d00a3d9484a6e969abf5f55f00e0e3aa922~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/e9/f52d00a3d9484a6e969abf5f55f00e0e3aa922~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/info/exclude~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/info/exclude~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/8f/b36da392144244975c8296ed7b8dbba7b4ecc7~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/8f/b36da392144244975c8296ed7b8dbba7b4ecc7~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/hooks/applypatch-msg~20240108-225931.sample lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/hooks/applypatch-msg~20240108-225931.sample: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/hooks/post-update~20240108-225931.sample lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/hooks/post-update~20240108-225931.sample: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/14/c59c492ad190e37491391b79588abb3d9f1a29~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/14/c59c492ad190e37491391b79588abb3d9f1a29~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/ef/b197fcc8e9565577fa4f84571d48f244c222e7~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/ef/b197fcc8e9565577fa4f84571d48f244c222e7~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/4c/74324438bd47f65267e65c55f059849547d8e0~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/4c/74324438bd47f65267e65c55f059849547d8e0~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/92/b44af455aedb2af375b1ebc29188436564147f~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/92/b44af455aedb2af375b1ebc29188436564147f~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/a1/1c8131ba1c29d745a7908420bdce9b52351a35~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/a1/1c8131ba1c29d745a7908420bdce9b52351a35~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/e2/144582cc628e754d0462a9d6285ec5e147b534~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/e2/144582cc628e754d0462a9d6285ec5e147b534~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/f1/9b1141b499902c23024f9b6465a3e6055ee8d7~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/f1/9b1141b499902c23024f9b6465a3e6055ee8d7~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/hooks/fsmonitor-watchman~20240108-225931.sample lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/hooks/fsmonitor-watchman~20240108-225931.sample: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/hooks/pre-rebase~20240108-225931.sample lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/hooks/pre-rebase~20240108-225931.sample: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/14/ee6e71be69d6854dc2285c500621a7e383a435~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/14/ee6e71be69d6854dc2285c500621a7e383a435~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/3c/9436df5d1f15bc0ac764c9c7095d8d554dd5ac~20240108-225931 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/3c/9436df5d1f15bc0ac764c9c7095d8d554dd5ac~20240108-225931: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/9f/6077dc792ff56a7875c533ad63f0af71288744~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/9f/6077dc792ff56a7875c533ad63f0af71288744~20240108-225932: no such file or directory
2024-01-11 13:01:13 restore: experiments/certbot/.git/objects/e3/8f46d002d9703d037ea36b29be9f34771eb4bc~20240108-225932 lstat /Users/yushiyang/Documents/.stversions/experiments/certbot/.git/objects/e3/8f46d002d9703d037ea36b29be9f34771eb4bc~20240108-225932: no such file or directory
2024-01-11 13:01:15 archiving .mozilla/firefox/1hoenuhw.default-release/sessionstore-backups/recovery.baklz4 moving to .mozilla/firefox/1hoenuhw.default-release/sessionstore-backups/recovery~20240111-130115.baklz4

The path in the log appears correct. Could it be some file permissions issue on macOS?

I have Full Disk Access enabled for Syncthing.app (under Privacy & Security in System Settings).

Is that last item located in the same folder?

Do those failing items/folders have too strict permissions/ownerships (in the .stversions folder)?

No, the file on the last line is unrelated; I don’t think it’s part of the restore operation.

All files have permissions 664 and all directories have permissions 755, so it should be readable by everyone. The owner:group is me:staff.

Syncthing was perfectly capable of writing all of these files, and is perfectly capable of listing all of them in the restore selection view.

It is only upon actually starting the restoration that it claims to be unable to locate the files, which I find extremely strange.

Is this a bug of some kind?

Okay I just tried it again and it worked immediately. As far as I can tell I’ve made no meaningful changes to Syncthing or system settings, so I’m at a loss as to why it didn’t work before.

Thanks everyone for the help anyway.

Just as a side comment.

I made memes about how ridiculous what you are doing is, but decided to be more mature about this.

Syncing git repos is a bad idea, it will most likely get corrupted, as git is a precise set of files that need to exist at a point in time, a small screw up like checking out two different branches at the same time on different machines means that .git directory will go bad.

Sync git repos how they were intended to, by pushing and pulling.

You are not the first one doing this, and probably not the last one, but you’ve been warned and be ready to he upset syncthing - How to clean damaged objects in git repository? - Stack Overflow

Now for the real crazy part.

This made me hold my head in my hands, lose will to live and start looking for bridges to jump off.

Using syncthing versioning for something that has its own versioning (git has its own versioning via commits) is genuinely insane.

Even worse, seems you are genuinely using syncthing versioning to restore internal .git state :exploding_head::exploding_head::exploding_head: you are really asking for things that lead to you losing your dat.

Just stop what you are doing, take a step back and think whether you are using the tools the way they were intended to.

5 Likes
  1. You don’t know my use case
  2. Files are files

I think you need to calm down. And try not to be condescending while you’re at it.

You are right in that we don’t know your use case. Please share it with us!

Honestly, I also sync local Git repositories between my own devices, however I always make sure that everything is 100% synced before touching them on another device. I would never use versioning to restore anything but config-related files though.

1 Like

I don’t need to share anything with you.

But purely for the sake of argument: the .git directory was accidentally deleted on a local Git repo. By serendipity, it was synced with SyncThing and therefore there was a backup copy. Hence, restore.

Does this meet the standards your Official Usage Scenario?

Also consider whether you should be casually joking about offing yourself over trivialities.

No.

To begin with, Syncthing is not a backup tool as such. It can be used as “poor man’s backup” if you use it correctly and if you are aware of its limitations. This is not such a case.

Secondly, for reasons already stated by @AudriusButkevicius : Syncronizing and using a git repository in more than one location using a file sync tool like Syncthing is not expected to work in the general case. The correct synchronization mechanism to use for git is ‘git push’ and ‘git fetch’.

Are you illiterate? I explicitly said that it was serendipity that there was a backed up version in SyncThing.

I guess in your imaginary universe I should have just thrown my hands up and gone “Oh well the data is irretrievably lost, even though there is actually a copy there, but it’s not Officially Sanctioned Usage so I can’t touch it.”

Files are files. Oh no, it does not work in the general case, therefore we cannot use it at all! Let’s throw out Newtonian mechanics because it does not apply generally! Let’s throw out git while we’re at it, since it only really works with text files and not general files!

Some people actually know how git works. You’re like a toddler scolding its parent about playing with fire when they’re actually trying to cook.

You people are really living up to the socially maladjusted stereotypes.

A reasonable response that would have reflected well on your project:

Side comment: you really shouldn’t be syncing Git repositories using SyncThing, unless you really know what you are doing. It seems like you are trying to revert Git state too, which would be a really bad idea, and you should check out an older versioned commit instead.

What you wrote: very much not that.

What you wrote:

Ima make some wild assumptions about what you’re doing and that’s gna make me wanna jump off a bridge. :exploding_head::exploding_head::exploding_head:

Please calm down. Everyone. Yes, the reply from @AudriusButkevicius was a bit harsh, but believe me there were no bad intentions. There’s some history of people screaming at us for having broken Git repos because they were pointing Syncthing at them without knowing any better. You, @yushiyang apparently do know better and of course trying to salvage files after losing a working state is a valid course of action. You shouldn’t be punished verbally for other people’s past actions, but understandably the Git+Syncthing topic is a pain point for some of us.

Again, please calm down and let us focus on the actual problem. And please do watch your tone, which was somewhat unpleasant and aggressive.

On-topic: Sorry I have no experience with the restoring function, but others should be able to help. Maybe a little more logging context would help, the commands you ran, etc. It doesn’t seem like a permissions issue, as the error message clearly says no such file or directory. Unless you have an uncommon underlying filesystem?

Couldn’t you restore the files manually? After all, they’re plain files under .stversions and a decent bulk renaming tool could help you get rid of the timestamps semi-automatically. This manual approach could even be better to make sure you have a consistent state restored, not mixed between versioning dates. (Git objects named by hash should be immutable I think, that makes conflicts unlikely.) Are you sure though all files were actually versioned? Did the changes always originate on another device? Because Syncthing can’t version files when the modification happens locally.

Whatever you do, make sure to have a backup (ZIP, tar, …) of the .stversions folder in case something goes wrong.

Disclaimer: I also sync Git repos using Syncthing, but I know very well how it works and do take extra care to not mess them up by parallel usage. It’s more for the ability to start working on different machines, but never concurrently. Indeed very pleasant to have the working directory including all (yet) untracked files available without doing lots of the add, commit, push, pull dance.

3 Likes

Side note but related: is it OK to add a .git/ exclusion just in case we are crazy enough to put git repos in a synced path?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.