How to backup and recover BindPlane OP when using Bolt Store
When BindPlane OP is configured to use Bolt Store as the storage backend, a bbolt database on the filesystem is created. Bbolt is a high-performance database suitable for operating BindPlane OP in a single-node configuration.
The Bolt Store database file is constantly written to. In order to guarantee consistency and avoid corruption of the backup file, BindPlane OP must be stopped before the database file can be copied.
1sudo systemctl stop bindplane 2 3sudo cp \ 4 /var/lib/bindplane/storage/bindplane.db \ 5 /var/lib/bindplane/storage/bindplane-$(date '+%Y-%m-%d_%H:%M:%S').db 6 7sudo systemctl start bindplane
After copying the database file, the storage directory will look something like this:
1/var/lib/bindplane/storage 2├── bindplane-2023-08-03_15:04:31.db 3└── bindplane.db
It is recommended that the copied database files be moved to a remote system, such as a backup server or a secure object storage service like Google Cloud Storage or Amazon S3.
To restore a backup of Bolt Store, use the following process:
- Stop the server:
sudo systemctl stop bindplane
- Backup the current database file
- Copy a previous database backup file to
- Start BindPlane:
sudo systemctl start bindplane