Backwork plug-in for MySQL backups.
Project description
backwork-backup-mysql
Add support for MySQL backups on backwork
.
Requirements
This plug-in is build on top of mysqldump
,
so you will need to it installed.
mysqldump
is part of the mysql
client.cd .
Installing
You can use pip
to install this plug-in:
$ pip install backwork-backup-mysql
Using
After installing the plug-in you will be able to use the backup mysql
and restore mysql
commands
on backwork
:
backwork backup mysql
$ backwork backup mysql -h
usage: backwork backup mysql [-h] [--gzip] [-o OUTPUT]
Backup a MySQL database. It uses `mysqldump` so it's required to have it
installed and added to the system's PATH. You can use any of the arguments
supported by `mysqldump`. Use `mysqldump -h` for more information.
optional arguments:
-h, --help show this help message and exit
--gzip compress output file (requires gzip to be installed)
-o OUTPUT, --output OUTPUT
output file path
You can pass any option that you would normally use on mysqldump
:
$ backwork backup mysql --host 192.168.99.1 -u root -ppassword --port 32769 --all-databases
As shown in the --help
message, there are two extra arguments you can use in
your backup process --gzip
and -o
.
--gzip
will compress the output and requires the gzip
command to be
available in your system.
-o OUTPUT
or --output OUTPUT
will save the output of mysqldump
into a
file.
backwork restore mysql
usage: backwork restore mysql [-h] [--gzip] [-i INPUT]
Restore MySQL databases. It uses `mysql` so it's required to have it
installed and added to the system's PATH.
optional arguments:
-h, --help show this help message and exit
--gzip decompress backup file before restoring (requires gzip to be installed)
You can pass any option that you would normally use to connect to your mysql instance:
$ backwork restore mysql --host 192.168.99.1 -u root -ppassword --port 32769 --gzip --input=="mybackup.archive.gz"
Important: There is a conflict with the -h
argument since it is reserved
for the help/usage message. User --host
to pass the hostname.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for backwork-backup-mysql-0.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ae0937afe643c243d36a882e03c9e21ee76a37da8deb44720267f9622d8e8a2 |
|
MD5 | 086a6771812f43118f24660d2fc8b326 |
|
BLAKE2b-256 | 9c86e97e8ae2de030d7f6a7ca5c8902d72f4e57e55f178a34ecc529e55c1a715 |
Hashes for backwork_backup_mysql-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8f458682d550da575d08813d8119a24f59d242cb928597ed1be807e12ccf84b |
|
MD5 | cff55d4fed380e36e1ab5488f3730724 |
|
BLAKE2b-256 | 0d626d1a15b79a7deb83ce68b16a347fa1cef1b66aeede527ea02c3e16abc306 |