--On Wednesday, August 17, 2005 17:58:30 +0100 "chuck.amadi" <[EMAIL 
PROTECTED]> wrote:

> Has anyone a script that will check for the last friday of the month and if 
> So run the monthly config backup or if not the usually daily config.
 
If you have gnu date available (the one used by Linux and sometimes
available on other OSes, or you could build it from source) , you could
run a script from cron every Friday that does something like:

if [ `date -d 'next friday' +%m` -ne `date +%m` ] ; then
  amdump archiveconfig
fi

If you don't have gnu date then it gets messy, since you have to figure
out if 7 days from now is still this month or next, worrying about the
length of the month and whether or not it's a leap year.

> I am currently looking at hacking something together as I was just going to 
> edit the crontab and comment and uncomment between daily and monthly.
> 
> I have a 10 tape run So a 2 week daily schedule but I to implement a monthly 
> that will run on the last fridat of each month.

Make sure your archive config dumptype has 'record no' in it or it will
mess up your daily schedule.

Frank

> 
> If anyone got a script please let me know ever - way I will post my hack if 
> possible.



-- 
Frank Smith                                      [EMAIL PROTECTED]
Sr. Systems Administrator                       Voice: 512-374-4673
Hoover's Online                                   Fax: 512-374-4501

Reply via email to