Skip to content
This repository has been archived by the owner on Feb 7, 2018. It is now read-only.
/ mysqldump2amazon-s3 Public archive

NOT LONGER MAINTAINED - Dump MySQL databases and puts them in Amazon S3

License

Notifications You must be signed in to change notification settings

creads/mysqldump2amazon-s3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mysqldump2amazon-s3

Dump MySQL databases and/or archive a directory and puts them in Amazon S3.

INSTALL MySQL Backup

  1. Install s3cmd (do only once)

     wget -O- -q http://s3tools.org/repo/deb-all/stable/s3tools.key | sudo apt-key add -
     sudo wget -O/etc/apt/sources.list.d/s3tools.list http://s3tools.org/repo/deb-all/stable/s3tools.list
     sudo apt-get update && sudo apt-get install s3cmd
    
  2. Configure s3cmd (do only once)

     s3cmd --configure
    
  3. Download script

     cd /usr/local/bin
     wget https://raw.githubusercontent.com/creads/mysqldump2amazon-s3/master/mysqldump2amazon-s3.sh
     chmod +x mysqldump2amazon-s3.sh
    
  4. Create mysql user

     mysql -u root -p
     CREATE USER 'backup'@'localhost';
     GRANT SELECT, LOCK TABLES ON *.* TO 'backup'@'localhost' IDENTIFIED BY '***';
     FLUSH PRIVILEGES;
     exit;
    
  5. Edit script config

     nano mysqldump2amazon-s3.sh
    
  6. Execute

     ./mysqldump2amazon-s3.sh
    

Optionaly edit your crontab

    crontab -e
    0 3 * * * sh /usr/local/bin/mysqldump2amazon-s3.sh

INSTALL directory Backup

  1. Install s3cmd (do only once)

     wget -O- -q http://s3tools.org/repo/deb-all/stable/s3tools.key | sudo apt-key add -
     sudo wget -O/etc/apt/sources.list.d/s3tools.list http://s3tools.org/repo/deb-all/stable/s3tools.list
     sudo apt-get update && sudo apt-get install s3cmd
    
  2. Configure s3cmd (do only once)

     s3cmd --configure
    
  3. Download script

     cd /usr/local/bin
     wget https://raw.githubusercontent.com/creads/mysqldump2amazon-s3/master/filedump2amazon-s3.sh
     chmod +x filedump2amazon-s3.sh
    
  4. Edit script config

     nano filedump2amazon-s3.sh
    
  5. Execute

     ./filedump2amazon-s3.sh
    

Optionaly edit your crontab

    crontab -e
    0 3 * * * sh /usr/local/bin/filedump2amazon-s3.sh

About

NOT LONGER MAINTAINED - Dump MySQL databases and puts them in Amazon S3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages