xfs
[Top] [All Lists]

Re: xfsdump with rmt

To: linux-xfs@xxxxxxxxxxx
Subject: Re: xfsdump with rmt
From: Ethan Benson <erbenson@xxxxxxxxxx>
Date: Mon, 17 Sep 2001 01:37:26 -0800
In-reply-to: <Pine.SGI.4.40.0109171714220.339461-100000@xxxxxxxxxxxxxxxxxxxxxx>; from ivanr@xxxxxxx on Mon, Sep 17, 2001 at 05:20:31PM +1000
Mail-copies-to: nobody
Mail-followup-to: linux-xfs@xxxxxxxxxxx
References: <20010916230730.K2522@xxxxxxxxxxxxxxx> <Pine.SGI.4.40.0109171714220.339461-100000@xxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mutt/1.2.5i
On Mon, Sep 17, 2001 at 05:20:31PM +1000, ivanr@xxxxxxx wrote:
> 
> Unfortunately, as it stands, xfsdump will not write to an arbitrary,
> remote file -- it must be in /dev.  I'm not sure of the reason for this,

if nobody can state why then why not remove this silly limitation.
unix device nodes can be anywhere, they are just placed in /dev by
convention, besides that there shouldn't be any limitation against
using regular files, thats the only backup option in some cases.

> but you can work around the problem fairly easily, eg:
> 
>   xfsdump -f - /home | rsh socrates.local.lan -l dump dd 
> of=/local/backup/dump/dilbert-home.dump.$1

i suppose that will do, but this limitation should really be fixed, or
at the very least documented.  

> or another example, this time from socrates:
> 
>   rsh othermachine "xfsdump -f - /home" > 
> /local/backup/dump/dilbert-home.dump.$1
> 
> If you'd rather fix the source, check cmd/xfsdump/librmt/rmtopen.c line
> 80.

actually that code looks fine, its the _rmt_dev function that is
broken, here is a patch:

--- rmtdev.c.orig       Sun Sep 16 23:41:28 2001
+++ rmtdev.c    Sun Sep 16 23:42:34 2001
@@ -41,7 +41,7 @@
 
 /*
  *     Test pathname to see if it is local or remote.  A remote device
- *     is any string that contains ":/dev/".  Returns 1 if remote,
+ *     is any string that contains ":/".  Returns 1 if remote,
  *     0 otherwise.
  */
  
@@ -50,7 +50,7 @@
 {
        if ((path = strchr (path, ':')) != (char *)0)
        {
-               if (strncmp (path + 1, "/dev/", 5) == 0)
+               if (strncmp (path + 1, "/", 1) == 0)
                {
                        return (1);
                }


i have tested it and it seems to work..

another question, why is xfsdump trying to call `rsh hostname uname' ? 

AFAICT from a brief look at the code it checks whether the remote host
is either IRIX or Linux and if niether it warns and continues anyway?
whats the point?

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgpRY7fErlyQg.pgp
Description: PGP signature

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