Getting 800 GB data onto new Nextcloud Ubuntu Appliance?

I have a Nextcloud Box RPi3 with Nextcloud Ubuntu Appliance

This is how I get all my data (approx 800GB) onto the external disk

  1. Connect to Box disk to Laptop with USB and copy files over using
    sudo su
    cp -R Local_Directory Directory_on_Box_hard_disk

  2. Re-connect and re-start Box & connect via SSH

  3. sudo nextcloud.occ files:scan --path="Nextcloud_user_id/files/name_given_to_hard_disk_in_Nextcloud_web_interface/Directory_on_external_disk"

  4. sudo nextcloud.occ files:scan --path="Leigh/files/Disk/Leighs Documents"

  5. sudo chown -R root:root /media/usb

This all works as far as being to access all my data on the Box via the web interface

However, when I try to sync with the data (that I just copied over from the laptop in step 1. above) using the desktop client (all updated) on my Manjaro laptop, something is not equal and it tries to copy loads of data over from laptop to box and crashes before it finishes.

I also tried to ‘bite the bullet’ and just start from an empty Box and sync the data over from the laptop using the desktop client (despite the prediction of weeks of time to do this) butin this case the same thing happens, and after a few hours the Nextbox Rpi crashes.

So, now I am thinking of taking the approach of trying some slightly different approach to copying over the data (step 1. above) using cp or rsync with some extra options to try and make the data transferred to the box identical to that on the Laptop.

The trouble is, what should my definition of ‘identical’ be?
same owners, permissions, timestamps etc? (I vaguely understand some of these points)
i.e. cp -rp ?
Can anyone help me, please?



I think one mistake is the user “root” for the files. Please compare it with your old storage. Normally the webserver (e.g. www-data) owns the files.

Thanks for idea @devnull, but not on Nextcloud Ubuntu Appliance, apparently:

Maybe off topic here, but take your RPi, install Ubuntu 20.04 from here. When done, install the Nextcloud VM with the script provided here:

Problem solved.

It seems that by simply using the -p option when copying the data from the Laptop to the Box hard disk worked :smiley:

I edited my other post as a guide for anyone using the same setup.