On Wed, 29 May 2002, Jon LaBadie wrote:

> Skyblue thinking.  Wouldn't this be just the level 0's you'd want retained?
> At least that is my antiquated impression of off-site archiving.

A level 0 from three days ago won't have a file I created two days
ago. A level 1 from one day ago will. So although level 0's are
necessary for restoring an entire directory, without the level n's,
you essentially have infrequent full backups. Therefore, I don't
see any reason to only store or retain level 0's.

By the way, since no one has piped up with an easy solution to
retaining dump images, here's my horrible hack, which has been
working very well for a week now. I call it from cron about an
hour after I start amdump.


#!/bin/sh

# I'd like to hold on to the dumped files, so that restores from the
# last 24 hours become very quick. I'll make hardlinks to the files
# in /packages/amanda/spool/*/*/ and I'll remove them before the next
# dump. (Maybe I can keep two days around, since I've got 80GB now.)

die() {
  echo "$1"
  exit $2
}


config=$1 # weekly or daily
config_dir=/packages/amanda/spool/$config
current=`ls -t $config_dir|egrep -v recent|head -1`

test -n "$current" || die "no current directory in $config_dir" 5
test -d $config_dir/recent || mkdir $config_dir/recent || die "couldn't
make $config_dir/recent" 6
test -d $config_dir/less_recent || mkdir $config_dir/less_recent || die
"couldn't make $config_dir/less_recent" 6


# poor-mans rotation:
rm -rf $config_dir/less_recent/*
mv $config_dir/recent/* $config_dir/less_recent/


while test -d $config_dir/$current
do
  (cd $config_dir/$current && \
   find . -type f \! -name '*.tmp' -exec ln {} $config_dir/recent/{} \;
2>/dev/null
   )
   sleep 1
done

echo "done capturing files from $config_dir/$current"

Reply via email to