Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

MySQL backup commands and sizes

Adventures in storing and backing up a typical database using innobackupex and gpg. Using gzipped tar due to ubiquity, even though it's possibly 10-20% worse on perf/storage.

Sizes:

PREPARED (ie ready to move to MySQL folder)

  • 2800MB Uncompressed and prepared (roughly the size of live database)
  • 21000MB Uncompressed before compression
  • 700MB Crypted+Compressed (ideal for external storage)

Simple encryption model with shared keys:

innobackupex --stream=tar ./ | gpg --symmetric --passphrase=$(cat /home/db/db.key) > backup.tgz.crypt

Decrypt:

(cd ~/restore ; gpg --decrypt --passphrase=$(cat /home/db/db.key) backup.tgz.crypt | tar xvf -)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.