zlochko
07-09-2010, 04:31 PM
Hallo everyone,
Due to constant complaining of a customer that their website data get's corrupted on it's own :) i've decided to make a db backup on daily basis via a cron job.
So, the cron is ok... it works just fine, but since it always saves the backup file under the same name I only get to have the last night's backup.
What i need is to expand the cron job to send the file to my master email address, or at least save the backup file always under a different name (preferably with date included).
Anyone having an idea?
This is the actual cron: mysqldump --user=hostaccount --password='ToughPassword!' --host=localhost hostaccount_dbname > /home4/hostaccount/db_backup/sitename.sql
Due to constant complaining of a customer that their website data get's corrupted on it's own :) i've decided to make a db backup on daily basis via a cron job.
So, the cron is ok... it works just fine, but since it always saves the backup file under the same name I only get to have the last night's backup.
What i need is to expand the cron job to send the file to my master email address, or at least save the backup file always under a different name (preferably with date included).
Anyone having an idea?
This is the actual cron: mysqldump --user=hostaccount --password='ToughPassword!' --host=localhost hostaccount_dbname > /home4/hostaccount/db_backup/sitename.sql