Skip to content

Commit f7be457

Browse files
committed
Documents db backups
1 parent e568ece commit f7be457

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
================
2+
Database Backups
3+
================
4+
5+
An OpenStack deployment includes MariaDB to be used as a database by the
6+
OpenStack services. Kayobe has `built-in support
7+
<https://docs.openstack.org/kayobe/latest/administration/overcloud.html#performing-database-backups>`__
8+
for backing up this database, but these backups are just stored on one of the
9+
OpenStack controller hosts.
10+
11+
We have a playbook ``tools/upload-database-backup-s3.yml`` which can be used to
12+
upload these backups to an S3 object store. To use this, you will need:
13+
14+
* The endpoint of the S3 object store.
15+
16+
* EC2 access and secret keys to authenticate to the S3 object store.
17+
18+
* The name of a pre-existing bucket in the S3 object store.
19+
20+
These should be set as follows:
21+
22+
.. code-block:: yaml
23+
:caption: ``$KAYOBE_CONFIG_PATH/inventory/group_vars/all/mariadb-backup``
24+
25+
s3_mariadb_backup_url: "<s3-endpoint>"
26+
s3_mariadb_backup_bucket: "<s3-bucket-name>"
27+
28+
.. code-block:: yaml
29+
:caption: ``$KAYOBE_CONFIG_PATH/environments/$KAYOBE_ENVIRONMENT/secrets.yml``
30+
31+
secrets_s3_mariadb_backup_access_key: "<s3-access-key>"
32+
secrets_s3_mariadb_backup_secret_key: "<s3-secret-access-key"
33+
34+
You may also want to hook this to run after ``kayobe overcloud database
35+
backup``:
36+
37+
.. code-block:: bash
38+
39+
mkdir -p $KAYOBE_CONFIG_PATH/hooks/overcloud-database-backup/post.d/
40+
ln -s ../../../ansible/upload-database-backup-s3.yml $KAYOBE_CONFIG_PATH/hooks/overcloud-database-backup/post.d/10-upload-database-backup-s3.yml

0 commit comments

Comments
 (0)