Migrate data folder on other partition

Hi,

I manage a Nextcloud server without problem, but i want to do one thing.
I would like to migrate the data folder into /home partition and in a specific user to facilitate backup of shared files.
My question is : is a good or a bad idea specifically for security and running without problem ? If it isn’t bad, what i have to take care of to do correctly things ?

Thanks.

usually the data of NC is owned by www-data user. this user should be as good as any other. Personally I would not touch it as you hit other problems then: webserver needs full access to the files and storing the files in ~ of another user could result in some drawbacks. If you still want to go this path maybe this thread is useful for you:

depending on your system you will find number of working backup solutions, just use search in this forum or follow official backup guide

Thanks for your answer wwe.

No problem to backup Nextcloud files it’s already done. I just want to backup files shared by users of the server. Does putting in the /home with a unix user in the “www-data” group is sufficient for security ? How about attacks, does hacker can more easily access to /home than the default data path of nextcloud ?

don’t get me wrong but I have the feeling we talk about different things. The official backup guide I already referenced covers complete backup of all data stored in your Nextcloud instance, including database, user content and application files. Depending on the kind of your installation there are different ways to perform specific tasks but the rule of thumb is always the same: you need database backup and content of the files directory to recover the system. app files give you a sweet to recover exactly the same state you had before (with/out issues carried with other version of the apps)

Hi,

Just for info.
I changed my mind, and i prefer to create a new partition and do a mount point at the default path of nextcloud’s users data. Backup data and deleting files on the place was before needed. No need to do anything like updating cache or database for the new path. Copying backup files on the new partition, and just don’t forget to updating SELinux’s policies if you have a Red-Hat like OS (Fedora, CentOS etc.)
and voila !