aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-05-31 10:18:37 +0000
committerGerrit Code Review <review@openstack.org>2022-05-31 10:18:37 +0000
commit7ed26c8a46458686c8dbff562687eb9e2f42a9e5 (patch)
tree505a7900d43eb367d6764e95196646ecbb80b970 /doc
parent28b4c5d35c2891e338a2f54ef11144d59f64dcf3 (diff)
parent377b6b4251834519c47aff71afa1ba2b7951c92c (diff)
downloadkolla-ansible-7ed26c8a46458686c8dbff562687eb9e2f42a9e5.tar.gz
kolla-ansible-7ed26c8a46458686c8dbff562687eb9e2f42a9e5.zip
Merge "Improve MariaDB restore procedure"
Diffstat (limited to 'doc')
-rw-r--r--doc/source/admin/mariadb-backup-and-restore.rst24
1 files changed, 19 insertions, 5 deletions
diff --git a/doc/source/admin/mariadb-backup-and-restore.rst b/doc/source/admin/mariadb-backup-and-restore.rst
index b0acd2577..ac699b62b 100644
--- a/doc/source/admin/mariadb-backup-and-restore.rst
+++ b/doc/source/admin/mariadb-backup-and-restore.rst
@@ -77,7 +77,7 @@ Full
----
For a full backup, start a new container using the Mariabackup image with the
-following options on the master database node:
+following options on the first database node:
.. code-block:: console
@@ -92,14 +92,14 @@ following options on the master database node:
(dbrestore) $ mbstream -x -C /backup/restore/full/ < mysqlbackup-04-10-2018.qp.xbc.xbs
(dbrestore) $ mariabackup --prepare --target-dir /backup/restore/full
-Stop the MariaDB instance.
+Stop the MariaDB instance on all nodes:
.. code-block:: console
- docker stop mariadb
+ kolla-ansible -i multinode stop -t mariadb --yes-i-really-really-mean-it
Delete the old data files (or move them elsewhere), and copy the backup into
-place:
+place, again on the first node:
.. code-block:: console
@@ -111,7 +111,9 @@ place:
(dbrestore) $ rm -rf /var/lib/mysql/\.[^\.]*
(dbrestore) $ mariabackup --copy-back --target-dir /backup/restore/full
-Then you can restart MariaDB with the restored data in place:
+Then you can restart MariaDB with the restored data in place.
+
+For single node deployments:
.. code-block:: console
@@ -120,6 +122,18 @@ Then you can restart MariaDB with the restored data in place:
81004 15:48:27 mysqld_safe WSREP: Running position recovery with --log_error='/var/lib/mysql//wsrep_recovery.BDTAm8' --pid-file='/var/lib/mysql//scratch-recover.pid'
181004 15:48:30 mysqld_safe WSREP: Recovered position 9388319e-c7bd-11e8-b2ce-6e9ec70d9926:58
+For multinode deployment restores, a MariaDB recovery role should be run,
+pointing to the first node of the cluster:
+
+.. code-block:: console
+
+ kolla-ansible -i multinode mariadb_recovery -e mariadb_recover_inventory_name=controller1
+
+The above procedure is valid also for a disaster recovery scenario. In such
+case, first copy MariaDB backup file from the external source into
+``mariadb_backup`` volume on the first node of the cluster. From there,
+use the same steps as mentioned in the procedure above.
+
Incremental
-----------