[EMAIL PROTECTED] wrote:
I connected to my office LAN a postgresql server with the latest linux
gentoo. By means of "crontab" each working day at 3am the following "crono" script
- backing up my complete DB and the /etc dir to a network share - is executed:
#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?
Ciao Vittorio
-- [email protected] mailing list
Try something like this... dow=`date +%w` bkfile="rootpg_dumpcurve-$dow.tar.gz" /usr/bin/pg_dump -C -O -Fc -Upostgres --file=$bkfile
Craig -- [email protected] mailing list
