Backup selected mysql databases and upload it via FTP.
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Small python script which is designated to back up selected mysql databases and upload it via FTP. Database and ftp credentials are stored in configuration yaml file config.yaml. If you need to upload dumps to a specific folder, you shoud define ftp_dir. The list of databases which should be backed up are in sequence under map databases.

--- # Configuration
username : root
password : root
hostname : localhost
ftp_user :
ftp_pass :
ftp_host :
ftp_dir  :
databases :
    - "earthquakes"
    - "information_schema"

New folders are created in the root directory. These folders are named by followed format YYYY-MM-DD.

The best way to back up databases regularly is by a cron. Personally, I wrote it in crontab.

0 1 * * * python /usr/lib/mysql-backup/