Open vitobotta opened 5 years ago
First, you have to download the *.xbackup.gz
file, you can do that by using rclone
for example. Then unzip it and stream it to xbstream
.
The command will look something like this:
gunzip -c *.xbackup.gz | xbstream -x -C <path to MySQL data dir>
if using rclone
will look somthing like:
rclone cat *.xbackup.gz | gzip -d | xbstream -x -C <path to MySQL data dir>
Once that command is completed then you have to prepare the backup by running xtrabackup
like in this article:
xtrabackup --prepare --target-dir=<path to MySQL data dir>
Hope this helps! Please let me know if works or not. Best regards,
Thanks! :)
I think that this can be a section in the documentation. Thanks for pointing it out. I will reopen it.
Just copying the instructions above into the backup.md docs would be a great help. :-)
Say I have some production data in a cluster managed by this operator, and that I have backups configured and working. How could I restore a backup locally on my Mac for testing or debugging issues with production data? Is there a quick and easy way to start some container and restore the data in one go or something like that? I can see that the archives include Xtrabackup files, if I am not mistaken. Thanks in advance!