Syncing a collection of files across directories

I am working with projects, each project contains an .org file and usually is synced int a git repository. I want to sync all org files from all my projects to my cellphone to use Orgzly.

For this I have tried the following:

  • Symlink all .org files into a directory and share this directory with Syncthing – doesn’t work because Syncthing doesn’t like symlinks
  • Keep all my .org files in a directory and share that with Syncthing and symlink them back to their git repositories – doesn’t work because git doesn’t like symlinks
  • Use hardlinks – doesn’t work because the inode of a file updated by Syncthing changes
  • use mount --bind, the sync doesn’t finish there is a temporary file but the log shows the following error:
2021-11-20 14:40:29 Puller (folder "org" (hwcdu-kqyah), item "file.org"): syncing: removing item to be replaced: remove /path/to/file.org: device or resource busy

I am running out of ideas, maybe some one else has another idea.

My ideal interface would be to have the possibility to sync out of directory files, e.g. using .stignore with an entry like

!!/path/to/out/of/dir/file

I’d sync the directory a level above all the org stuff and ignore all non-org files.

That would be my home directory, this would be a bit too much, maybe I just have to sync each folder separately and just exclude all files, except the .org file…

Do you think adding files from outside the directory via .stignore would be a useful addition to Syncthing?

You could create a suitable directory then.

No, that’s pretty much guaranteed to not happen.

1 Like