Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next 2.0 version configuration improvements #162

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
* [feature] ⭐️ Add `bin/db-tools` CLI command allowing standalone usage (#153).
* [experimental] ⭐️ Add `bin/compile` CLI command for building a PHAR file (#154).
* [bc] Password anonymizer `symfony/password-hasher` dependency is now optional and must be manually installed (#155).
* [deprecation] ⚠️ `excluded_tables` configuration option is deprecated, use `backup_excluded_tables` instead.
* [deprecation] ⚠️ `backupper_binaries` configuration option is deprecated, use `backup_binaries` instead.
* [deprecation] ⚠️ `restorer_binaries` configuration option is deprecated, use `restore_binaries` instead.
* [deprecation] ⚠️ `backupper_options` configuration option is deprecated, use `backup_options` instead.
* [deprecation] ⚠️ `restorer_options` configuration option is deprecated, use `restore_options` instead.
* [deprecation] ⚠️ `MakinaCorpus\DbToolsBundle\DbToolsBundle` class is renamed, please use `MakinaCorpus\DbToolsBundle\Bridge\Symfony\DbToolsBundle` instead.
* [removal] ⚠️ `storage_directory` configuration option is removed, use `storage.root_dir` instead.
* [internal] All Doctrine related dependencies are now optional (#155).
* [internal] Move Symfony related code into the `src/Bridge/Symfony` folder and associated namespace (#155).
* [internal] More efficient anonymizer pack lookup (#165).
Expand All @@ -17,6 +24,7 @@
* [feature] ⭐️ Anonymization - Add Doctrine entity joined inheritance support (#160)
* [feature] ⭐️ Anonymization - Finalized and improved IBAN/BIC anonymizer (#4)
* [fix] Restored MySQL 5.7 support (#124)
* [deprecation] ⚠️ `storage_directory` configuration option is deprecated, use `storage.root_dir` instead.
* [internal] Remove `doctrine/dbal` dependency from all code except the database session registry (#142).
* [internal] Introduce `DatabaseSessionRegistry` as single entry point for plugging-in database (#142).
* [internal] Use `makinacorpus/query-builder` schema manager for DDL alteration (#140).
Expand Down
10 changes: 5 additions & 5 deletions config/db_tools.standalone.sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,17 @@ storage:
# restore_timeout: 2400 # default 1800

# List here tables (per connection) you don't want in your backups
#excluded_tables:
#backup_excluded_tables:
#default: ['table1', 'table2']

# Specify here paths to binaries, only if the system can't find them by himself
# platform are 'mysql', 'postgresql', 'sqlite'
#backupper_binaries:
#backup_binaries:
#mariadb: '/usr/bin/mariadb-dump' # default 'mariadb-dump'
#mysql: '/usr/bin/mysqldump' # default 'mysqldump'
#postgresql: '/usr/bin/pg_dump' # default 'pg_dump'
#sqlite: '/usr/bin/sqlite3' # default 'sqlite3'
#restorer_binaries:
#restore_binaries:
#mariadb: '/usr/bin/mariadb' # default 'mariadb'
#mysql: '/usr/bin/mysql' # default 'mysql'
#postgresql: '/usr/bin/pg_restore' # default 'pg_restore'
Expand All @@ -101,10 +101,10 @@ storage:
# - MySQL: None
# - PostgreSQL: -j 2 --clean --if-exists --disable-triggers
# - SQLite: None
#backupper_options:
#backup_options:
#default: ''
#another_connection: ''
#restorer_options:
#restore_options:
#default: ''
#another_connection: ''

Expand Down
10 changes: 5 additions & 5 deletions config/packages/db_tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ db_tools:
# restore_timeout: 2400 # default 1800

# List here tables (per connection) you don't want in your backups
#excluded_tables:
#backup_excluded_tables:
#default: ['table1', 'table2']

# Specify here paths to binaries, only if the system can't find them by himself
# platform are 'mysql', 'postgresql', 'sqlite'
#backupper_binaries:
#backup_binaries:
#mariadb: '/usr/bin/mariadb-dump' # default 'mariadb-dump'
#mysql: '/usr/bin/mysqldump' # default 'mysqldump'
#postgresql: '/usr/bin/pg_dump' # default 'pg_dump'
#sqlite: '/usr/bin/sqlite3' # default 'sqlite3'
#restorer_binaries:
#restore_binaries:
#mariadb: '/usr/bin/mariadb' # default 'mariadb'
#mysql: '/usr/bin/mysql' # default 'mysql'
#postgresql: '/usr/bin/pg_restore' # default 'pg_restore'
Expand All @@ -66,10 +66,10 @@ db_tools:
# - MySQL: None
# - PostgreSQL: -j 2 --clean --if-exists --disable-triggers
# - SQLite: None
#backupper_options:
#backup_options:
#default: ''
#another_connection: ''
#restorer_options:
#restore_options:
#default: ''
#another_connection: ''

Expand Down
1 change: 1 addition & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export default defineConfig({
{ text: 'Installation', link: '/getting-started/installation' },
{ text: 'Basics', link: '/getting-started/basics' },
{ text: 'Supported databases', link: '/getting-started/database-vendors' },
{ text: 'CLI tool', link: '/console' },
]
},
{
Expand Down
28 changes: 14 additions & 14 deletions docs/content/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ This will allow the restore command to find your backups.

### Excluded tables

The `excluded_tables` parameter let you configure tables to exclude from backups. You will need to give a
The `backup_excluded_tables` parameter let you configure tables to exclude from backups. You will need to give a
configuration per doctrine connection.

Default value is `null`: no table are excluded.
Expand All @@ -105,7 +105,7 @@ db_tools:

#...

excluded_tables:
backup_excluded_tables:
default: ['table1', 'table2']

#...
Expand Down Expand Up @@ -198,16 +198,16 @@ If the `db-tools:check` command returns you some errors:

# Specify here paths to binaries, only if the system can't find them by himself
# platform are 'mysql', 'postgresql', 'sqlite'
backupper_binaries:
mariadb: '/usr/bin/mariadb-dump' # default 'mariadb-dump'
mysql: '/usr/bin/mysqldump' # default 'mysqldump'
postgresql: '/usr/bin/pg_dump' # default 'pg_dump'
sqlite: '/usr/bin/sqlite3' # default 'sqlite3'
restorer_binaries:
mariadb: '/usr/bin/mariadb' # default 'mariadb'
mysql: '/usr/bin/mysql' # default 'mysql'
postgresql: '/usr/bin/pg_restore' # default 'pg_restore'
sqlite: '/usr/bin/sqlite3' # default 'sqlite3'
backup_binaries:
mariadb: '/usr/bin/mariadb-dump'
mysql: '/usr/bin/mysqldump'
postgresql: '/usr/bin/pg_dump'
sqlite: '/usr/bin/sqlite3'
restore_binaries:
mariadb: '/usr/bin/mariadb'
mysql: '/usr/bin/mysql'
postgresql: '/usr/bin/pg_restore'
sqlite: '/usr/bin/sqlite3'

#...
```
Expand Down Expand Up @@ -250,10 +250,10 @@ by configuring your own ones per operation type and DBAL connection:
db_tools:
# ...

backupper_options:
backup_options:
default: '--an-option'
another_connection: '-xyz --another'
restorer_options:
restore_options:
default: '--a-first-one --a-second-one'
another_connection: '-O sample-value'
```
Expand Down
Loading
Loading