If you want to add dates to backups or logs, like mythtvDB27062008.sql within crontab, do the following:
0 0 * * * /usr/bin/mysqldump -u mythtv -pPassword mythconverg > /mythtv/recordings/mythtvDB`date +%d%m%Y`.sql
The key is the backquotes around the `date +%d%m%Y` command. This will backup a MythTV MySQL database to a file like this: /mythtv/recordings/mythtvDB27062008.sql every night at midnight.
No comments:
Post a Comment