Download the PHP package yeora/db-syncer without Composer
On this page you can find all versions of the php package yeora/db-syncer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yeora/db-syncer
More information about yeora/db-syncer
Files in yeora/db-syncer
Informations about the package db-syncer
Other languages
Brief description
DbSyncer is a tool that is supposed to facilitate the synchronization between databases. As middleware DbSyncer uses the package ifsnop/mysqldump-php.
DbSyncer offers the possibility to perform a 1-to-1 synchronization with database schema and database as well as a synchronization which is configurable on table and column level.
With DbSyncer, for example, the production database can be transferred to a local development database, without the need for further manual adjustments in the data are necessary. For example:
- Sensitive customer data can be masked or otherwise manipulated in advance.
- Overwrite or replace configurations with fixed values so that they fit the target environment.
- Set limits at table level so that only a limited amount of data is selected.
- Set conditions on table level so that only certain data is selected.
- ...
Requirements
- PHP >= 7.4.0
- MySQL >= 4.1.0
- PDO
Installation & Setup (Quickstart)
The installation of DbSyncer is done via Composer using:
Now a configuration file must be created from which, among other things, the access data is taken. For a simple standard configuration file the following command can be used:
DbSyncer then creates a DbSyncer.yaml in the project root directory. configuration file which looks like the following:
In this simple case only a syncFrom and a syncTo are preconfigured. A syncFrom contains all necessary information of a database FROM which synchronization is to be performed. A syncTo contains all necessary information of a database TO which synchronization is to be performed. Any number of syncFroms and syncTos can be configured.
The next step is to enter the access data. The key values password and username can also be removed completely from the configuration file. The credentials are then interactively when starting the synchronizer.
After the access data have been entered or the key values have been removed, the actual synchronization process can be started. the actual synchronization process can be started. To do this, the following command must be executed:
If only one syncFrom and one syncTo are configured and the access data have been specified, the synchronization takes place automatically without further user action.
If multiple syncFroms are configured, you will be asked to select one interactively. If more than one syncTos are configured, you will be asked to select one or more interactively.
This completes the basic setup of a complete synchronization of a database A to a database B is completed.
Complete configuration with comments
The following is a configuration with all configuration options is given.
All versions of db-syncer with dependencies
ifsnop/mysqldump-php Version ^2.9
symfony/console Version ^6.1
symfony/yaml Version ^6.1