I made regularly MySQL backups using Percona's xtrabackup, using a command I found on the net (I am not deep into databases nor in their tools):
innobackupex --user=XXXX --password=XXXX --stream=tar ./ | sshpass -p XXXX ssh root@192.168.XX.XX "cat - > /var/lib/mysql_backups/name.tar"
Now, the backup file is 85GB and it has been made daily as FULL backup. I need to restore the DB after a crash and it doesn't work.
I watched inside the tar file (with tar -tif name.tar
) and I read all the list of file names.
1) how is the normal way to restore the DB from local TAR using --move-back
to decompress everything in place and not use extra space on the disk?
2) Or is there the possibility (if option 1 is not available) to restore the backup from a remote TAR, reversing the procedure described in Taking backup remotely using innobackupex? I tried multiple times but I cannot find the correct options.
I found an option --remote-host
used in a post from 2012, but in my version 1.5.1 this option is missing...
3) being streamed=tar, how do I prepare (if necessary) the tar before restore?
Thank you in advance.