~gl-az/percona-xtrabackup/2.1-encrypted_stream

  • Committer: George O. Lorch III
  • Date: 2013-02-20 22:57:02 UTC
  • Revision ID: george.lorch@percona.com-20130220225702-7fwjjddziscfynoc
Introducing xtrabackup with encryption.

Encryption will be done through the libgcrypt library which can be found documented here: http://www.gnupg.org/documentation/manuals/gcrypt

Addition of libgcrypt requires now that libgcrypt and libgpgerror packages be installed.

Many package repositories still contain older versions of libgcrypt. The current stable version of 1.5.0 is reccomended and will take advantage of the AES-NI instruction set if available.

Similar to compression, encryption is not supported on streamed tar backups.

New options:
  --encrypt=<algorithm> : algorithm may be 'NONE', 'AES128', 'AES192' or 'AES256'. 'NONE' is used mainly for testing and is simply pass-through. Please refer to the libgcrypt manual for more information on these ciphers.

  --encrypt_key=<key> : a proper length encryption key to use. It is not reccomended to use this option where there is uncontrolled access to the machine as the command line and thus the key can be viewed as part of the process info. See option --encrypt_key_file.

  --encrypt_key_file=<keyfile> : the name of a file where the raw key of the appropriate length can be read from. The file must be a simple binary (or text) file that contains exactly the key to be used.

  --encrypt_threads=<threadcount> : number of threads used to encrypt in parallel (default=1).

  --encrypt_chunk_size=<size> : size (in bytes) of the working encryption buffer size for each encryption thread (default=64K).

  --compress_chunk_size=<size> : size (in bytes) of the working compression buffer size for each encryption thread (default=64K).

encrypt_key and encrypt_key_file are mutually exclusive. If --encrypt is specified, one of these MUST be specified else an error will occur.

encryption key lengths must be precise:
AES128=128 bits or 16 bytes
AES192=192 bits or 24 bytes
AES256=256 bits or 32 bytes

When using the encrypt_key_file option, the file specified may have binary or textual content but must be _exactly_ the correct size for the algorithm being used. If using text, caution must be taken so that there are no extra spaces, tabs, carriage returns or line feeds within the file. These will cause the key to be read as an incorrect size and an error will be generated.

The coding task was fairly straight forward with some restructure/refactoring approved by Alexey K:
  - Update/set copyright notice in new and touched files to Copyright (c) 2009-2013 Percona Ireland Ltd.
  - Implemented new ds_stdout data sink.
  - Split the ds_stream data sink into two new, more specific data sinks, ds_archive and ds_xbstream.
  - Implement write callback model for ds_xbstream similar to libarchive.
  - Change ds_archive and ds_xbstream over to using callback write models.
  - Add new option to compression --compress_chunk_size to allow user specified chunk size management.
  - Implement xbcrypt format reader/writer. Format encapsulated as follows:
      8 bytes - magic string "XBCRYP01"
      8 bytes - reserved
      8 bytes - original size
      8 bytes - encrypted size
      4 bytes - checksum
      'encrypted size' bytes - encrypted data
  - Implement a new ds_encrypt datasync modeled after the existing compression datasync which will use libgcrypt for actual encryption task and write callbacks.
  - Add new options, options validations and pass through innobackupex.
  - Implement new utility xbcrypt modeled after xbstream to perform encryption outside of xtrabackup for metadata and to offer a means of decrypting an encrypted backup.
  - Implement new tests and refactor test script structure a little to make adding new, similar test cases a little easier.
Filename Latest Rev Last Changed Committer Comment Size
..
contrib 241.3.1 13 years ago Daniël van Eeden Add contrib directory with an backup script exampl Diff
doc 213.3.1 13 years ago Aleksandr Kuzminsky Added XtraBackup manual page Diff
patches 228.1.2 13 years ago Alexey Kopytov Port XtraBackup to Percona Server 5.5.9-beta20.1 c Diff
src 385.1.1 12 years ago Alexey Kopytov Rebase of the parallel compression patch on new tr Diff
test 134.1.1 13 years ago Aleksandr Kuzminsky Added the XtraBackup test framework Diff
utils 30.1.2 15 years ago Vadim Tkachenko directory restructure Diff
.bzrignore 391.1.58 11 years ago Stewart Smith merge from 1.6: Bug #1021954: XtraBackup on MultiI 196 bytes Diff Download File
BUILD-WIN.txt 244.4.1 13 years ago Alexey Kopytov Added initial support for Windows builds: - remov 2.9 KB Diff Download File
BUILD.txt 454.1.1 11 years ago Hrvoje Matijakovic - Bug fixes for bug: Bug #1073502, Bug #1075269 an 2.2 KB Diff Download File
CMakeLists.txt 244.4.1 13 years ago Alexey Kopytov Added initial support for Windows builds: - remov 1.6 KB Diff Download File
COPYING 174.1.1 13 years ago Stewart Smith add COPYING file with GPLv2 license. xtrabackup is 18.6 KB Diff Download File
File innobackupex 488 11 years ago George O. Lorch III Introducing xtrabackup with encryption. Encryptio 100 KB Diff Download File
VERSION 464 11 years ago Stewart Smith merge 1.6.7 release branch 25 bytes Diff Download File