xfs
[Top] [All Lists]

Bug: xfsrestore -t insists on CWD being on a XFS filesystem

To: Linux XFS Mailing List <linux-xfs@xxxxxxxxxxx>
Subject: Bug: xfsrestore -t insists on CWD being on a XFS filesystem
From: "Bernhard R. Erdmann" <be@xxxxxxxxxxx>
Date: Mon, 28 May 2001 23:11:53 +0200
Cc: "amanda-users@xxxxxxxxxx" <amanda-users@xxxxxxxxxx>
Organization: Bernhard Erdmann Communication & Network Solutions
Sender: owner-linux-xfs@xxxxxxxxxxx
Hi,

xfsrestore for Linux in test mode (-t) stops at the beginning if CWD is
not on a XFS filesystem:

/usr/sbin/xfsrestore: ERROR: Current directory not XFS: /tmp/amanda

I consider this being a bug: no actual restore is done, so CWD's
filesystem doesn't matter.

For Amanda throwing xfsrestore -t into the backup pipe this leds to an
empty index if /tmp/amanda is not on a XFS filesystem - not very useful
for restores.

# /usr/sbin/amrecover 
AMRECOVER Version 2.4.2p2. Contacting server on amandahost ...
220 ente AMANDA index server (2.4.2p2) ready.
200 Access OK
Setting restore date to today (2001-05-28)
200 Working date set to 2001-05-28.
200 Config set to be.
200 Dump host set to ente.
Can't determine disk and mount point from $CWD
amrecover> setdisk /var/spool/news 
Scanning /dumps/amanda...
200 Disk set to /var/spool/news.
amrecover> ls
2001-05-27 /
amrecover> 

The index dir looks like:

-rw-------   1 amanda   amanda    5931961 May 18 01:51 20010518_0.gz
-rw-------   1 amanda   amanda      45067 May 19 01:30 20010519_1.gz
-rw-------   1 amanda   amanda    5812498 May 20 04:58 20010520_0.gz
-rw-------   1 amanda   amanda          0 May 28 22:16 20010521_0
-rw-------   1 amanda   amanda         20 May 21 02:00 20010521_0.gz
-rw-------   1 amanda   amanda         88 May 22 01:46 20010522_1.gz
-rw-------   1 amanda   amanda         69 May 28 22:16 20010523_1
-rw-------   1 amanda   amanda         88 May 23 01:38 20010523_1.gz
-rw-------   1 amanda   amanda         88 May 24 01:54 20010524_2.gz
-rw-------   1 amanda   amanda         69 May 28 22:16 20010525_2
-rw-------   1 amanda   amanda         88 May 25 01:48 20010525_2.gz
-rw-------   1 amanda   amanda         88 May 26 01:37 20010526_3.gz
-rw-------   1 amanda   amanda         69 May 28 22:16 20010527_3
-rw-------   1 amanda   amanda         88 May 27 01:37 20010527_3.gz
# cat 20010523_1
//usr/sbin/xfsrestore: ERROR: Current directory not XFS: /tmp/amanda

(20010521 was the day I introduced XFS on /var/spool/news.)


Here's a snippet from Amanda's sendbackup-dump.c:

        program->backup_name  = XFSDUMP;
        program->restore_name = XFSRESTORE;

        indexcmd = vstralloc(XFSRESTORE,
                             " -t",
                             " -v", " silent",
                             " -",
                             " 2>/dev/null",
                             " | sed",
                             " -e", " \'s/^/\\//\'",
                             NULL);
        write_tapeheader();

        start_index(createindex, dumpout, mesgf, indexf, indexcmd);


My quick & dirty solution is to mkfs.xfs the filesystem mounted to /tmp.


Regards,
Bernhard R. Erdmann

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