Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

mysqldump is probably not the best idea on running backups every x hours but is the one that we are currently using. The backups are around 150 Megs each so sending it to other machines could waste many gigs of bandwidth.

Is there any tool or application or script that could automate the creation of the backup and the upload to s3 amazon service or any similar.

Thanks.

share|improve this question

migrated from stackoverflow.com Oct 2 '12 at 20:55

This question came from our site for professional and enthusiast programmers.

3 Answers 3

Zmanda Enterprise offers backup to S3.

share|improve this answer
    
I am checking out this software, apparently the option for S3 backup is with the enterprise edition. Have you tested backup for S3 with the community edition? –  Geo Dec 19 '08 at 14:50

Either you set up the LVM and/or a back-up slave.

On the target machine:
mysql> STOP SLAVE -- if a back-up slave is used
mysql> FLUSH TABLES READ LOCK
^Z
% lvm_snapshot_blah blah-blah on /mnt/backup_image  
% fg
mysql> UNLOCK TABLES
mysql> START SLAVE -- if a back-up slave is used
^Z
% mount /mnt/backup_image /mnt/backup
% s3upload_recursively /mnt/backup/mysql_data https://s3.amazon.com/blah_blah
share|improve this answer
    
The s3upload_recursively is that an inhouse script or that is a generic term? I am just wondering how you were able to upload with that command. –  Geo Dec 19 '08 at 15:53
    
I just made that up like s3upload_recursively_blah_blah. You could use code.google.com/p/s3-bash . But it doesn't support recursive uploading. –  yogman Dec 20 '08 at 0:48

A good way to save space and bandwidth is to only backup the tables that were updated.

I found this by accident, but it looks like a good starting point for a backup script:

SELECT TABLE_NAME, UPDATE_TIME, CREATE_TIME
FROM information_schema.tables
WHERE TABLE_SCHEMA = 'database_name' AND UPDATE_TIME > CREATE_TIME;
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.