xfs
[Top] [All Lists]

Bug (?) : cumulative xfsrestore does not restore files and folders in a

To: xfs@xxxxxxxxxxx
Subject: Bug (?) : cumulative xfsrestore does not restore files and folders in a directory which was renamed
From: Damien Gombault <damien.gombault@xxxxxxxx>
Date: Wed, 22 Jun 2016 16:45:19 +0200
Delivered-to: xfs@xxxxxxxxxxx
Organization: GIP Recia
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1
Hi.

I have reported few weeks ago a bug on the Red Hat Bugzilla for CentOS 7 : https://bugzilla.redhat.com/show_bug.cgi?id=1341126
I had to restore a level0+level1 dump for my ownCloud server, but during the level1 restoration, xfsrestore showed many warnings and some directories/files were not restored.
I recently tried to restore a more recent level0+level1 dump and I get the same results with other directories/files.
I tried to figure out why and now I am able to reproduce the problem with a minimal test case.

Here is the test case :

Create a new XFS filesystem, mount it as "/mnt/test"
Then in "/mnt/test"
Create a directory "dira/"
Create a file "filea" in directory "dira/"
You should get :

.
âââ dira
    âââ filea

Make a level 0 dump :
xfsdump -l 0 -f /root/test0.dump /mnt/test

Rename "dira/" to "dirA/"
Create a directory "dirb/" in "dirA/"
Create a file "fileb" in "dirb/"
You should get :

.
âââ dirA
    âââ dirb
    â âââ fileb
    âââ filea

Make a level 1 dump :
xfsdump -l 1 -f /root/test1.dump /mnt/test

Create a new XFS filesystem, mount it as "/mnt/restore"

Restore (cumulative mode) level 0 dump :
xfsrestore -r -f /root/test0.dump /mnt/restore/

Restore (cumulative mode) level 1 dump :
xfsrestore -r -f /root/test1.dump /mnt/restore/

You get a WARNING :
xfsrestore: WARNING: open of dirA/dirb/fileb failed: Aucun fichier ou dossier de ce type: discarding ino 526337 (No such file or directory in English)
Directory "dirb" and file "fileb" is not restored :

.
âââ dirA
â âââ filea
âââ xfsrestorehousekeepingdir
    âââ dirattr
    âââ dirextattr
    âââ namreg
    âââ state
    âââ tree

I attached test0.dump (level 0 dump), test1.dump (level 1 dump), debug0.txt (xfsrestore level 0 debug trace), debug1.txt (xfsrestore level 1 debug trace).

I can reproduce it on CentOS 7 and Fedora 24.
On Fedora 24, I used :
xfsprogs-4.5.0-1.fc24.x86_64
xfsdump-3.1.6-2.fc24.x86_64
kernel-4.5.7-300.fc24.x86_64

Is there a bug in xfsdump/xfsrestore tools and cumulative restoration feature ?

Attachment: debug0.txt
Description: Text document

Attachment: debug1.txt
Description: Text document

Attachment: test0.dump
Description: Binary data

Attachment: test1.dump
Description: Binary data

<Prev in Thread] Current Thread [Next in Thread>