amanda gtar question
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? Thanks _ Robert P. McGraw, Jr. Manager, Computer System EMAIL: [EMAIL PROTECTED] Purdue University ROOM: MATH-807 Department of MathematicsPHONE: (765) 494-6055 150 N. University Street FAX: (419) 821-0540 West Lafayette, IN 47907-2067 smime.p7s Description: S/MIME cryptographic signature
Re: amanda gtar question
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 ServicesTel +32 16 397.511 Technologielaan 21 bus 2, B-3001 Leuven, BELGIUMFax +32 16 397.512 http://www.xplanation.com/ email: [EMAIL PROTECTED] *** * 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 * ***
Re: amanda gtar question
On Fri, Apr 28, 2006 at 03:25:34PM +0200, Paul Bijnens wrote: 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. ... 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. ... 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). I was going to suggest the same solution. Minor correction (I so seldom can find any flaws in Paul's posts :). It is the pair, hostname/diskname that must be unique. When used with a diskname and a starting directory I consider the diskname to be a tag. Thus I don't make it resemble a pathname. So I might chose tags like Users:zli or SnapUsers-zmullero. Or even just the username which would be unique on any particular host. 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. Didn't think about that when I added my USB drives. Another reason I'm happy I reformatted to ext2. BTW I got a few extra GB on those drives by creating the ext2 filesystem with no reserve for root (5% by default) and by reducing the number of inodes by a factor of 8. I don't expect my vtapes will consume the million inodes that left ;) -- Jon H. LaBadie [EMAIL PROTECTED] JG Computing 4455 Province Line Road(609) 252-0159 Princeton, NJ 08540-4322 (609) 683-7220 (fax)