Giter Club home page Giter Club logo

xtrabackup-snap's Introduction

xtrabackup snap package

Snap package for xtrabackup open source backup tool by Percona.

Build

foo@bar:~$ snapcraft
# or
foo@bar:~$ snapcraft --use-lxd

Install

foo@bar:~$ sudo snap install ./xtrabackup_8.0.30-23_amd64.snap --dangerous

Usage

It's necessary to manually connect the mysql-files interface to allow access to read (on backup) and write (on restore) to database data directory.

foo@bar:~$ sudo snap connect xtrabackup:mysql-data

An example script for backing up to S3 is:

USER="<user>"
PASSWORD="<password>"
S3_BUCKET="backups"
S3_PATH="$(date -Iminutes)-backup"
S3_KEY="<s3-key>"
S3_SECRET="<s3-secret>"
HOST="a.database.domain"

xtrabackup --defaults-group=mysql --no-version-check \
    --parallel=$(grep -c processor /proc/cpuinfo) \
    --user=${USER} \
    --password=${PASSWORD} \
    --host=${HOST} \
    --lock-ddl \
    --no-server-version-check \
    --backup \
    --stream=xbstream \
    --xtrabackup-plugin-dir=/usr/lib/mysql/plugin \
    --target-dir=/tmp | \
    xtrabackup.xbcloud put \
    --curl-retriable-errors=7 --insecure --storage=s3 --parallel=10 --md5 \
    --s3-bucket="$S3_BUCKET" \
    --s3-access-key=$S3_KEY \
    --s3-secret-key=$S3_SECRET \
    "$S3_PATH"

Refer to official docs from Percona

xtrabackup-snap's People

Contributors

carlcsaposs-canonical avatar paulomach avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xtrabackup-snap's Issues

CI/CD publisher to snapstore.io has failed

CI/CD failed with strange error:

...
craft-store error: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Could it be related to the locked release #2 in snapstore?

In any case, we need to revise and refactor mysql-data plug due to:

 “Use of the system-files interface is reserved for vetted publishers. If your snap legitimately requires this access, please make a request in the forum using the 'store-requests' category (https://forum.snapcraft.io/)”

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.