Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2.21
-
None
-
CentOS 7.x
Description
Backup is created with the command below:
mariabackup --host=localhost --password=******* --user=percona --no-timestamp --backup --incremental-basedir=/var/bkp/stor/incr/2019_01_31-19_07_34/2019_01_31-20_02_53 --stream=xbstream --parallel=4 --extra-lsndir=/var/bkp/stor/incr/2019_01_31-19_07_34/2019_01_31-20_36_56 --binlog-info=on --target-dir /var/bkp/stor/incr/2019_01_31-19_07_34/2019_01_31-20_36_56
|
It creates this file:
[root@ip-10-1-2-91 ~]# ls -alh /var/bkp/stor/incr/2019_01_31-19_07_34/2019_01_31-20_36_56/backup.xbs
|
-rw-r--r--. 1 root root 280M Jan 31 20:37 /var/bkp/stor/incr/2019_01_31-19_07_34/2019_01_31-20_36_56/backup.xbs
|
[root@ip-10-1-2-91 ~]# file /var/bkp/stor/incr/2019_01_31-19_07_34/2019_01_31-20_36_56/backup.xbs
|
/var/bkp/stor/incr/2019_01_31-19_07_34/2019_01_31-20_36_56/backup.xbs: data
|
[root@ip-10-1-2-91 ~]#
|
While trying to extract the data to another folder, it works the first time but not on the second because it also extracted a copy of xtrabackup_info on the same folder where the xbs file is.
[root@ip-10-1-2-91 2019_01_31-20_36_56]# pwd
|
/var/bkp/work/2019_01_31-20_36_56
|
[root@ip-10-1-2-91 2019_01_31-20_36_56]# cat /var/bkp/stor/incr/2019_01_31-19_07_34/2019_01_31-20_36_56/backup.xbs | mbstream -x -C .
|
[root@ip-10-1-2-91 2019_01_31-20_36_56]# rm -rf *
|
[root@ip-10-1-2-91 2019_01_31-20_36_56]# cat /var/bkp/stor/incr/2019_01_31-19_07_34/2019_01_31-20_36_56/backup.xbs | mbstream -x -C .
|
mbstream: Can't create/write to file '/var/bkp/stor/incr/2019_01_31-19_07_34/2019_01_31-20_36_56//xtrabackup_info' (Errcode: 17 "File exists")
|
mbstream: failed to create file.
|
[root@ip-10-1-2-91 2019_01_31-20_36_56]#
|
This is minor since we can just make sure to remove that file, but the purpose of -C is to not write anything on any other folder except the one specified.