Skip to main content

MySQL-AutoXtrabackup

MySQL AutoXtrabackup commandline tool written in Python 3. The source code fully typed with hints - structured the project mostly similar to FastAPI and Pydantic

For community from Azerbaijan MySQL User Community: Python Azerbaijan Community.

For any question please open an issue here.

What this project is about?

The idea for this tool, came from my hard times after accidentally deleting the table data. There was a full backup and 12 incremental backups. It took me 20 minutes to prepare necessary commands for preparing backups. If you have compressed + encrypted backups you need also, decrypt and decompress, which is going to add extra time for preparing backups. Then I decided to automate this process. In other words, preparing necessary commands for backup and prepare stage were automated.

We have nice CLI with necessary options:

autoxtrabackup --help
Usage: autoxtrabackup [OPTIONS]

Options:
  --dry-run                       Enable the dry run.
  --prepare                       Prepare/recover backups.
  --run-server                    Start the FastAPI app for serving API
  --backup                        Take full and incremental backups.
  --version                       Version information.
  --defaults-file TEXT            Read options from the given file  [default: /
                                  home/shako/.autoxtrabackup/autoxtrabackup.cn
                                  f]

  --tag TEXT                      Pass the tag string for each backup
  --show-tags                     Show backup tags and exit
  -v, --verbose                   Be verbose (print to console)
  -lf, --log-file TEXT            Set log file  [default: /home/shako/.autoxtr
                                  abackup/autoxtrabackup.log]

  -l, --log, --log-level [DEBUG|INFO|WARNING|ERROR|CRITICAL]
                                  Set log level  [default: INFO]
  --log-file-max-bytes INTEGER    Set log file max size in bytes  [default:
                                  1073741824]

  --log-file-backup-count INTEGER
                                  Set log file backup count  [default: 7]
  --help                          Print help message and exit.

If you think, CLI is not for you. We have experimental feature where you can start API server and take backups using API call(ATTENTION: FastAPI involved)

sudo `which autoxtrabackup` --run-server
INFO:     Started server process [30238]
INFO:     Waiting for application startup.
app started
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:5555 (Press CTRL+C to quit)
$ curl -X POST http://127.0.0.1:5555/backup
{"result":"Successfully finished the backup process"}

For the rest please read the full documentation.

Development:

Current major version is >= 2.0 - so if you want to help, please do changes on this branch and then kindly send PR :) I also encourage you to upgrade from older version as the code base fully updated. Do you have an idea, question please open an issue.

Read full documentation here:

MySQL-AutoXtrabackup documentation!

Release files for mysql_autoxtrabackup 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mysql_autoxtrabackup 2.0.2
File Size Uploaded
mysql_autoxtrabackup-2.0.2.tar.gz 102.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mysql_autoxtrabackup 2.0.2
File Interpreter ABI Platform
mysql_autoxtrabackup-2.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 139.3 kB

Release files / mysql_autoxtrabackup-2.0.2.tar.gz

Download URL mysql_autoxtrabackup-2.0.2.tar.gz
Size 102.8 kB
Tags Source
SHA-256 checksum
How to use checksums
29c22c136b37520262cd238598ea6c0a1e5fd57c6cf62c5fda01f0c3afc5fe17
BLAKE2b-256 checksum
How to use checksums
9a7b6cf06617866f49e29773d63c22d9013ec3809e7744cad7c9f32752db02fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.23.0

Release files / mysql_autoxtrabackup-2.0.2-py3-none-any.whl

Download URL mysql_autoxtrabackup-2.0.2-py3-none-any.whl
Size 36.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7fc5cf5494a8d6531e9593feee6c836ec26324114283e30eaed3979cd7577ca8
BLAKE2b-256 checksum
How to use checksums
3663855741cf1d3c78756ad07bc82a9cdf661f7234aff83eb06ba72ed0932e74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.23.0

Release history Release notifications | RSS feed

This release

2.0.2 This release

2 release files

2.0.1

2 release files

2.0

2 release files

1.5.5

2 release files

1.5.4

3 release files

1.5.3

3 release files

1.5.2

2 release files

1.5.1

3 release files

1.5.0

4 release files

1.4.9

2 release files

1.4.8

1 release file

1.4.7

1 release file

1.4.6

1 release file

1.4.5

2 release files

1.4.4

1 release file

1.4.3

1 release file

1.4.2

1 release file

1.4.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page