twindb / backup

TwinDB Backup
https://twindb-backup.readthedocs.io/en/stable/
Other
79 stars 44 forks source link

============= TwinDB Backup

.. image:: https://github.com/twindb/backup/actions/workflows/makefile.yml/badge.svg :target: https://github.com/twindb/backup/actions/workflows/makefile.yml

.. image:: https://github.com/twindb/backup/actions/workflows/intergration-tests.yml/badge.svg :target: https://github.com/twindb/backup/actions/workflows/intergration-tests.yml

.. image:: https://img.shields.io/codecov/c/github/twindb/backup.svg :target: https://codecov.io/gh/twindb/backup

.. image:: https://readthedocs.org/projects/twindb-backup/badge/ :target: https://twindb-backup.readthedocs.io/ :alt: Documentation Status

.. image:: https://img.shields.io/gitter/room/twindb/twindb-backup.svg :target: https://matrix.to/#/#twindb_backup:gitter.im :alt: Join the chat at https://gitter.im/twindb/backup

.. image:: https://pyup.io/repos/github/twindb/backup/shield.svg :target: https://pyup.io/repos/github/twindb/backup/ :alt: Updates

TwinDB Backup is a multipurpose tool for backing up MySQL database and regular files/directories on the file system. It can store backup copies on a remote SSH server, Amazon S3 or Google Cloud Storage.

TwinDB Backup accepts a backup copy stream from any of supported sources (MySQL Server, Percona Server, Percona XtraDB Cluster, or file system) and redirects the stream to a series of configurable modifiers.

The modifiers can compress the stream, encrypt it, and save a copy of the stream on the local disk.

Compression options:

Encryption options:

Because TwinDB Backup encrypts the stream itself it ensures transfer encryption as well as encryption at rest.

After the stream passed all modifiers it is sent to one of the configured backup destination. It can be:

.. figure:: https://user-images.githubusercontent.com/1763754/56677794-20901b80-6676-11e9-8f71-8de0b0b6f066.png :width: 800px :align: center :height: 600px :alt: TwinDB Backup Architecture :figclass: align-center

TwinDB Backup Architecture

The tool can easily restore the backup copies. Read full documentation on https://twindb-backup.readthedocs.io.

Features

TwinDB Backup key features:

TwinDB Backup storage options:

Other features:

How do I get set up?

TwinDB Backup can be installed from a DEB/RPM package.

Installing TwinDB Backup on Ubuntu


Install appropriate Percona XtraBackup version (2.4 for MySQL 5.6, 5.7 or 8.0 for MySQL 8.0).

.. code-block:: console

    # Download the package
    wget https://downloads.percona.com/downloads/Percona-XtraBackup-2.4/Percona-XtraBackup-2.4.26/binary/debian/focal/x86_64/percona-xtrabackup-24_2.4.26-1.focal_amd64.deb
    # Install XtraBackup
    apt install ./percona-xtrabackup-24_2.4.26-1.focal_amd64.deb

Install TwinDB Backup.

.. code-block:: console

    # Download the package
    wget https://twindb-release.s3.amazonaws.com/twindb-backup/3.3.0/focal/twindb-backup_3.3.0-1_amd64.deb
    # Install TwinDB Backup
    apt install ./twindb-backup_3.3.0-1_amd64.deb

Configuring TwinDB Backup

TwinDB Backup is configured in /etc/twindb/twindb-backup.cfg. See :ref:usage for details.

How to build TwinDB Backup manually

The TwinDB Backup package can build on a machine with Docker service. make package will build the package for the operating system defined in the OS_VERSION environment variable. Possible OS_VERSION values:

.. code-block:: console

# export OS_VERSION=focal
# make package

The package file will be generated in omnibus/pkg/:

.. code-block:: console

$ ls omnibus/pkg/*.deb
omnibus/pkg/twindb-backup_3.3.0-1_amd64.deb

Once the package is built you can install it with rpm/dpkg or upload it to your repository and install it with apt or yum.

Configuration

Configuration is stored in /etc/twindb/twindb-backup.cfg. See https://twindb-backup.readthedocs.io/ for more details.

.. include:: ../AUTHORS.rst

Credits

TwinDB Backup uses Percona Xtrabackup_ for MySQL backups.

.. Cookiecutter: https://github.com/audreyr/cookiecutter .. audreyr/cookiecutter-pypackage: https://github.com/audreyr/cookiecutter-pypackage .. _Percona Xtrabackup: https://www.percona.com/software/mysql-database/percona-xtrabackup