Copy entire nextcloud data directory locally?

Let’s say you had a new laptop and wanted to copy your 1 TB nextcloud data onto your device.

What would be the most efficient way to do this initial data transfer?

My nextcloud server has its primary data directory on a USB hard drive. Could I simply power down the server, plug the USB drive into the new laptop, copy the files, and then restore the server and do a sync?

Would it be faster to do that, or to somehow share the files over a LAN? Or just access nextcloud over HTTPS but directly on the LAN instead of over the internet?

  1. Which way is Nextcloud designed to work?
  2. Which way is the fastest?

Thank you for your experience.
T.m.G.

Using the sync client on your desktop would be the intended method. If you don’t mind cabling into the network and letting it run overnight, this would be my suggestion.

You can do the USB method. I discourage people from messing with their data dir unless it’s really necessary. Since the database will have no idea you put stuff there, you have to run an occ command to rescan your user’s files.

2 Likes

as you plan to download to your new laptop, the usb way would notc be a probem, but it depends on the os on your laptop (probably windows) and filesystem of the hdd (most likely ext4 or btrfs) which may not be supported by windows ootb. You could install a fs driver tosupport that, but then it mifht be just easier to sync down overnight…

Just a warning… USB connected devices can sometimes disconnect unexpectedly, especially in MS Windows.

Here’s one example of many in the Microsoft forums…

https://answers.microsoft.com/en-us/windows/forum/all/my-usb-ports-are-disconnecting-and-reconnecting/3795aa1d-c28d-4dd4-b6ef-2f1b13e7026c

Not saying there will be a problem, just indicating that some persons have reported issues from time to time… and maybe it might be a better idea to connect the drive in some other way especially if it’s going to be expected to run unattended overnight in a backup data operation.

so better stay away from outside, there are reports of people being struck by lightning…

Yes.

Of course, that was the purpose and intent my post. You’ve won!