Skip to content

For help, click the link below to get free database assistance or contact our experts for personalized support.

Copy backup to a local machine

Make a local copy of a previously saved backup requires not more than the backup name. This name can be taken from the list of available backups returned by the following command:

$ kubectl get pxc-backup

When the name is known, backup can be downloaded to the local machine as follows:

$ ./deploy/backup/copy-backup.sh <backup-name> path/to/dir

For example, this downloaded backup can be restored to the local installation of Percona Server:

$ service mysqld stop
$ rm -rf /var/lib/mysql/*
$ cat xtrabackup.stream | xbstream -x -C /var/lib/mysql
$ xtrabackup --prepare --target-dir=/var/lib/mysql
$ chown -R mysql:mysql /var/lib/mysql
$ service mysqld start

If needed, you can also restore the backup to a Kubernetes cluster following the instructions in this howto.


Last update: 2025-02-20