Skip to content

Assistant for Percona XtraBackup tool

Notifications You must be signed in to change notification settings

asamofal/xtrabackup-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xtrabackup-assistant

Assistant for Percona XtraBackup - tool automates the process of create and restoring your backups.

Key features

  • Simple use: only a few commands create, restore, rotate
  • Fully automated processes
  • Display progress bars where possible (especially handy for large backups)
  • Ability to work with remote storage (via SFTP)

Requirements

Python 3.9 or newer is required.

Config

  • project_name (required) - the name of a project. It's used in backup file names and Slack notifications
  • xtrabcakup (required):
    • xtrabcakup.user - the MySQL username used when connecting to the server (required for creating a backup)
    • xtrabcakup.password - the password to use when connecting to the database (required for creating a backup)
    • xtrabcakup.host - the host to use when connecting to the database (required for creating a backup)
    • xtrabcakup.parallel - the number of threads to use to copy multiple data files concurrently when creating/restoring a backup
  • sftp (optional) - if set can be used to work with remote SFTP storage (upload backups, download during restore, rotate backups there)
    • host - the hostname or IP of the SFTP server
    • user - the SFTP username
    • password - the SFTP user password
    • path - the path on the SFTP storage. It's used for uploading backups, searching available backups for restore and for rotate command
  • slack (optional) - if set Slack message will be sent in a case of failed backup creation
    • token - the access API token, the key to the Slack platform
    • channel - the name of Slack channel to which notifications will be sent
  • rotation (optional) - backups rotation settings
    • max_store_time_years - how many years backups will be stored on the SFTP storage
    • keep_for_last_days - backups created for this N last days will be excluded from rotation

Usage

  1. Create config (copy conf/config.json.exmaple to conf/config.json)
  2. Run one of the available commands: create (--upload available here), restore, rotate

Example:

python xtrabackup-assistant/main.py create --upload