Amanda-Users

Re: Has anyone a script for Monthly/Daily backups

2005-08-17 15:49:56
Subject: Re: Has anyone a script for Monthly/Daily backups
From: Paul Bijnens <paul.bijnens AT xplanation DOT com>
To: amanda <amanda-users AT amanda DOT org>
Date: Wed, 17 Aug 2005 21:39:08 +0200
Paul Bijnens wrote:
====== cut here == Version 2, using one subprocess only
#!/bin/sh
# First friday of the month
case `date +%d%a` in
    [1-7]Fri) amdump monthly ;;
    *)  amdump daily ;;
esac
====== cut here

Oops, "date +%d" results in a zero padded two digit date, so
that should be:

> ====== cut here == Version 2, using one subprocess only
> #!/bin/sh
> # First friday of the month
> case `date +%d%a` in
>     0[1-7]Fri) amdump monthly ;;
>     *)  amdump daily ;;
> esac
> ====== cut 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          *
***********************************************************************