Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Casey Ydenberg
15,622 PointsMySQL backup
I'm wondering what the best way is to backup my MySQL database. I have access to a second server that does NOT support MySQL. Should I just buy space on another server that does, or is there a way I can dump the contents (into say XML) and then securely transfer those files?
4 Answers
Andrew McCormick
17,730 PointsI use MySQLDumper (http://www.mysqldumper.net/). I have run as a cron job that creates a .gz file. Though I must admit I back up to the same server (i know, I know) you should be easily able to send that compressed file to your other server (if that's not already in MYSQLDumper).
John Wheal
27,969 PointsI have written a cron job that automatically exports a .sql file of the database. It then copies that data to Amazon Web Services S3.
I recently wrote an article on how to get stared using S3 here http://mytechblog.com/2013/01/getting-started-with-amazon-s3/
James Barnett
39,199 Pointssecurely transfer those files
That's what sftp is for.
Casey Ydenberg
15,622 PointsThanks for all your input. I'm a total n00b at Linux.
I can't seem to install s3cmd on my main server - I get an error about it being a read-only filesystem and as it's a shared server I don't know there's anything I can do about that.
I'll probably try to figure out how to create a cron job that creates an automated backup and transfers to my other server - in the meantime backup manually once a week or so.