kvbox.cloud
Self-host

Backup store

Keep box backups on a disk of your own, on one of your hosts.

Backups need somewhere to live. A backup store is a host with a disk for them: kvbox-server backup setup runs Garage (an S3 server) with its data on that disk and tells the control plane. From then on backups are kept there. Without at least one store, kvbox vm backup create answers that backups are not set up.

Set it up

Mount the disk first (any filesystem, any size), then, on the host:

kvbox-server backup setup --path /mnt/backup-hdd

The host must have joined a control plane. The command downloads Garage the first time, makes one bucket and one access key, and registers the store. Nothing is opened on the network: backups come in through the port the control plane already uses (7777), so a host behind a relay needs no change.

The path has to be on another disk than the host's boxes, or the backups would be lost with them. --force skips that check, for a test.

If the control plane could not be reached, run the same command again: it keeps the same key and only registers.

A store host that leaves the control plane keeps its store: its backups cannot be restored or added to while it is away. After it joins again, run kvbox-server backup setup with the same path, and they are back.

Look at it

kvbox-server backup status
path           /mnt/backup-hdd
storage        running
disk           412.0 GB used of 3.6 TB, 3.2 TB free
backups        398.4 GB in 101992 chunks
key            GK31c2f218a2e44f485b94239e
control plane  knows this store

--json prints the same as JSON. The daemon keeps Garage running: it starts it again after a reboot or a crash, and leaves it stopped while the disk is not mounted.

Which store a backup goes to

  • A store on another host than the box, when there is one: losing the box's host then does not lose its backups.
  • Otherwise the store on the box's own host.
  • A store that is not answering, or has no room for what the backup adds, is skipped. When none is left the backup fails and says so; add disk space.

Each store is on its own: a backup lives on exactly one. A box's later backups go to the store that already has most of its data, so they stay small.

What is on the disk

Encrypted 4 MB pieces, under names that say nothing about who they belong to. The keys are in the control plane, never on the store, so the folder is of no use by itself: do not edit it, and do not copy single files out of it.

A store's disk is a single copy. Put it on a mirror (RAID 1) if losing that disk must not lose the backups.

If the disk dies, mount the new one at the same path and run kvbox-server backup setup --path <path> --new-store: a new, empty store takes its place, and the backups that were on the old disk can no longer be restored. Without --new-store, setup refuses a path that does not hold the store, so a disk that is simply not mounted is never mistaken for a new one.

On this page