Buy Percona ServicesBuy Now!

pt-secure-collect

Collect, sanitize, pack and encrypt data. By default, this program will collect the output of:

  • pt-stalk --no-stalk --iterations=2 --sleep=30 --host=$mysql-host --dest=$temp-dir --port=$mysql-port --user=$mysql-user --password=$mysql-pass
  • pt-summary
  • pt-mysql-summary --host=$mysql-host --port=$mysql-port --user=$mysql-user --password=$mysql-pass

Internal variables placeholders will be replaced with the corresponding flag values. For example, $mysql-host will be replaced with the values specified in the --mysql-host flag.

Usage:

pt-secure-data [<flags>] <command> [<args> ...]

Global flags

Flag Description
–help Show context-sensitive help (also try –help-long and –help-man).
–debug Enable debug log level.

Commands

Help command

Show help

Collect command

Collect, sanitize, pack and encrypt data from pt-tools. Usage:

pt-secure-collect collect <flags>
Flag Descri ption
–bin- dir Direct ory having the Percon a Toolki t binari es (if they are not in PATH).
–temp -dir Tempor ary direct ory used for the data collec tion. Defaul t: ${HOME }/data _coll ection _{tim estamp }
–incl ude-di r Includ e this dir into the saniti zed tar file
–conf ig-fil e Path to the config file. Defaul t: ``~/.m y.cnf` `
–mysq l-host MySQL host. Defaul t: ``127. 0.0.1` `
–mysq l-port MySQL port. Defaul t: ``3306 ``
–mysq l-user MySQL user name.
–mysq l-pass word MySQL passwo rd.
–ask- mysql- pass Ask MySQL passwo rd.
–extr a-cmd Also run this comman d as part of the data collec tion. This parame ter can be used more than once.
–encr ypt-pa ssword Encryp t the output file using this passwo rd.If ommite d, it will be asked in the comman d line.
–no-c ollect Do not collec t data
–no-s anitiz e Do not saniti ze data
–no-e ncrypt Do not encryp t the output file.
–no-s anitiz e-host names Do not saniti ze host names.
–no-s anitiz e-quer ies Do not replac e querie s by their finger prints .
–no-r emove- temp-f iles Do not remove tempor ary files.

Decrypt command

Decrypt an encrypted file. The password will be requested from the terminal.
Usage:
pt-secure-collect decrypt [flags] <input file>
Flag Descrip tion
–outf ile Write the output to this file.If ommited , the output file name will be the same as the input file, adding the ``.aes` ` extensi on

Encrypt command

Encrypt a file. The password will be requested from the terminal.
Usage:
pt-secure-collect encrypt [flags] <input file>
Flag Descrip tion
–outf ile Write the output to this file.If ommited , the output file name will be the same as the input file, without the ``.aes` ` extensi on

Sanitize command

Replace queries in a file by their fingerprints and obfuscate hostnames.
Usage:
pt-secure-collect sanitize [flags]
Flag Description
–input-file Input file. If not specified, the input will be Stdin.
–output-file Output file. If not specified, the input will be Stdout.
–no-sanitize-hostnames Do not sanitize host names.
–no-sanitize-queries Do not replace queries by their fingerprints.

Table Of Contents

Previous topic

pt-query-digest

Next topic

pt-show-grants

Visit Percona Store


General Inquiries

For general inquiries, please send us your question and someone will contact you.