File: pt-secure-collect.rst

package info (click to toggle)
percona-toolkit 3.0.13-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 62,876 kB
  • sloc: perl: 239,984; sql: 22,831; sh: 19,126; makefile: 272; awk: 38; python: 30; sed: 1
file content (175 lines) | stat: -rw-r--r-- 3,317 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
.. program:: pt-secure-collect

============================
:program:`pt-secure-collect`
============================

NAME
====

:program:`pt-secure-collect` - collect, sanitize, pack and encrypt data.

SYNOPSIS
========

Usage
-----

::

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

By default, :program:`pt-secure-collect` will collect the output of:

-  ``pt-stalk``
-  ``pt-summary``
-  ``pt-mysql-summary``

Global flags
------------

.. option:: --help

   Show context-sensitive help (also try --help-long and --help-man).

.. option:: --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>

  .. option:: --bin-dir

     Directory having the Percona Toolkit binaries (if they are not in PATH).

  .. option::  --temp-dir

     Temporary directory used for the data collection.
     Default: ``${HOME}/data_collection_{timestamp}``

  .. option::  --include-dir

     Include this dir into the sanitized tar file.

  .. option:: --config-file
  
     Path to the config file. Default: ``~/.my.cnf``

  .. option:: --mysql-host

     MySQL host. Default: ``127.0.0.1``

  .. option:: --mysql-port

     MySQL port. Default: ``3306``

  .. option:: --mysql-user

     MySQL user name.

  .. option:: --mysql-password

     MySQL password.

  .. option:: --ask-mysql-pass

     password.

  .. option:: --extra-cmd

     Also run this command as part of the data collection. This parameter can
     be used more than once.

  .. option:: --encrypt-password

     Encrypt the output file using this password. If ommited, it will be asked
     in the command line.

  .. option:: --no-collect

     Do not collect data

  .. option:: --no-sanitize

     Do not sanitize data

  .. option:: --no-encrypt

     Do not encrypt the output file.

  .. option:: --no-sanitize-hostnames

     Do not sanitize hostnames.

  .. option:: --no-sanitize-queries

     Do not replace queries by their fingerprints.

  .. option:: --no-remove-temp-files

     Do not remove temporary files.

* **Decrypt command**

  Decrypt an encrypted file. The password will be requested from the
  terminal. Usage:

  ::

    pt-secure-collect decrypt [flags] <input file>

  .. option:: --outfile

     Write the output to this file. If ommited, the output file 
     name will be the same as the input file, adding the ``.aes`` extension.

* **Encrypt command**

  Encrypt a file. The password will be requested from the terminal. Usage:

  ::

    pt-secure-collect encrypt [flags] <input file>

  .. option:: --outfile

     Write the output to this file. If ommited, the output file 
     name will be the same as the input file, without the ``.aes`` extension.

* **Sanitize command**

  Replace queries in a file by their fingerprints and obfuscate hostnames.
  Usage:

  ::

    pt-secure-collect sanitize [flags]

  .. option:: --input-file

     Input file. If not specified, the input will  be Stdin.

  .. option:: --output-file

     Output file. If not specified, the input will be Stdout.

  .. option:: --no-sanitize-hostnames

     Do not sanitize host names.

  .. option:: --no-sanitize-queries

     Do not replace queries by their fingerprints.