Action to restore database from the backup is missing

Bug #1830195 reported by Tytus Kurek
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Percona Cluster Charm
Triaged
Wishlist
Unassigned

Bug Description

Currently the percona-cluster charm supports a "backup" action which can be used to take a backup of the running databases. However, it is missing an option to restore the databases from the backup which is weird. The databases can be restored manually by running the following commands:

innobackupex --apply-log /var/backups/mysql/<BACKUP_DIR>
systemctl stop mysql
mv /var/lib/percona-xtradb-cluster /var/lib/percona-xtradb-cluster_OLD
mkdir /var/lib/percona-xtradb-cluster
innobackupex --copy-back /var/backups/mysql/<BACKUP_DIR>
rsync --ignore-existing /var/lib/percona-xtradb-cluster_OLD/* /var/lib/percona-xtradb-cluster/
chown -R mysql:mysql /var/lib/percona-xtradb-cluster
chown root:root /var/lib/percona-xtradb-cluster/seeded
systemctl start mysql

I think the consistent solution should have both "backup" and "restore" actions implemented.

Changed in charm-percona-cluster:
status: New → Triaged
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.