auto database backup
Moderator: General Moderators
-
frustratednewguy
- Forum Newbie
- Posts: 2
- Joined: Sat Mar 20, 2004 1:15 pm
auto database backup
Is there a way to backup a database automatically, ie: if there are any changes to a table, a CSV file is automatically emailled to you?
you could make a function and put it in update/insert etc sections of your site, which after changeing the database, would email you the csv.
or you can just setup a cron job, if you dont have this option then make a file with timstamp in it, check that file every X hours when changeing the db and if the stamp is older then 5 hours for example, it would email you the csv and update stamp in the file, you can also make a table in db for this.
or you can just setup a cron job, if you dont have this option then make a file with timstamp in it, check that file every X hours when changeing the db and if the stamp is older then 5 hours for example, it would email you the csv and update stamp in the file, you can also make a table in db for this.
also consider what kind of application and table types you have. innodb backups need more effort and parts. Note its always best to do a cold back up where the server is shut down (though a 24/7 operation may not have the ability to shutdown to do backups). Replication to anther server might also be a process that you can consider...
Get this book. High Perfomance Mysql talks about all sorts of factors like this...great read and well written
Get this book. High Perfomance Mysql talks about all sorts of factors like this...great read and well written