On 2006-04-28 14:49, McGraw, Robert P. wrote:
To try and make my backups smaller I run a perl script that runs goes
through my "users" directory and produces the following lines for each user.
The script then includes these lines in the disklist file. This has been
working great and my backups go rather fast.
The amrecover also works ok, if I needed to restore a file or a directory
for a user.
host /export/fssnap/users/zhangj export-users-tar -1 local
host /export/fssnap/users/zhangs export-users-tar -1 local
host /export/fssnap/users/zink export-users-tar -1 local
host /export/fssnap/users/zjelonek export-users-tar -1 local
host /export/fssnap/users/zli export-users-tar -1 local
host /export/fssnap/users/zmullero export-users-tar -1 local
define dumptype export-users-tar {
global
comment "Full Backup of users using tar"
program "GNUTAR"
maxdumps 10
}
But I ran into a major problem when I had to rebuild the entire "users" disk
because of a major crash.
The problem is that the user files in the backup tar file are relative to
/export/fssnap/users/username, which means I need to know and create the
directory name and permissions where the files will be placed on the disk
before I can restore.
I only wanted to make one pass through my backup tapes so I had to create a
script to manually read the first record of the backup tar file to get the
user/directory name, create the directory, cd to the directory and then
manually dd'ed and untared the file to the directory.
What I really need is for the backup tar file to be relative to
/export/fssnap/users.
QUESTION
Is there a way to force the relative path in the amanda tar command?
Use disklist entries in this form:
host unique_name /top/level/dir {
base-dumptype
include "./subdir"
}
host /export/fssnap/users:zli /export/fssnap/users {
export-users-tar
include "./zli"
}
host /export/fssnap/users:zmullero /export/fssnap/users {
export-users-tar
include "./zmullero"
}
The second arg must be unique in a disklist. It can be whatever you
like. I used the concatenation of topdir and subdir with
colon as separator between the dir and subdir, but you could also
use a slash (no space).
Remark: when using vtapes, you are limited to those chars in that
unique name that the filesystem where the vtapes are located can handle.
E.g. many USB-drives use vfat, which *cannot* handle a colon in the
name. You get a very obscure error message from taper in that case.
--
Paul Bijnens, xplanation Technology Services Tel +32 16 397.511
Technologielaan 21 bus 2, B-3001 Leuven, BELGIUM Fax +32 16 397.512
http://www.xplanation.com/ email: Paul.Bijnens AT xplanation DOT com
***********************************************************************
* I think I've got the hang of it now: exit, ^D, ^C, ^\, ^Z, ^Q, ^^, *
* F6, quit, ZZ, :q, :q!, M-Z, ^X^C, logoff, logout, close, bye, /bye, *
* stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt, abort, hangup, *
* PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e, kill -1 $$, shutdown, *
* init 0, kill -9 1, Alt-F4, Ctrl-Alt-Del, AltGr-NumLock, Stop-A, ... *
* ... "Are you sure?" ... YES ... Phew ... I'm out *
***********************************************************************
|