Migrating from CIFS share to an attached vmdk


I’m wanting to move my storage for my virtualised nextcloud server from being backed by a CIFS share on a windows server to being a vmdk attached to the virtual machine… Rebooting the windows box knocks nextcloud offline etc…

I currently have the cifs setup using fstab to a mountpoint /media/nextcloudData.
But want to move all the files to a “drive” presented to /media/nextcloudDataLocal

Can I just put nextcloud into maintenance mode then stop the service.
Use rsync to move all the files (100GB+) to the /media/nextcloudDataLocal
Remove the fstab setup (comment it out)
Change the mount location so the local drive now has the same mount point as the old CIFS (/media/nextcloudData).

Reboot the server
Start the service and then disable maintenance mode?

Will nextcloud notice that the data is now in a different location or should this “just work”…

Is there anything fancy I need to do options wise for rsync?

I use a few “apps” including, news, deck, notes, maps, talk…

Thanks for any help or guidance

Sounds like it should work to me. Make sure to copy file timestamps. Watch your permissions. I’m not sure what they look like right now, but normally www-data owns everything. And I would run occ files:scan afterward.

Thanks Karl

Anyone else have any thoughts on if it would work well?
or any suggested rsync commands? will def run the occ files:scan as well!

Just confirming those steps worked.
I used
sudo rsync -avz
then make sure you use df (to check mountpoints are correct) and sudo umount and sudo mount -a after making changes to fstab mount points to update them.