Skip to main content

Backwork plug-in for MySQL backups.

Project description

backwork-backup-mysql Build Status PyPI version

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

backwork-backup-mysql-0.3.1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

backwork_backup_mysql-0.3.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file backwork-backup-mysql-0.3.1.tar.gz.

File metadata

  • Download URL: backwork-backup-mysql-0.3.1.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for backwork-backup-mysql-0.3.1.tar.gz
Algorithm Hash digest
SHA256 8ae0937afe643c243d36a882e03c9e21ee76a37da8deb44720267f9622d8e8a2
MD5 086a6771812f43118f24660d2fc8b326
BLAKE2b-256 9c86e97e8ae2de030d7f6a7ca5c8902d72f4e57e55f178a34ecc529e55c1a715

See more details on using hashes here.

File details

Details for the file backwork_backup_mysql-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for backwork_backup_mysql-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f8f458682d550da575d08813d8119a24f59d242cb928597ed1be807e12ccf84b
MD5 cff55d4fed380e36e1ab5488f3730724
BLAKE2b-256 0d626d1a15b79a7deb83ce68b16a347fa1cef1b66aeede527ea02c3e16abc306

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page