IncusOS backup to NAS/USB drive/etc

Hello there,

Currently setting up an old PC (singular) to be my home server. Now that I’m very satisfied by many aspects of how this works (secured down to secure boot, zero admin work, etc), one thing is lacking: a decent disaster recovery plan.

Typically, I have a NAS (so SFTP, SMB, something like that) sitting next to the server to which I would like to do regular backups of everything automatically. And then said NAS is itself backed up offsite and so on, so my goal is really to drop some files in that folder and that’s it.

From what I see, some intiatives allows to backup from one server to another, but this does not seem to be covering my use-case.

My understanding is that I would have to do the following:

  • Whenever anything significant happens, take out a incus admin os system backup and store the resulting file in my password manager
  • Export the project list as a JSON file
  • For each project
    • List profiles, networks, ACLs as JSON and store that
    • For each custom volume, call incus storage volume export --compression zstd --volume-only ...
    • For each VM, call incus export --compression zstd --instance-only ... (or whichever compression I’d rather have)

This would essentially run from a VM/container inside IncusOS, which would connect to the NAS and stream all the files. And finally, in order to make this all restorable, there would have to be some kind of script which re-restores everything in backwards order on a clean instance:

  • Factory reset
  • System restore
  • Create all projects
  • Create all profiles, networks, ACLs
  • Create all volumes
  • Create all VMs

Is this the “right” way? Are there tools that can do this in a more automated way without me having to develop all this?

Thanks in advance,
Rémy

Hey,

I am, more or less, at the same point as you are. I really like incus and incusOS and wanted to give it a try in my homelab and I was missing a proper backup(plan) as well. So I started the iab-project, which you mentioned.

In the first place, I wrote this to solve my backup problems. Now, we are working on to extend iab to check more boxes and I am currently working on the the target side of the project. We want to allow multiple targets and other target endpoints (like S3, STFP, usb, …).

So feel free to join us in a way that suits you (ideas, code, etc.).