Move all personal files and directories (not data) with shared links to other disk

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 16.0.3
Operating system and version (eg, Ubuntu 17.04): Debian Buster
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.38 (Debian)
PHP version (eg, 7.1): 7.3.8

I have an 8 TB USB disk with 2.5 TB of personal information (photos and videos). Recently I bought two 4 TB hard drives to mount a raid 1 and have the data more secure.

I have many folders shared through links and I need to move all the information from the usb disk to the raid. In the past, when I tried to move folders through the web interface, if they take up a lot of space, it has sometimes failed.

Is there a way to move information from one disk to another in another way without losing links and without using the web interface?

Greetings and thank you.

Is your 8TB mounted somewhere and this place has being added as external storage local folder? If yes, then:

  1. Stop your server and make DB backup.
  2. Copy your Private data to the RAID to some subfolder, e.g. myData
  3. Unmount your 8TB USB
  4. Mount your myData folder from the RAID to the same place as it was mounted as it was 8TB USB.
  5. Start the server run rescan command: sudo -u www-data occ files:scan --path user_id/files/8TBmount_name and check if it works afterwards.

If it does not work: stop the server, restore DB and mount 8TB back :grinning:

You can also try to use NC Client:

  1. Syn folders from 8TB
  2. Move them locally to “RAID” Folder and Client should do the job. In this case shared links must be saved. Be aware about this ticket:

In the end I used a “trick” that is not exactly what I would like.

I have mounted the 8Tb disk in /media/disc1, and I planned to mount the raid in /media/raid. I have stopped Apache and cloned with Rsync the contents of the usb disk to the raid keeping the owners and permissions.
Then I changed the folders where the disks are mounted in fstab, the raid is mounted in /media/disc1 and the usb in /media/usb8t.
I have restarted the server and Nextcloud has not noticed the change, I still have everything in order. It is not the perfect solution but it works for me.

Greetings and thank you.

1 Like