Start PS5.7
Take full backup and upload to minio
./xtrabackup --user=root --password='' --backup --target-dir=$HOME/dbbackup_PS57 -S $HOME/PS230419_5_7_25_28/socket.sock --datadir=$HOME/PS230419_5_7_25_28/data --extra-lsndir=$HOME/dbbackup_PS57/full --stream=xbstream --parallel=10 2>full_backup_$(date +"%d_%m_%Y")_log | ./xbcloud put --storage=s3 --s3-endpoint='http://localhost:9000' --s3-access-key='1I21WP1FZ4AT28T79NNL' --s3-secret-key='1cgKlJF0qDy+rjI8RnPl7oeTHt3Q1foDk3JBkMuF' --s3-bucket='miniobackups' --s3-bucket-lookup=PATH --parallel=10 full_backup_$(date +"%d_%m_%Y") 2>upload_$(date +"%d_%m_%Y")_log
In extra-lsndir dir($HOME/dbbackup_PS57/full), the following files are created
-rw-rw-r-- 1 mchawla mchawla 652 Apr 23 09:26 xtrabackup_info -rw-rw-r-- 1 mchawla mchawla 138 Apr 23 09:26 xtrabackup_checkpoints
Now download the full backup in the $HOME/dbbackup_PS57/full directory
./xbcloud get --storage=s3 --s3-endpoint='http://localhost:9000' --s3-access-key='1I21WP1FZ4AT28T79NNL' --s3-secret-key='1cgKlJF0qDy+rjI8RnPl7oeTHt3Q1foDk3JBkMuF' --s3-bucket='miniobackups' --s3-bucket-lookup=PATH --parallel=10 full_backup_$(date +"%d_%m_%Y") 2>download_full_backup_$(date +"%d_%m_%Y") | ./xbstream -xv -C $HOME/dbbackup_PS57/full 2>download_stream_full_backup_$(date +"%d_%m_%Y")
If xtrabackup_info and xtrabackup_checkpoints exist in the directory, where backup is being downloaded, then xbstream will give the below error
xbstream: Can't create/write to file './xtrabackup_checkpoints' (Errcode: 17 - File exists)
./xbstream: failed to create file.
Here xbcloud will display:
190423 11:22:39 ./xbcloud: Download successfull full_backup_23_04_2019/ibdata1.00000000000000000008, size 21 190423 11:22:39 ./xbcloud: Download completed.
Issue: Thus if xbstream gives an error, xbcloud continues to download the files and does not exit.
Note: It would be good if xbstream displayed a message on successful completion to distinguish from any error message.