NextCloud working on two directories... How to merge them?

Hi All,

I am very new to NextCloud. I installed it on a Raspberry Pi 4 a couple of weeks ago. I essentially followed the instructions here: https://docs.nextcloud.com/server/20/admin_manual/installation/source_installation.html

The OS is Raspbian.

I first installed nextcloud on an external USB key, but I found out it was to slow. So I copied the nextcloud directory into /var/www and modified the Apache files accordingly. So I just realized that when I upload files, they still go in the old directory on the USB key. How can I fix that? I want everything to be on /var/www/nextcloud.

Thanks for any help!

Hi, this topic will help you a lot to move your data folder: HowTo: Change / Move data directory after installation

Hi @gas85,

Thanks a lot for the link! I applied what it says, with the difference that I had to merge the two directories, which I did like so: $ rsync -a /old/nextcloud/ /new/nextcloud/.

I pointed my browser to my NextCloud server, and I see the following:

Should I go ahead with the update? I think it would tend to show that I did something wrong… Maybe I should have rsync’ed only the data directory?

Thanks a lot for your help!

1 Like

Yes. Only data-dir. But “rsync” only copy not delete. Check the dirs and config.php and then update if needed.

1 Like

Hi @devnull,

Thanks for the correction. OK, it seems everything worked fine. I can see all my files, everything looks good.

Thanks!

2 Likes