My server fell over and was too complicated for me to fix as I don’t have the knowledge. Also there were some hardware issues so I have set a new machine up with a brand new (as of today) installation. I am using Nexcloud on Docker using OpenMediaVault V6. We have devices that sync to Nextcloud; two laptops and a desktop, all running the client.
All of the files that we need to keep are on the laptops and desktop, so I’d like to keep them under ‘Nextcloud’, not ‘Nextcloud2’ and sync them all back over to the new instance of Nextcloud.
Can somebody knowlegeable guide me through this if its possible, please?
Start by making a copy of the existing folder in case of any mishaps.
I would rename the existing folder, let it create and sync the new empty Nextcloud folder, and then move the contents back in and let it sync it all. It’ll take some time, but this is probably the safest approach.
Sadly, I last night disconnected the Nexcloud client on my machine and, after rebooting this morning all my directories had vanished! Luckily, I managed to boot up the old server. Nextcloud isn’t available there and I don’t have time to look into it at the moment as I’m off to work.
However, I did manage to ssh into it using FileZilla and I am currently copying all the files back to my Windows machine.
Unfortunately, many users still believe that if you use a client and server, you have a backup. This is not the case because the data or not-data is on both sites the same (if sync is used).
Either you have to backup the data locally (e.g. on an external USB hard drive) or you have to backup your Nextcloud on the server side. If someone uses Managed Nextcloud buy a backup service from the provider or manage the backup at home.
Nextcloud is no backup. For backup search other tools.
Thankfully, it seems my files are safe. I’ve looked into backing up before but never really found anything that suited my level of knowledge with regards to the inner workings of OpenMediaVault, Docker Nextcloud, the command line, etc.
What I’d really like is to be able to periodically (manually) mirror the system drive and data drive so that I could just plug either one or both of them back in in the event of a failure but I’ve never really come across anything that I had the ability to set up.
I think i will definitely be backing up the files to USB in the future though - that would at least keep those safe.
Yes SSH. For administration a server you normally do not need a GUI. Especially in case of an error (worst case) the GUI may not work at all. You should definitely build up Liux knowledge on the command line.
But I also think that your GUI can make a backup (data and database) and that you might get it restored. Try to see if this really works.
Because of the way disks are mounted, it’s unlikely you could set them up to be swappable without at least a little CLI intervention.
I don’t know anything about OpenMediaVault, but if it has some sort of built-in backup utility (or one can be installed), I suggest using a USB external drive for the backup.
While a disk mirror is ok to protect against complete system failure, it doesn’t have multiple backup revisions, so it’s useless in cases of data corruption, ransomware, etc. as the bad data will simply be backed up and overwrite the only copy. Something to bear in mind as I don’t really recommend manual backups either… since people forget to do them regularly.
Sorry - just to be clear on this as its been a long time since I’ve set the client up:
My (PC) now has no Nextcloud directory, so is it best now to just set up the client and tell it I’ll set the sync directories up later, then drag my backed up ones into the ‘Nextcloud’ directory and let all of them (and their contents) sync up to the server?
@KarlF12, all going well now and thanks for the guidance. My wife has a gazillion photos so can I scp or rsync (once I learn how) these files and does nexcloud need to scan them or something afterwards?
Thanks - I don’t understand the term: “Run occ as your HTTP user” Does this mean I need to go to a certain place (directory) before I use it? Sorry but I’m new to the CL - I always use root when i use it (I know, I shouldn’t!)