Is there a way to speed up syincing directories that are TBs in size?

I thought by copying the contents to the Nextcloud data directory directly (via rsync) then sync the folder would make it faster, but I was mistaken.

Copying the folder to the Nextcloud server (running on Pi 4) took only roughly 10 hours, but syncing via Nextcloud will take me +/-6 days!

Rsync and nextcloud don’t use the same protocols.
One doesn’t use SQL.
The bottleneck is your raspberry pi.
But even with a good server you won’t get faster than rsync.

What you can do is do a rsync for having the folders inside the pi. Then put those folders in your nextcloud user data folder (/whereyournextclouddatais/myuser/files) then perform a chown on those folders :
chown -R www-data:www-data /thepath
After that perform a scan :
sudo -u www-data php -f /var/www/nextcloud/occ files:scan myuser

After that Nextcloud have all your TB in your user folder.
Then next syncs will be quicker because you will just modify some little files.

1 Like

Totally forgot about the database component. Thanks!