Closed rochecr closed 9 years ago
I'm not using the incremental feature for the moment, but I've tested the following:
With the latest version:
$ pyxtrabackup-inc --version
3.0.1
Create a base backup:
$pyxtrabackup-inc --user=myuser /tmp/repo
Then create 2 incremental backups:
$pyxtrabackup-inc --user=myuser --incremental /tmp/repo
Check the repo:
$ ll /tmp/repo/20150317/INC
total 600K
-rw-r--r-- 1 root root 224K Mar 17 06:52 base_backup_20150317_0652.tar.gz
-rw-r--r-- 1 root root 187K Mar 17 06:52 inc_0_backup_20150317_0652.tar.gz
-rw-r--r-- 1 root root 187K Mar 17 06:52 inc_1_backup_20150317_0652.tar.gz
Seems okay for me. What is your issue? Also which version are you using?
With my cronjob configuration I am getting inside the INC directory a subdirectory per day with the following format 2015MMDD pyxtrabackup --version 3.0.1
ls -ltr | tail drwxr-xr-x 3 root root 1 Mar 8 11:00 20150308 drwxr-xr-x 3 root root 1 Mar 9 11:00 20150309 drwxr-xr-x 3 root root 1 Mar 10 11:00 20150310 drwxr-xr-x 3 root root 1 Mar 11 11:00 20150311 drwxr-xr-x 3 root root 1 Mar 12 11:00 20150312 drwxr-xr-x 3 root root 1 Mar 13 11:00 20150313 drwxr-xr-x 3 root root 1 Mar 14 11:00 20150314 drwxr-xr-x 3 root root 1 Mar 15 11:00 20150315 drwxr-xr-x 3 root root 1 Mar 16 11:00 20150316 drwxr-xr-x 3 root root 1 Mar 17 11:00 20150317
I move the incrementals inside the same folder as the base but the restore failed. I tried a couple of times. The logs don't have a lot of info at the point the pyxtrabackup says it is not able to restore.
In fact, the incremental backup tool will create the following structure inside a repository (let's call /mnt/backup/repository for the sake of the example):
/mnt/backup/repository/TIMESTAMP/INC/base_backup.tar.gz
/mnt/backup/repository/TIMESTAMP/INC/inc_0_backup.tar.gz
/mnt/backup/repository/TIMESTAMP/INC/inc_1_backup.tar.gz
...
So you don't need to create a directory called INC to avoid a redondant directory structure. Besides, the BASE and INCREMENTALS should be created inside the same repository, so why are doing some archive moving manipulations?
Also, the logs of the application are not really precise since it's a wrapper, but you can access the xtrabackup output file for more details (/var/log/mysql/xtrabackup.out by default, or check the --out-file option).
@rochecr Any update on this?
Closing the issue, @rochecr do not hesitate to re-open it if you have any trouble.
Hi Can you share your contrab setup for incremental backup?
I did the following but actually is not working since the incremental are stored in their own subdirectories.
BASE
Run the incremental only from 2th to the last day of the mont at 11am.
I want to create one Base backup the first of the month and then incrementals until the end of that month.