Changing datadir to a location in another Hard Drive

This should be fairly simple, however I like to ask when I am not too familiar with somehting. So here we go:

System Info:
|NextCloudPi version|v1.34.7|
|NextCloudPi image|NextCloudPi_03-28-20|
|distribution|Raspbian GNU/Linux 10 \n \l|
|USB devices|sda|
|data in SD|no|
|data filesystem|btrfs|
|data disk usage|579G/1.9T|
|rootfs usage|3.3G/29G|
|Nextcloud check|ok|
|Nextcloud version||

As you can see I have the nc-datadir to an external 2TB hard drive (579G/1.9T). Soon there will be no space in this drive, so I plan to move the nc-datadir to another hard drive probably 5T.

Ideally, I would like to move the existing datadir to the new hard drive and continue uploading data from there.

This should be fairly simple. Please see below and correct me:

  • I will shut down the RPi device and remove my current hard drive.
  • Plug the current hard drive to another linux computer I have, loggin as root, transfer the ncdata directory to the new hard drive (which will also be BTRFS format) using a sync program (I like FreeFileSync).
  • PLug the new hard drive to the RPi4.
  • From another device I will log in to the nextcloudpi GUI and set the Data directory under nc-data to the new location.

That should be all.


Bump for attention. Anyone had the chance to proofread the logic behind my plan?