Back and Restore from xtradb 8.0.26

I did a streaming backup on my new cluster. And now I want to test the backup and restore process.
backup script.

xtrabackup --defaults-file=/etc/mysqld.cnf --defaults-group=mysqld --socket=/var/mysqld/mysqld.sock --user=backup --password=xxx --backup --stream=xbstream --compress --target-dir=$dest 2> $log | gzip - | ssh mysql@backup "cat - > /backups/$dest_folder/$backup_file"  > /dev/null 2>&1

Do I need to decompress the data to restore?

xbstream --directory=/db/restore_data --extract /db/backup_2022-01-18.xbstream --verbose
When I do the above to extract the data nothing happens.

1 Like

Hi @danarashad

xbstream will expect to have the files from STDIN, please do:

xbstream --directory=/db/restore_data --extract --verbose < /db/backup_2022-01-18.xbstream 
1 Like

When I run the above I am getting the following error

xb_stream_read_chunk(): wrong chunk magic at offset 0x0
exit code: 1
1 Like

I re did the backup and it seems to be the backup was bad. After running the backup again, i am no able to extract the data.

1 Like