Skip to content

Commit

Permalink
issue #194 - configuration basics documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pounard committed Nov 27, 2024
1 parent 7de47e1 commit c43ea84
Show file tree
Hide file tree
Showing 11 changed files with 1,026 additions and 585 deletions.
2 changes: 1 addition & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default defineConfig({
items: [
{ text: 'Backup & Restore', link: '/backup_restore' },
{ text: 'Statistics', link: '/stats' },
{ text: 'Bundle configuration', link: '/configuration' },
{ text: 'Configuration basics', link: '/configuration/basics' },
{ text: 'Configuration reference', link: '/configuration/reference' },
]
},
Expand Down
2 changes: 1 addition & 1 deletion docs/content/anonymization/custom-anonymizers.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ To inspire you, browse existing *Anonymizers* in `vendor/makinacorpus/db-tools-b

::: tip
You can tell *DbToolsBundle* your *Custom Anonymizers* live in a different directory
with the [*Anonymizer paths* configuration](../configuration#anonymizer-paths).
with the [*Anonymizer paths* configuration](../configuration/basics#anonymizer-paths).
:::

::: tip
Expand Down
12 changes: 6 additions & 6 deletions docs/content/anonymization/essentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ With the Symfony bundle, there is two ways to tell *DbToolsBundle* how it should
2. you can declare it with a **YAML** file

::: tip
The *DbToolsBundle* does not only work with Doctrine Entities to anonymize data. You can use it with
*DbToolsBundle* does not only work with Doctrine Entities to anonymize data. You can use it with
*any* database, all you need is a DBAL connection.

In such case, the [YAML configuration](../configuration#anonymization) is the only available option.
In such case, the [YAML configuration](../configuration/basics#anonymization) is the only available option.
:::

If Doctrine ORM is enabled, the *DbToolsBundle* will automatically look for attributes on your entities.
If Doctrine ORM is enabled, *DbToolsBundle* will automatically look for attributes on your entities.
If you want to use YAML configuration, look at the [Bundle Configuration
section](../configuration#anonymization) to see how to configure it.
section](../configuration/basics#anonymization) to see how to configure it.

:::info
All anonymizers can be configured via attributes on Doctrine ORM entities, but inheritance
Expand Down Expand Up @@ -225,7 +225,7 @@ customer:

## Going further

The DbToolsBundle provides a bunch of *Anonymizers* that should cover most of your needs. You can find a
*DbToolsBundle* provides a bunch of *Anonymizers* that should cover most of your needs. You can find a
complete description of each one of them in the next section.

You can also add *Anonymizers* from [community packs](./packs). For example, to add the `pack-fr-fr` run:
Expand All @@ -234,7 +234,7 @@ You can also add *Anonymizers* from [community packs](./packs). For example, to
composer require db-tools-bundle/pack-fr-fr
```

If you can't find what you need from core anonymizers and in available packs, the *DbToolsBundle* allows
If you can't find what you need from core anonymizers and in available packs, *DbToolsBundle* allows
you to [create your own *Custom Anonymizers*](./custom-anonymizers).

::: tip
Expand Down
22 changes: 11 additions & 11 deletions docs/content/backup_restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ your database but also a tiny backups manager which handle backup files for you.

## Backup command

The backup command will use the [predefined or configured binary](./configuration#binaries) for your
The backup command will use the [predefined or configured binary](./configuration/basics#binaries) for your
database vendor with correct parameters to dump your database.

Each time you launch the backup command, [a backup file is stored in a directory](./configuration#storage-directory) (See
Each time you launch the backup command, [a backup file is stored in a directory](./configuration/basics#storage-directory) (See
[Storage section](#storage) below for more information on how backup files are stored).

With time, this directory will grow, that's why a [backup expiration age](./configuration#storage-directory#backup-expiration-age)
With time, this directory will grow, that's why a [backup expiration age](./configuration/basics#storage-directory#backup-expiration-age)
was added. Every time you launch the command, at the end, it will be asked if you want to remove obsolete
backup files (i.e. files that have passed their expiration date).

Expand Down Expand Up @@ -60,7 +60,7 @@ php bin/console db-tools:backup --connection other_connection_name

### Excluded tables

You may have configured [tables to be exclude in the bundle configuration](./configuration#excluded-tables).
You may have configured [tables to be exclude in the bundle configuration](./configuration/basics#excluded-tables).
If so, these tables will be automatically excluded each time you launch the command.

But if you want to temporarily exclude some tables, run the command with the `--excluded-table` option:
Expand Down Expand Up @@ -132,11 +132,11 @@ php bin/console db-tools:backup --extra-options "--opt1 val1 --opt2 val2 --flag"
</div>

Unless you specify the `--ignore-default-options` option, the custom options
will be added to the [default options](./configuration#default-binary-options).
will be added to the [default options](./configuration/basics#default-binary-options).

### Ignoring default options

If necessary, [default options](./configuration#default-binary-options) can be
If necessary, [default options](./configuration/basics#default-binary-options) can be
ignored for a backup by using the `--ignore-default-options` option:

<div class="standalone">
Expand All @@ -158,7 +158,7 @@ php bin/console db-tools:backup --ignore-default-options

## Restore command

The restore command will use [predefined or configured binary](./configuration#binaries) for your database vendor with correct parameters
The restore command will use [predefined or configured binary](./configuration/basics#binaries) for your database vendor with correct parameters
to restore your database from an existing backup files.

<div class="standalone">
Expand Down Expand Up @@ -280,11 +280,11 @@ php bin/console db-tools:restore --extra-options "--opt1 val1 --opt2 val2 --flag
</div>

Unless you specify the `--ignore-default-options` option, the custom options
will be added to the [default options](./configuration#default-binary-options).
will be added to the [default options](./configuration/basics#default-binary-options).

### Ignoring default options

If necessary, [default options](./configuration#default-binary-options) can be
If necessary, [default options](./configuration/basics#default-binary-options) can be
ignored for a restoration by using the `--ignore-default-options` option:

<div class="standalone">
Expand All @@ -307,11 +307,11 @@ php bin/console db-tools:restore --ignore-default-options

## Storage

As mentioned earlier on this page, the *DbToolsBundle* can list existing backup files
As mentioned earlier on this page, *DbToolsBundle* can list existing backup files
when you want to restore a previous one with the restore command.

All backups are stored in a directory. By default this directory is <span class="standalone">`./var/db_tools` (relative to the yaml config file)</span><span class="symfony">`%kernel.project_dir%/var/db_tools`</span>
but [you can choose the directory you want](./configuration#storage-directory).
but [you can choose the directory you want](./configuration/basics#storage-directory).

In this directory, each backup is put in sub-directories depending on the backup date. The backup's filename
is generated from the backup date and the DBAL connection name of the database.
Expand Down
Loading

0 comments on commit c43ea84

Please sign in to comment.