Articles

Back up volumes once

A volume is backed up as a unit of its own, once per run however many jails attach it. Leave volumes out with --no-volumes, restore a volume or a jail with its volumes, and what happens to an encrypted volume.

Once

The data, not the jails around it.

A backup policy takes the volumes of the jails it selects, and the volumes whose labels match its selector. Each volume is taken once per run, however many jails attach it. The backup of a jail holds the jail and the names of its volumes, not a second copy of their files.

on the host
$ jailops backup run nightly

Leaving them out

A switch for policy and for a run.

on the host
$ jailops backup policy create nightly --no-volumes --schedule "0 2 * * *" --target offsite --selector env=prod
$ jailops backup run nightly --no-volumes

Use it for a volume that is somebody else's job to back up, such as a directory of a storage box.

Restoring

The jail brings its data back.

Restoring a jail also restores the volumes it attaches that the project does not have, each from its newest backup, before the jail. A volume the project already has is attached as it is and never touched. A volume backup can also be restored on its own, as a new volume with its owner and mode. --no-volumes restores the jail with no volume attachments at all.

The restore tells you what it will do first, including the volumes it would bring back.

Encrypted volumes

The key stays with you.

An encrypted volume is backed up while it is unlocked, and a locked one is reported and left for the next run. Its files go to the backup node encrypted, like every backup. Restoring one needs its passphrase, which you give with --passphrase-file, and an encrypted volume is restored on its own, not along with a jail.

More articles

Try it on one server.

Try the console from the screenshots, install on a clean FreeBSD 15.1 machine, or add JailOps to a host you already run.