I have no support/technical question and have seen the support category. (Be aware that direct support questions will be deleted.)
on
Which general topic do you have
Hello all,
Not sure if this fits a support question. I would like to use syncthing to backup the data folder to another server (also running syncthing). I have setup syncthing on the mathing running nextcloud and run it with the www-data folder. Is there something I should be aware of doing it this way?
I started the process but the machine froze and when accessing the nextcloud interface it complained it couldn’t find or access the .ncdata file.
Is anyone using syncthing to backup the data folder?
that would be expected, since you’re trying to “clone” a running instance including data on os level which is bound to fail, either on the database side or as you’ve experienced with the .ncdata file which is instance relevant. prefer copying/cloning/syncing the data only.
yes, consider this;
you’re using syncthing to copy raw data on os level… the nextcloud database is unaware of anything taking place on os level. thus your database will not be aware of changes and will need to reread those files with occ files:scan --all.
it would be more flexible if you were to use something like rclone for syncing/copying files/directories between instances using webdav, as that would be database aware from one instance to another incrementally.
IMPORTANT
Synchronisation is NOT Backup!!
in addition rclone is easily scripted and can be added to cronjobs at will. Here’s an example of how to synchronise notes from one instance to another via script, the syntax is similar to rsync.
Thank you for the detailed response! When you say that the database is not aware of changes what does that mean in the context of syncthing doing its thing (i.e. sending the files one way to a remote location?). I most definitely do not understand how syncthing is operating but I was under the impression that it doesn’t change the files is sending one way only.
If that’s the case then what makes rclone any different? or rsync? Or any type of sync must be done via webdav to not break nextcloud?
OK so from what I read, it appears that syncing is only possible between a nextcloud client and the nextcloud server or (not sure I go this) with federation between nextcloud servers.
So for a backup I need to copy the data to the backup server which inevitably require maintenance mode while the data is sent over.
If this is correct then that means that with something like borg backup I will have to wait until the intial copy is made then setup something with cron and send the incremental changes sometime when there is no activity on the nextcloud server.
bar having any experience with syncthing you could try to exclude the active parts of the server like .ncdata and the database, thus only copying raw user-data… not sure if that helps though?