Hey @luciandf welcome back
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
.
Example sync script:
#!/bin/bash
## Sync notes NEXTCLOUD-00 <--> NEXTCLOUD-01
/usr/bin/rclone sync NEXTCLOUD-00:/Notes NEXTCLOUD-01:/Notes -P ;
exit
Example copy script:
#!/bin/bash
## Copy notes NEXTCLOUD-00 --> NEXTCLOUD-01
/usr/bin/rclone copy NEXTCLOUD-00:/Notes NEXTCLOUD-01:/Notes -P ;
exit