database backup
- Started
- Last post
- 4 Responses
- ukit
Any solutions to recommend for automating the process of backing up MySQL databases and project files on a VPS?
Not for a large collaborative project, just several small to medium sized websites. I know some people use Amazon or Google storage for this but not really sure where to start.
- ar170na0
By VPS, do you use Amazon EC2 by chance?
You can create a script that exports your MySQL database and uploads it to an Amazon S3 account, and have that programmed to be daily or weekly.
- acescence0
cron
- gregorywieber0
Are you using Ruby on Rails? If so, look into 'Whenever'. It makes setting up cron tasks easier and more 'ruby-esque'. I'm not sure what the specific sql commands are for what you're trying to do, but I'm sure it's a simple matter of setting up a cron job that exports the database to a flat file and then sends the file to s3 or whatever you want your backup server to be using a protocol of your choice..
- section_0140
How big are the databases? I use a cron job to back shit up nightly and another one to delete the one's that are a week old. If space isn't too tight on your server I don't see why you'd back them up other places. Are your drives not mirrored?
- fire, electrical, natural disasters. yes, this has happened to meacescence