Backup Strategy question

Hello All. Loving Nextcloud. That said I have a question as to how everyone out here is backing up their files NC files and databases. Basically, we deployed NC on a Vultr server using block storage. Works pretty good. But as we know NC is not a backup solution. Everything syncs even if it is a ransomware encrypted file. So I was thinking of spinning up another Vultr box or even add another block storage feed and setup some sort of Rsync solution. But I was thinking it might be best to replicate to a different VPS or even something onsite to not be tied to one specific VPS provider. And the ability to pull in “Snapshots” from previous files would be great. For instance, if someone deletes a file 2 weeks ago and wants to get it back.

Vultr does not offer snapshots on their block storage at the moment.

So how are others backing up their NC or OC files at databases ?

Thanks for any info

I have one backup at home on a local external disk. I run rsnapshot, which allows you to keep the state of different versions (last x days, last y weeks, …) and it uses hardlinks to save storage.

Great Info!..Thanks much. This does looks like a nice solution. I think it might be a good idea to set this up on an inhouse device (as you did with home) and sync everything locally to a nas or external drive. The run something like rsnapshot internally to keep versions of the files.

I guess I am just concerned if the VPS provider goes down hard or out of business. Who knows. Gotta have that data somewhere else and I would prefer the backups to be in the building.

Thanks again

one addition: don´t forget that you need to take care of 3 things to backup:

  • the data folder
  • the database dump
  • the config.php (for settings & keys)

in my case its a nightly bash-script which stores the data on a NAS.

and just to be save: don´t forget to practice a restore from time to time to ensure that everything is working :slight_smile:

I have a backup script that runs nightly.

For data and config files it does a master backup once a week and an incremental one every other day.

It also backs up the database.

I probably also should backup extra apps for convenience, comes to my mind.

Everything is compressed into a tarball, encrypted and transferred to an FTP server (backup space granted by my hoster).

I replicate my servers with zfs send/receive: Dataserver01 and Datasever02 (same for DB)

  1. dataserver01 local zfs has a hourly snapshots
  2. every 24hours dataserver01 pulls the data incrementally to datasrver02

Why zfs:

  1. on fs or hw corruption the scrubbing can point the impacted files directly.
  2. snapshots are helping to prevent the user data loss(unwanted bugs in client, user mistake in shared folders, etc…)
    3)send/recieve is extremity fast when you have many small files(>1M).

That’s all fine and dandy, but what do you do when you have a hosted nextcloud server? How can you take a backup to a third party?