Nextcloud initial data upload


I have a large amount of data to upload to my own instance of Nextclould server.
Ia have copied all of it using external drive (I have physical access to server) and imported it locally.
Now I need to sync but as soon as I point source folder (my PC) and destination folder (on nextclould server) client starts to upload all the files. Contents of the folders are the same so it should do some kind of rsync to do this instead ? IS it posible to avoid uploading it all trough my slow and capacity caped connection ?

The issue is, that just “importing” the files to your home folder on the server doesn’t do it. All files must be scanned and are organized in the database. You can try to import the files and afterwards force a file-scan on your NC instance via the terminal by issueing a

sudo -u php <path/to/nextcloud install/occ> files-scan --all

This way the files will be know to the NC instance and you might get away with a compare-and-sync, while not needing to upload all the data again.

I know that simple copy paste won’t work. For that I have another workstation which is syncing those files on local network. Then when i point to folder with same content on another PC then instead of fast sync client starts to send this files again.

Step 1)

on nextcloud empty folder:

on PC #1 connected to local network also empty folder:

on PC #2 connected to nextclould through Internet, folder already contanins files but is not synced with nextclould:

Step 2)
From USB drive i have copied files onto PC #1 to folder above and waited until sync is done

Step 3)
On PC #2 I have created sync link between local PC folder and nextclould.
At this point all three folders have same contents but client on PC #2 instead of fast file sync uploads all of them (it is not creating any conflict files)

So, you’re saying that you copied the files from the USB drive onto PC1’s sync folder and waited for PC1 to finish the upload to NC. Afterwards you configured the local sync on PC2 against the same user on NC and all files where uploaded again?

exactly that’s what happened.

That’s weird, since I have already re-attached my MBP numerous times to my NC account and it never uploaded all the files again. Are you sure, that the files on your PC2 don’t appear to be “fresher”, e.g. by having a creation or modification date which is younger than the ones on the server?