Move all data from Volume A to Volume B…

Hi guys,

A few months ago I started an experimental project with a Nextcloud server and now I would like to make a really small change: replace the current disk with a faster NMVe driver. I was not able to find neither an occ command, nor any documentation about it.
I need to transfer about 500GB of files so I would like to do it on the server⁽*⁾, not ask my family to copy data from the old nextcloud volume to the new one on their computer and make a lot of network traffic.

What is the best method to perform this data migration on the server without problems with permissions, MySql DB, indexes, previews, etc.?

Many thanks in advance to everyone.

Sincerely,

Ste

⁽*⁾ this seems to be the easiest way, ed.

Hi.

This is under linux

moving nextcloud data from /mnt/location1 to /mnt/location2 is mostly manual.

Several steps need.

  • First: stop apache/nginx and put nextcloud in maintenance mode.

  • Second: move /mnt/location1 data’s to /mnt/location2
    in my case, my dta’s directorie is /mnt/raid6/nextdata

  • third: modify /www/… …/config/config.php for nextcloud ( in my case )
    'datadirectory' => '/mnt/raid6/nextdata/',
    could be change to
    'datadirectory' => '/mnt/raid6/nextdata2/',

  • Fourth: restart your apache/nginx, end maintenance mode,

  • Fith: do a occ file:scan

Done.