> 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?
Use "date +%u" to get the day of the week, as in the following: #crono WEEKDAY=`date +%u` /usr/bin/vacuumdb /usr/bin/pg_dump -C -O -Fc -Upostgres --file=/root/pg_dump/curve.$WEEKDAY.tar.gz curve tar -cz /etc > /root/pg_dump/etc.$WEEKDAY.tar.gz -- [email protected] mailing list
