Configuration
db-sync-tool can be configured via command line arguments or configuration files (YAML or JSON).
Configuration Methods
| Method | Best For |
|---|---|
| Auto-Discovery | Quick, repeated syncs with predefined hosts |
| Config Files | Complex setups, CI/CD pipelines |
| CLI Arguments | One-off syncs, scripting |
Quick Example
Using a Config File
yaml
# config.yaml
type: TYPO3
origin:
host: prod.example.com
user: deploy
path: /var/www/html/typo3conf/LocalConfiguration.php
target:
path: /var/www/local/typo3conf/LocalConfiguration.php
ignore_table:
- cache_*
- sys_logbash
db_sync_tool -f config.yamlUsing Auto-Discovery
bash
# With global hosts configured
db_sync_tool production local
# Interactive selection
db_sync_toolUsing CLI Arguments
bash
db_sync_tool \
--type TYPO3 \
--origin-host prod.example.com \
--origin-user deploy \
--origin-path /var/www/html/typo3conf/LocalConfiguration.php \
--target-path /var/www/local/typo3conf/LocalConfiguration.phpKey Configuration Sections
Origin & Target
Every sync requires an origin (source) and target (destination):
yaml
origin:
host: remote.example.com # SSH host (makes this remote)
user: ssh_user # SSH user
path: /path/to/config # Framework config path
target:
path: /local/path/to/config # No host = localFramework Type
Specify the framework for automatic credential extraction:
yaml
type: TYPO3 # or Symfony, Drupal, WordPress, LaravelIf omitted, the tool attempts to detect the framework from the file path.
Ignore Tables
Exclude tables from the sync (supports wildcards):
yaml
ignore_table:
- cache_*
- sessions
- logsTruncate Tables
Clear tables before import:
yaml
truncate_table:
- user_sessionsNext Steps
- Auto-Discovery - Set up quick syncs
- Full Reference - All configuration options
- Authentication - SSH keys and passwords