Backup and so on

Dear all,
I have a question regarding the backup-function… I am running docker/nextcloud on Dietpi, which runs on an old Chrome-OS PC. On an external HD the Nextcloud DataDir is established.

I now try to build a serious backup for following troubles:
a) PC crashes
b) external HD crashes → my idea is to set up a second HD and to dd the first one

ad a: I am running a nightly cron-job within DietPi and back up the system on the external HD.

What happens when die Chrome-OS crashes really bad? Can I use the DietPi Backup to completely rebuild my nextcloud? Are there any further steps neccesary?

Many thanks in advance
Karl

You can reflash the system and restore the backup on first boot or when you are able to reboot, you can of course restore into the running system.
dietpi-backup has also an option to create automatically backups, so you don’t need to use cron.

https://dietpi.com/docs/dietpi_tools/system_maintenance/#dietpi-backup-backuprestore

Maybe our blog post give some hints about the dietpi-backup usage: DietPi-Backup in an multi-device environment - DietPi blog

Here you have to be careful with the terms and expectations of certain functions.

Basically, we have to distinguish between

  1. System backup
  2. Backup of an external HDD
  3. Nextcloud backup

to 1)
Only the operating system is backed up with the dietpi-backup tool. All external HDD/SSD are excluded by default and must be backed up separately

In the event of a system crash, the backup can be restored on the same hardware. It is not possible to change the SBC with the backup. In other words, from an OrangePi to a Raspberry Pi or similar. Or from an ARM SBC to an AMD native PC. At most, the whole thing works with SBCs that share the same image.

to 2)
Here you could use dietpi-sync to regularly copy or synchronise the HDD from one disk to another.

Or you can create your own rsync script.

to 3)
If NC is located on a local device and not on a mounted HDD, everything is also backed up by option 1. However, if NC is located on an external hard drive, option 2 applies. In both cases, however, you should possibly make a separate database backup of the NC MariaDB DB (sql dump). This allows the DB to be restored directly during a new installation in case of doubt.

2 Likes