Amanda-Users

Re: How could amflush NOT flush ? :o) [OFF TOPIC]

2003-07-23 10:54:03
Subject: Re: How could amflush NOT flush ? :o) [OFF TOPIC]
From: Paul Bijnens <paul.bijnens AT xplanation DOT com>
To: Nicolas Ecarnot <nicolas.ecarnot AT accim DOT com>
Date: Wed, 23 Jul 2003 16:41:12 +0200
Nicolas Ecarnot wrote:

Selon Paul Bijnens <paul.bijnens AT xplanation DOT com>:

Nicolas Ecarnot wrote:

I first thought about a script that would launch amdump without the
option autoflush, then copy the last created directory, then launch
amflush. But that copy is way too large for my not-so-small 120Go
holding disk.

Instead of a copy, make hard links to the original files.

...
The doc (under FreeBSD 5.1) also says that the hard links can't be used for
directories, but only for files. I tested it, and indeed, I'm stuck.
Well, so I'm stuck here with my problem... too bad...

No, it still works.  Just create the directories (they don't take
megabytes, and hardlink the files in them).  But actually, in
the holdingdisk, all files are on the same level, so there are
no directories to link to.

Setup:

You have two configs; Config1 "reserve 100" and a bogus
"tapedev /no/such/tape" and holdingdisk set to
"/bigdisk/amandahold/Config1/".
The other, Config2, "tapedev /dev/nst0" (or whatever is the
real tapedev) and holdingdisk "/bigdisk/amandahold/Config2".
The disklist is shared (use a hard link :-) ).

We make the dumps with Config1, and they stay in the holdingdisk
because your tapedev is bogus.
Then we populate the other holdingdisk with links to this one,
using "cpio --link" as program to create the symlinks:

   #!/bin/sh
   cd /bigdisk/amandahold/Config1
   amdump Config1
   cd /bigdisk/amandahold/Config1
   find . | cpio -pl /bigdisk/amandahold/Config2
   amflush Config2

(Untested program, just invented here.)

--
Paul Bijnens, Xplanation                            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, *
* kill -9 1,  Alt-F4,  Ctrl-Alt-Del,  AltGr-NumLock,  Stop-A,  ...    *
* ...  "Are you sure?"  ...   YES   ...   Phew ...   I'm out          *
***********************************************************************