kuaukutsu / mysqldump-backup

Сreating backup using mysqldump and post-processing for backup preservation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mysqldump

Install

Requirements:

Install from requirements.txt

pip install -r requirements.txt

Install 7zip (for add files to archive before attach to mail)

. install p7zip p7zip-plugins

Install webdavclient https://github.com/designerror/webdav-client-python

# yum install libcurl-devel
# pip uninstall pycurl
# export PYCURL_SSL_LIBRARY=nss
# pip install pycurl
$ sudo apt-get install libxml2-dev libxslt-dev python-dev
$ sudo apt-get install libcurl4-openssl-dev python-pycurl 
$ sudo easy_install webdavclient

Settings

Mysql connect (mysql --login-path=local):

mysql_config_editor set --login-path=local --host=localhost --user=username --password

Edit ./mysqldump.cfg

cp ./mysqldump.cfg.example ./mysqldump.cfg

Run

/usr/local/bin/python /mysqldump.py -d BASENAME 
    --sendmail=NAMESPACE 
    --storage=NAMESPACE
    --encrypt-pass=YOUPASS

Help

/usr/local/bin/python /mysqldump.py --help

About

Сreating backup using mysqldump and post-processing for backup preservation

License:BSD 2-Clause "Simplified" License


Languages

Language:Python 98.7%Language:Dockerfile 1.3%