I am installing a Nextcloud 20 server on a Ubuntu system.
I have about 2 TB of data that I want to copy to a dedicated disk (these are two disks combined via LVM).
For the moment this disk is empty, I need to copy the data to it, in the directory defined for this purpose during the installation of Nextcloud.
If I use Nextcloud’s synchronisation tool, the copy will take me at least 1 or 2 weeks.
If I connect a disk to my machine and copy the files “manually”, via the Ubuntu file manager, it will take me about 48 hours.
The time saved is more than appreciable. Will this procedure cause any problems?
For example with regard to access rights and the user concerned, normally the access rights to Nextcloud data folders are assigned to “www-data”. Will copying the files myself cause problems? How, if at all, can I avoid them?
I can’t tell you if it is safe or not since I am still having trouble with installing and using certain apps on my setup but this is my experience.
I have Ubuntu 20.04 new install on a dell T610 with a bunch of 146 GB drives ( 6 or so) using LVM.
I also have Virtualmin on that server and a virtual host “mydomain.com” where I have manually installed NextCloud. I had tried a snap install but it was APITA so I removed it and installed manually. I didn’t actually install into a NextCloud folder (which may or may not be problematic) but I do have the whole thing running.
I placed my NextCloud data folder outside of my html_public folder. I had about 100GB of files that I needed to place into user folders (my old owncloud system died so I was pulling the data from a backup of the owncloud data folder)
I mounted a USB drive onto my server in order to access the files from my backup and copied these files from the drive to my designated NextCloud user folders inside the NextCloud data Folder.
I had recreated all my accounts and had logged into each in order to create the base directories but you can also create these manually. I then copied the files over using the directory setup I wanted into the appropriate user directories.
Once My files were copied I ran the occ files:scan --all command
When I logged into my accounts all the images were available in the directory structure I had defined.
I did have ownership and permissions that were not correct so I just set all ownership for the Nextcloud data folder afterwards (for some reason in my case its the VH owner and not www-data, as all the docs seem to indicate) and set all file permissions to 0640 and directory permissions to 0750. I’m not sure if those are correct as I was unable to locate this information anywhere.
My site is running fine for file management and I have tested the talk and video chat which works well. I have been seeing some error on the mail app and the duplicate finder app but I am still trouble shooting those.
Thank you for the answer. We seem to have a similar installation path
I’ve tried also SNAP at first but wasn’t happy with the result.
I’ve achieved yesterday my third regular (not snap) install attempt and…suprise ! It seems to work…I’m still holding my breath for now thought …but copying files manually (approx. 400 000 files, 2 TB of data, 24 hours of copying) went fine this time…
I’ve not tested yet apps.
Have you tried to add www-data to VH owner group ? This may help somehow as both will share the same permissions.
As you seems to be ahead of me in your installation, maybe you already have some answers to this question too ?
LOL, I actually did add www-data to the VH owner group. But I forgot I was going to go back and remove it to see what happens. Thanks for reminding me. I’ll go back and test that out.
Edit:
I did go back and change ownership of the directories and folder and also removed www-data from the VH owner group. The changes started causing all sorts of permissions errors that I was not able to figure out. One appeared to be access to a .htaccess file which I assumed was the one under public_html but from what I could see www-data did have complete ownership of and access to. Maybe it was a file located outside of the public_html directory.
Anyways, since I had it working using the VH owner, I reverted my ownership back and added www-data to the VH owner group and it all appears to be working fine again.
I believe the Mail and Duplicate Finder App problems are another issue.
LOL, its a home server that I have physical access to. If I need to I can always reinstall the whole thing again. I also have a spare server If I want to set it up and get it running.
Since this is not a server that has many users I don’t have a problem experimenting on it while its live. I wouldn’t do that on my other Live servers that provide access to mail and active websites.
My Nextcloud install is basically a place for me to store all my photos and extended family photos and files.
I do have some siblings providing data but the job of scanning, organizing and cleaning up close to 100 years of images from family members has fallen to me. As long as i maintain a backup of those files I’m not too worried about how I present them to everyone else.
I am hoping to set this system up with a better backup system so I am not maintaining duplicates and can easily store data on removable drives and offsite.
A work in progress.