Tar incremental restore error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Backup/Restore and DR (Freezer) |
New
|
Undecided
|
Unassigned | ||
Liberty |
New
|
Undecided
|
Unassigned | ||
Mitaka |
New
|
Undecided
|
Unassigned | ||
Debian |
Confirmed
|
Unknown
|
Bug Description
We have seen a few report of similar errors:
The signature is:
A freezer-agent restores an incremental backup.
Restore of the first level goes okay
Restore of one of the following level fails with something like:
Restore error: /bin/tar: Cannot rename ‘<some directory>’ to ‘<some other directory>’: Directory not empty
or
Restore error: /bin/tar: Cannot rename ‘<some directory>’ to ‘<some other directory>’: No such file or directory
When this kind of error happens, tar finishes to execute the restore of the current level and reports the error at the end.
The restored directory will be left in the state:
Level0
+ n non-failed level
+ partial (but mostly complete) failed level
following levels won't be restored
Full trace of a buggy restore:
2016-04-14 10:10:00,385 root INFO log file at /var/log/
2016-04-14 10:10:00,385 root INFO [*] Creation of swift client
2016-04-14 10:10:00,389 requests.
2016-04-14 10:10:00,544 requests.
2016-04-14 10:10:00,649 root INFO [*] Job execution Started at: 2016-04-14 10:10:00
2016-04-14 10:10:00,649 root INFO [*] Executing FS restore...
2016-04-14 10:10:00,676 root INFO Creation restore path: /home/stack
2016-04-14 10:10:00,676 root INFO Creation restore path completed
2016-04-14 10:10:00,677 root INFO Restore backup hlm106a-
2016-04-14 10:17:25,459 root INFO [*] Pipe closed as EOF reached. Data transmitted successfully
2016-04-14 10:17:25,552 root INFO Restore backup hlm106a-
2016-04-14 10:17:25,563 root WARNING [SSL: DECRYPTION_
2016-04-14 10:17:25,563 root INFO [*] Creation of swift client
2016-04-14 10:17:25,568 requests.
2016-04-14 10:17:25,708 requests.
2016-04-14 10:18:32,511 root INFO [*] Pipe closed as EOF reached. Data transmitted successfully
2016-04-14 10:18:32,689 root ERROR [*] Restore error: /bin/tar: Cannot rename ‘./hos-
/bin/tar: Exiting with failure status due to previous errors
Traceback (most recent call last):
File "/opt/stack/
tar_
EOFError
2016-04-14 10:18:32,693 root CRITICAL [*] Critical Error: failed to restore file
Changed in debian: | |
status: | Unknown → Confirmed |
How to reproduce the "Directory not empty" error :
Setup:
mkdir backupdir dir1/file1_ dir1 dir2/file1_ dir2
mkdir backupdir/dir1
mkdir backupdir/dir2
echo "aa" > backupdir/
echo "aa" > backupdir/
freezer-agent --path-to-backup /home/stack/ backupdir/ --backup-name plop --storage local --container /tmp/test/ --max-level 15
rm -rf backupdir/dir2/
mv backupdir/dir1/ backupdir/dir2
freezer-agent --path-to-backup /home/stack/ backupdir/ --backup-name plop --storage local --container /tmp/test/ --max-level 15
Restore:
stack@ padawan- ccp-c0- m1-mgmt: ~$ freezer-agent --restore-abs-path /home/stack/ restoredir/ --backup-name plop --storage local --container /tmp/test/ --action restore
[*] Critical Error: failed to restore file
After restore state:
stack@ padawan- ccp-c0- m1-mgmt: ~$ ls -lah restoredir/ padawan- ccp-c0- m1-mgmt: ~$ ls -lah restoredir/dir1/ padawan- ccp-c0- m1-mgmt: ~$ ls -lah restoredir/dir2
total 16K
drwxr-xr-x 4 stack stack 4.0K Apr 21 05:20 .
drwxr-xr-x 14 stack stack 4.0K Apr 21 05:20 ..
drwxr-xr-x 2 stack stack 4.0K Apr 21 05:19 dir1
drwxr-xr-x 2 stack stack 4.0K Apr 21 05:19 dir2
stack@
total 12K
drwxr-xr-x 2 stack stack 4.0K Apr 21 05:19 .
drwxr-xr-x 4 stack stack 4.0K Apr 21 05:20 ..
-rw-r--r-- 1 stack stack 3 Apr 21 05:19 file1_dir1
stack@
total 8.0K
drwxr-xr-x 2 stack stack 4.0K Apr 21 05:19 .
drwxr-xr-x 4 stack stack 4.0K Apr 21 05:20 ..
Log (separated backup level 1, backup level 2 and restore):
2016-04-21 05:20:17,738 root INFO log file at /home/stack/ .freezer/ freezer. log configured .freezer found! permissions --same-owner --seek --ignore- failed- read --listed- incremental= /home/stack/ .freezer/ tar_metadata_ padawan- ccp-c0- m1-mgmt_ plop_1461216017 _0 .
2016-04-21 05:20:17,739 root INFO [*] Job execution Started at: 2016-04-21 05:20:17
2016-04-21 05:20:17,899 root INFO [*] No LVM requested/
2016-04-21 05:20:17,899 root WARNING [*] Directory /home/stack/
2016-04-21 05:20:17,900 root INFO Tar engine backup stream enter
2016-04-21 05:20:17,901 root INFO Execution command:
/bin/tar --create -z --warning=none --no-check-device --one-file-system --preserve-
2016-04-21 05:20:17,920 root INFO Tar engine streaming end
2016-04-21 05:20:17,926 root INFO [*] Job execution Finished, at: 2016-04-21 05:20:17
2016-04-21 05:20:17,927 root INFO [*] Job time Elapsed: 0:00:00.186618
2016-04-21 05:20:30,207 root INFO log file at /home/stack/ .freezer/ freezer. log configured .freezer found! permissions --same-owner --seek --ignore- failed- read --listed- incremental= /home/stack/ .freezer/ tar_metadata_ padawan- ccp-c0- m1-mgmt_ plop_1461216017 _0 .
2016-04-21 05:20:30,208 root INFO [*] Job execution Started at: 2016-04-21 05:20:30
2016-04-21 05:20:30,258 root INFO [*] No LVM requested/
2016-04-21 05:20:30,260 root WARNING [*] Directory /home/stack/
2016-04-21 05:20:30,262 root INFO Tar engine backup stream enter
2016-04-21 05:20:30,265 root INFO Execution command:
/bin/tar --create -z --warning=none --no-check-device --one-file-system --preserve-
2016-04-21 05:20:30,277 root INFO Tar eng...