|
1 | 1 | # This configuration file is an example for standalone usage.
|
2 |
| -# |
3 |
| -# The given parameters you will find in this file must not be set in a Symfony |
4 |
| -# application context, and will be ignored if so. |
5 |
| -# |
6 |
| -# All other configuration you can find in the ./packages/db_tools.yaml file |
7 |
| -# can be added in this file, you must simply omit the 'db_tools:' top level |
8 |
| -# node. |
| 2 | +# Only required parameter is the connection URL. |
9 | 3 |
|
10 |
| -# Working directory is the path to which all relative file references will |
11 |
| -# be relative to. If none set, the path will be this file directory instead. |
12 |
| -workdir: /var/www/my_project/ |
| 4 | +# If you have a single connection, you can use this syntax. |
| 5 | +# Connection name will be "default" when configured this way. |
| 6 | +# If you have multiple connections, please refer to the exhaustive |
| 7 | +# sample in 'db_tools.standalone.complete.sample.yaml'. |
| 8 | +connections: "pgsql://username:password@hostname:port?version=16.0&other_option=..." |
13 | 9 |
|
14 |
| -# Database connections. |
15 |
| -# One line per connection, a single database URL, all options as query |
16 |
| -# parameters. Connections will be made using makincorpus/query-builder |
17 |
| -# which will raise exceptions when invalid options are found. |
18 |
| -# There is less configuration amplitude than using doctrine/dbal in |
19 |
| -# Symfony, yet it should be enough in most case. |
20 |
| -# In case any options or specific behaviour is missing, please file |
21 |
| -# an issue at https://github.com/makinacorpus/php-query-builder/issues |
22 |
| -connections: |
23 |
| - connection_one: "pgsql://username:password@hostname:port?version=16.0&other_option=..." |
24 |
| - connection_two: "mysql://username:password@hostname:port?version=8.1&other_option=..." |
| 10 | +# Where to put generated backups. |
| 11 | +# Root directory of the backup storage manager. Default filename |
| 12 | +# strategy will always use this folder as root path. |
| 13 | +#storage_directory: ./var/db_tools |
25 | 14 |
|
26 |
| -# If you have a single connection, you can use this syntax. In this case |
27 |
| -# the connection name will be "default". |
28 |
| -# connections: "pgsql://username:password@hostname:port?version=16.0&other_option=..." |
| 15 | +# Default filename strategy. You may specify one strategy for each connection. |
| 16 | +# If you created and registered a custom one into the container as a |
| 17 | +# service, you may simply set the service identifier. If no service |
| 18 | +# exists, and your implementation does not require parameters, simply |
| 19 | +# set the class name. |
| 20 | +# Allowed values are: |
| 21 | +# - "default": alias of "datetime". |
| 22 | +# - "datetime": implementation is "%db_tools.storage_directory%/YYYY/MM/<connection-name>-<datestamp>.<ext>". |
| 23 | +# - CLASS_NAME: a class name to use that implements a strategy. |
| 24 | +#storage_filename_strategy: default |
29 | 25 |
|
30 |
| -# You can explicitely set which will be default connection in use when |
31 |
| -# none providen in the command line options. If you omit this configuration |
32 |
| -# value, then the first one in the list will be used. |
33 |
| -#default_connection: connection_one |
34 |
| - |
35 |
| -# Using the DbToolsBundle standalone, you must provide at least |
36 |
| -# a root directory for backups. |
37 |
| -storage: |
38 |
| - # Path can be relative or absolute, Relative paths are relative to the |
39 |
| - # workdir option if specified, or from this configuration file directory |
40 |
| - # otherwise. |
41 |
| - # If none provided, the default will be the following one. |
42 |
| - root_dir: ./var/db_tools |
43 |
| - # Filename strategies. You may specify one strategy for each doctrine |
44 |
| - # connection. Keys are doctrine connection names. Values are strategy |
45 |
| - # names, "default" (or null) or omitting the connection will use the |
46 |
| - # default implementation. |
47 |
| - # If you created and registered a custom one into the container as a |
48 |
| - # service, you may simply set the service identifier. If no service |
49 |
| - # exists, and your implementation does not require parameters, simply |
50 |
| - # set the class name. |
51 |
| - #filename_strategy: |
52 |
| - # Backup filename strategy. |
53 |
| - # "default" is an alias of "datetime" |
54 |
| - #default: default |
55 |
| - # "datetime" implementation is ROOT_DIR/YYYY/MM/<connection-name>-<datestamp>.<ext>" |
56 |
| - #other_connection_strategy: datetime |
57 |
| - # Example of using a service name: |
58 |
| - #yet_another_connection: app.db_tools.filename.custom_strategy |
59 |
| - # Or a classe name: |
60 |
| - #another_one: App\DbTools\Storage\MyCustomStrategy |
61 |
| - |
62 |
| -# When old backups are considered obsolete |
| 26 | +# When old backups are considered obsolete. |
63 | 27 | # (Use relative date/time formats : https://www.php.net/manual/en/datetime.formats.relative.php)
|
64 | 28 | #backup_expiration_age: '6 months ago' # default '3 months ago'
|
65 | 29 |
|
66 |
| -# Timeout for backups. |
67 |
| -# backup_timeout: 1200 # default 600 |
68 |
| - |
69 |
| -# Timeout for restores. |
70 |
| -# restore_timeout: 2400 # default 1800 |
71 |
| - |
72 |
| -# List here tables (per connection) you don't want in your backups |
73 |
| -#excluded_tables: |
74 |
| - #default: ['table1', 'table2'] |
75 |
| - |
76 |
| -# Specify here paths to binaries, only if the system can't find them by himself |
77 |
| -# platform are 'mysql', 'postgresql', 'sqlite' |
78 |
| -#backupper_binaries: |
79 |
| - #mariadb: '/usr/bin/mariadb-dump' # default 'mariadb-dump' |
80 |
| - #mysql: '/usr/bin/mysqldump' # default 'mysqldump' |
81 |
| - #postgresql: '/usr/bin/pg_dump' # default 'pg_dump' |
82 |
| - #sqlite: '/usr/bin/sqlite3' # default 'sqlite3' |
83 |
| -#restorer_binaries: |
84 |
| - #mariadb: '/usr/bin/mariadb' # default 'mariadb' |
85 |
| - #mysql: '/usr/bin/mysql' # default 'mysql' |
86 |
| - #postgresql: '/usr/bin/pg_restore' # default 'pg_restore' |
87 |
| - #sqlite: '/usr/bin/sqlite3' # default 'sqlite3' |
88 |
| - |
89 |
| -# Default options to pass to the binary when backing up or restoring |
90 |
| -# a database. Those options must be defined per connection. |
91 |
| -# If you do not define some default options, here or by using the |
92 |
| -# "--extra-options" option when invoking the command, the following |
93 |
| -# ones will be used according to the database vendor: |
94 |
| -# - When backing up: |
95 |
| -# - MariaDB: --no-tablespaces |
96 |
| -# - MySQL: --no-tablespaces |
97 |
| -# - PostgreSQL: -Z 5 --lock-wait-timeout=120 |
98 |
| -# - SQLite: -bail |
99 |
| -# - When restoring: |
100 |
| -# - MariaDB: None |
101 |
| -# - MySQL: None |
102 |
| -# - PostgreSQL: -j 2 --clean --if-exists --disable-triggers |
103 |
| -# - SQLite: None |
104 |
| -#backupper_options: |
105 |
| - #default: '' |
106 |
| - #another_connection: '' |
107 |
| -#restorer_options: |
108 |
| - #default: '' |
109 |
| - #another_connection: '' |
| 30 | +# List here tables (you don't want in your backups. |
| 31 | +# If you have more than one connection, it is strongly advised to configure |
| 32 | +# this for each connection instead. |
| 33 | +#backup_excluded_tables: ['table1', 'table2'] |
110 | 34 |
|
111 | 35 | # Update this configuration if you want to look for anonymizers in a custom folder.
|
112 |
| -# These are default paths that will always be registered even if you override |
113 |
| -# the setting and don't repeat them: |
114 | 36 | #anonymizer_paths:
|
115 | 37 | #- ./src/Anonymization/Anonymizer'
|
116 | 38 |
|
117 |
| -anonymization: |
118 |
| - # From here you can proceed with manual file inclusion. Pathes can be |
119 |
| - # either relative or absolute. Relative paths are relative to the workdir |
120 |
| - # option if specified, or from this configuration file directory |
121 |
| - # otherwise. |
122 |
| - yaml: |
123 |
| - connection_one: ./db_tools.anonymizer.connection_one.yaml |
124 |
| - # ... other connections ... |
125 |
| - |
126 |
| - # Extra configuration options, if you don't want to split the anonymization |
127 |
| - # configuration into multiple files, you can directly write it here. |
128 |
| - tables: |
129 |
| - connection_one: |
130 |
| - # From here, please refer to 'anonymizations.sample.yaml' for sample |
131 |
| - # and documentation. |
132 |
| - table_name: |
133 |
| - column_name: |
134 |
| - anonymizer: anonymizer_name |
135 |
| - # ... other options... |
136 |
| - connection_two: |
137 |
| - # ... |
| 39 | +# Write the anonymization configuration here. |
| 40 | +# You may also write anonymization configuration in extra files instead, please |
| 41 | +# see the 'db_tools.standalone.complete.sample.yaml' for more documentation. |
| 42 | +#anonymization: |
| 43 | +# # Keys are connection names, values are structures which are identical to what |
| 44 | +# # you may find in the "anonymizations.sample.yaml" example. |
| 45 | +# # If you only specified one URL in the "connections" parameter above, the |
| 46 | +# # connection name is "default". |
| 47 | +# default: |
| 48 | +# # Keys here are table names, followed by column names, column values |
| 49 | +# # are either an anonymizer name string, or an object with options. |
| 50 | +# user: |
| 51 | +# # Some Anonymizer does not require any option, you can use them like this |
| 52 | +# prenom: fr-fr.firstname |
| 53 | +# nom: fr-fr.lastname |
| 54 | +# # Some do require options, specify them like this: |
| 55 | +# age: |
| 56 | +# anonymizer: integer |
| 57 | +# options: {min: 0, max: 99} |
| 58 | +# # Some others have optionnal options, you can specify those: |
| 59 | +# email: |
| 60 | +# anonymizer: email |
| 61 | +# options: {domain: 'toto.com'} |
| 62 | +# # Or leave it with defaults: |
| 63 | +# email: email |
| 64 | +# level: |
| 65 | +# anonymizer: string |
| 66 | +# options: {sample: ['none', 'bad', 'good', 'expert']} |
| 67 | +# # ... other tables... |
0 commit comments