On Wednesday 30 March 2005 17:39, [EMAIL PROTECTED] wrote:

> #crono
> /usr/bin/vacuumdb
> /usr/bin/pg_dump -C -O -Fc -Upostgres
> --file=/root/pg_dump/curve.tar.gz curve
> tar -cz /etc > /root/pg_dump/etc.tar.gz
>
> Therefore each working day night curve.tar.gz is overwritten as well
> as etc.tar.gz.
>
> I would like instead to "enumerate" the two files (starting from
> monday = 1, till friday=5)
> in order to keep a week backup, such as for instance: curve.1.tar.gz ,
> curve.2.tar.gz, .. curve.5. tar.gz  and the same for etc
>
> How can I obtain this result with crontab?

I think cron alone can't handle this.

Modify your script adding this line at the start:

WEEKDAY=`date +%u`

and then give the files names like curve.${WEEKDAY}.tar.gz and 
etc.${WEEKDAY}.tar.gz

-- 
Double your drive space - delete Windows!
--
[email protected] mailing list

Reply via email to