Amanda-Users

RE: 3 day rotation, answer (long)

2003-01-20 14:55:22
Subject: RE: 3 day rotation, answer (long)
From: "Jeremy L. Mordkoff" <jlm AT tatarasystems DOT com>
To: "Jon LaBadie" <jon AT jgcomp DOT com>
Date: Mon, 20 Jan 2003 14:25:16 -0500
Yes. My crontab now calls my script and passes it one arg, either 3 or
5. My config name is daily. My script is

#!/bin/sh -x
# script to adjust dumpcycle based on the day of the week 
# and then call amdump
# could ascertain the day of the week using some form of date, 
# but for now the desired dumpcycle is passed as an arg
#
# JLM 1/16/2003 Genesis

level=$1

# shift away this arg so that any additionals can be passed on to amdump
shift

perl -i.bak -p -e "s/dumpcycle [0-9]* days/dumpcycle $level days/; \
/usr/local/etc/amanda/daily/amanda.conf

# now do the dump passing along any additional args
/usr/local/sbin/amdump daily $@


I will report back if any oddities occur over the next few weeks, but
from what I can see from the backup log, this has done exactly what I
want.

JLm

Jeremy Mordkoff
Tatara Systems
978-206-0808 (direct)
978-206-0888 (fax)
 
injustice anywhere threatens justice everywhere -- Dr. Martin Luther
King

-----Original Message-----
From: Jon LaBadie [mailto:jon AT jgcomp DOT com] 
Sent: Monday, January 20, 2003 2:21 PM
To: Jeremy L. Mordkoff
Cc: amanda-users AT amanda DOT org
Subject: Re: 3 day rotation, answer (long)

On Mon, Jan 20, 2003 at 02:02:55PM -0500, Jeremy L. Mordkoff wrote:
> 
> What I have found (that seems to work) is to set dumpcycle to 5 on
> Mondays and Tuesdays (so Amanda will look back far enough in time).
Then
> I set it back to 3 days on Wednesdays, Thursdays and Fridays. This
seems
> to have the exact desired affect. This morning's (Monday's) backups
had
> level 0's for each system that had not gotten a level 0 last Thursday
or
> Friday. 

Imaginative!  I hope it continues to work well for you.

Do you do the change by having a program run just before,
and part of the amdump entry in crontab?

-- 
Jon H. LaBadie                  jon AT jgcomp DOT com
 JG Computing
 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)

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