Inexperienced user. How to move old data to fresh install?

I had to reinstall Nextcloud after some redis issues arising from an auto update. I’ve used Nextcloudpi for this and my original install. How do I move the data from my old install to the new one? I’m a completely novice and what little I learnt during the original install I have forgotten in terms of the commands etc. I need to find the folder name and then move the data, or point Nextcloud to the folder.

I’ve looked at other topics but my knowledge is very limited.

Just sync your data again.

I’m talking about the data on the hdd of the Nextcloud device. Not sure how to do what you’re saying.

Just copy the data to your workstation and sync it again with your new instance of Nextcloud.

I appreciate the suggestion but I don’t have the hard drive space to do this. There’s also the issue of the nextcloud drive being formatted in ext4 and my computer being ntfs

Copy the files to the user(s) directories on the new installation, e.g. /var/www/nextcloud/data/myname/files/ …

Afterwards, do a “sudo -u apache php /var/www/nextcloud/occ files:scan myname” (or www-data, if you use a debian-based distro)

If you have more users, do a “sudo -u apache php /var/www/nextcloud/occ files:scan --all”

2 Likes

How do I locate the previous user directories and copy the files?

First create all users via WebUI in your new instance.

find / -name .ocdata

…should give you the path of the data folder. If both folders are on the same disk, they should both show up. Inside this folder you should see sub-folders named by the usernames of your users. Copy the contents of the old user folders to the folders of the new installation.

cp -a /path/to/sourcefolder/. /path/to/destfolder/
1 Like