ADSM-L

Re: dsmc restore /etc/lp does bad things

1998-01-30 04:40:10
Subject: Re: dsmc restore /etc/lp does bad things
From: Andrew Raibeck <storman AT US.IBM DOT COM>
Date: Fri, 30 Jan 1998 04:40:10 -0500
If your intent is to restore the lp subdirectory and all of its files, then
"restore /etc/lp/* -subdir=yes" is the correct syntax.

"restore /etc/lp -subdir=yes" tells ADSM to restore all objects called 'lp' in
/etc and any of its subdirectories. Incidentally, the '-subdir=yes' also causes
*all* directory entries under /etc to be restored, as well. This latter
behavior has been modified in the V3 client so that your command would cause
only objects (files and directories) called 'lp' within the /etc directory
structure to be restored. However, if your intent is to restore the '/etc/lp'
directory only, then you still need to explicitly say "restore /etc/lp/*
-subdir=yes".
Andy Raibeck
Andy Raibeck
ADSM Level 2 Support



 ADSM-L AT VM.MARIST DOT EDU
 01/29/98 12:15 PM
Please respond to ADSM-L AT VM.MARIST DOT EDU @ internet

To: ADSM-L AT VM.MARIST DOT EDU @ internet
cc:
Subject: dsmc restore /etc/lp does bad things

Hi,

Can anyone explain why this command misbehaves:

  # dsmc restore /etc/lp -subdir=yes -todate=01/20/1998 -latest

It starts restoring other stuff in /etc (other than lp, that is).
The things that trigger it are (all must be true):

    1.  the /etc/lp directory is completely gone
    2.  Another file called 'lp' appears somewhere under /etc
        (in this case /etc/init.d/lp)
    3.  I specify '/etc/lp' rather than '/etc/lp/*'

I'm using the solaris(2.5.1) client (2.1.0.7), but I can reproduce the
problem on AIX by creating the directories mentioned above.

I can work around this by specifying '/etc/lp/*', but it seems an
overly harsh punishment for it to restore everything under /etc.

Example:

[root@rachel] /etc # df -k /
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t3d0s0      31239   14098   14021    51%    /
[root@rachel] /etc # ls -ld /etc/lp
drwxrwxr-x   9 lp       lp           512 Jan 26 21:34 /etc/lp
[root@rachel] /etc # ls -l /etc/lp
total 28
-rw-rw-r--   1 lp       lp          2141 Dec  9  1996 Systems
drwxrwxr-x   2 lp       lp           512 Dec  9  1996 alerts
drwxrwxr-x   2 lp       lp           512 Dec  9  1996 alerts
drwxrwxr-x   2 lp       lp           512 Dec  9  1996 classes
-rw-rw-r--   1 lp       lp             9 Mar  3  1997 default
drwxr-xr-x   2 lp       lp           512 Mar  3  1997 fd
drwxr-xr-x   2 lp       lp           512 Mar  3  1997 fd
-rw-rw-r--   1 lp       lp           257 Jun 18  1997 filter.table
drwxrwxr-x   2 lp       lp           512 Dec  9  1996 forms
drwxrwxr-x   2 lp       lp           512 Dec  9  1996 forms
drwxrwxr-x   3 lp       lp           512 Mar  3  1997 interfaces
lrwxrwxrwx   1 root     other         17 Jan 29 17:27 logs -> ../../var/lp/logs
lrwxrwxrwx   1 root     other         17 Jan 29 17:27 model -> /usr/lib/lp/model
drwxrwxr-x   5 lp       lp           512 Mar  3  1997 printers
drwxrwxr-x   2 lp       lp           512 Dec  9  1996 pwheels
[root@rachel] /etc # rm -r /etc/lp
[root@rachel] /etc # dsmc restore /etc/lp -subdir=yes -todate=01/20/1998 -latest
ADSTAR Distributed Storage Manager
Command Line Backup Client Interface - Version 2, Release 1, Level 0.7
(C) Copyright IBM Corporation, 1990, 1996, All Rights Reserved.

Restore function invoked.

Session established with server ADSM-T4: AIX-RS/6000
  Server Version 2, Release 1, Level 5.10
  Server date/time: 01/29/98   17:29:42   Last access: 01/29/98   17:27:05

Restored directory /etc/Docs/
Restored directory /etc/Docs/theirs/
Restored directory /etc/Docs/theirs/plan9/
Restored directory /etc/Docs/theirs/security-doc/
Restored directory /etc/lp/
Restored directory /etc/lp/alerts/
Restored directory /etc/lp/classes/

[Canceled before it whacks everything]

...Demetri


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