Skip to content

bxp backup

Copy the CA's data directory, safely while the server runs.

Usage

Copy everything in the data directory to a new directory: the keys,
the certificates, and a consistent copy of the database. It is safe
while "bxp serve" runs.

Keys and database belong together: without the database the CA no
longer knows what it issued, and cannot revoke it.

Not in the backup, on purpose: the configuration file, and the
passphrases. Back those up separately. Keep the backup as private as
the data directory: unless the keys are encrypted, it can issue
certificates.

To restore: stop the server, put the copy in place of the data
directory (owned by the server's user, mode 700), start the server.

Usage:
  bxp backup [flags]

Examples:
  bxp backup --config /etc/bastionxp-ca/bastionxp-ca.yaml --out /backup/bastionxp-ca-$(date +%F)

Flags:
  -h, --help         help for backup
      --out string   the new directory to write the backup to

Global Flags:
      --config string   path to the configuration file (default "bastionxp-ca.yaml")