MySQL 8.0 Reference Manual Including MySQL NDB Cluster 8.0

25.5.31 ndbxfrm — Compress, Decompress, Encrypt, and Decrypt Files Created by NDB Cluster

The ndbxfrm utility, introduced in NDB 8.0.22, can be used to decompress, decrypt, and output information about files created by NDB Cluster that are compressed, encrypted, or both. It can also be used to compress or encrypt files.

Table 25.52 Command-line options used with the program ndbxfrm

Format Description Added, Deprecated, or Removed

--compress,

-c

Compress file

ADDED: NDB 8.0.22

--decrypt-key=key

Supply file decryption key

ADDED: NDB 8.0.31

--decrypt-key-from-stdin

Supply file decryption key from stdin

ADDED: NDB 8.0.31

--decrypt-password=password

Use this password to decrypt file

ADDED: NDB 8.0.22

--decrypt-password-from-stdin

Get decryption password in a secure fashion from STDIN

ADDED: NDB 8.0.24

--defaults-extra-file=path

Read given file after global files are read

(Supported in all NDB releases based on MySQL 8.0)

--defaults-group-suffix=string

Also read groups with concat(group, suffix)

(Supported in all NDB releases based on MySQL 8.0)

--defaults-file=path

Read default options from given file only

(Supported in all NDB releases based on MySQL 8.0)

--encrypt-block-size=#

Print info about file including file header and trailer

ADDED: NDB 8.0.31

--encrypt-block-size=#

Size of input data chunks encrypted as a unit. Used with XTS, set to zero for CBC mode

ADDED: NDB 8.0.29

--encrypt-cipher=#

Encryption cipher: 1 for CBC, 2 for XTS

ADDED: NDB 8.0.29

--encrypt-kdf-iter-count=#,

-k #

Number of iterations used in key definition

ADDED: NDB 8.0.22

--encrypt-key=key

Use this key to encrypt file

ADDED: NDB 8.0.31

--encrypt-key-from-stdin

Use key supplied from stdin to encrypt file

ADDED: NDB 8.0.31

--encrypt-password=password

Use this password to encrypt file

ADDED: NDB 8.0.22

--encrypt-password-from-stdin

Get encryption password in a secure fashion from STDIN

ADDED: NDB 8.0.24

--help,

-?

Print usage information

ADDED: NDB 8.0.22

--info,

-i

Print file information

ADDED: NDB 8.0.22

--login-path=path

Read given path from login file

(Supported in all NDB releases based on MySQL 8.0)

--no-defaults

Do not read default options from any option file other than login file

(Supported in all NDB releases based on MySQL 8.0)

--print-defaults

Print program argument list and exit

(Supported in all NDB releases based on MySQL 8.0)

--usage,

-?

Prints usage information; synonym for --help

ADDED: NDB 8.0.22

--version,

-V

Output version information

ADDED: NDB 8.0.22


Usage

ndbxfrm --info file[ file ...]

ndbxfrm --compress input_file output_file

ndbxfrm --decrypt-password=password input_file output_file

ndbxfrm [--encrypt-ldf-iter-count=#] --encrypt-password=password input_file output_file

input_file and output_file cannot be the same file.

Options

ndbxfrm can encrypt backups created by any version of NDB Cluster. The .Data, .ctl, and .log files comprising the backup must be encrypted separately, and these files must be encrypted separately for each data node. Once encrypted, such backups can be decrypted only by ndbxfrm, ndb_restore, or ndb_print_backup from NDB Cluster 8.0.22 or later.

An encrypted file can be re-encrypted with a new password using the --encrypt-password and --decrypt-password options together, like this:

ndbxfrm --decrypt-password=old --encrypt-password=new input_file output_file

In the example just shown, old and new are the old and new passwords, respectively; both of these must be quoted. The input file is decrypted and then encrypted as the output file. The input file itself is not changed; if you do not want it to be accessible using the old password, you must remove the input file manually.