Skip to content

Latest commit

 

History

History
182 lines (132 loc) · 5.71 KB

MODE.md

File metadata and controls

182 lines (132 loc) · 5.71 KB

Sync modes

It is possible to enable different kind of sync modes for the database synchronisation depending on the preferred origin (which provides the database dump) and target system (which receiving the database dump).

The default mode is receiver.

Receiver

The receiver mode offers the possibility to get a database dump from a remote system (origin) to your local system (target).

Sync mode receiver

This mode is enabled, if a host entry is only be stored in the origin section of the config.yaml configuration.

target:
    path: <TARGET_PATH>
origin:
    host: <ORIGIN_HOST>
    user: <ORIGIN_USER>
    path: <ORIGIN_PATH>

Sender

The sender mode offers the possibility to provide a database dump from your local system (origin) to a remote system (target).

Sync mode sender

This mode is enabled, if a host entry is only be stored in the target section of the config.yaml configuration.

target:
    host: <TARGET_HOST>
    user: <TARGET_USER>
    path: <TARGET_PATH>
origin:
    path: <ORIGIN_PATH>

Proxy

The proxy mode offers the possibility to get a database dump from a remote system (origin) and store them temporarily on your local system. After that the stored database dump will be forwarded to another remote system (target).

Sync mode proxy

This mode can be used, when origin and target system can't or shouldn't connect directly (because of security restrictions). So your local system acts as proxy between both of them.

This mode is enabled, if a host entry is being stored in the origin and target section of the config.yaml configuration.

target:
    host: <TARGET_HOST>
    user: <TARGET_USER>
    path: <TARGET_PATH>
origin:
    host: <ORIGIN_HOST>
    user: <ORIGIN_USER>
    path: <ORIGIN_PATH>

Dump Local

The dump local mode offers the possibility to only save a database dump from your local system. This is not really a synchronisation mode, just an easy way to save a database dump on your local mashine. No file transfer or database import will be performed. You can specify the dump file location with the dump_dir setting in your config.yaml.

Sync mode sender

This mode is enabled, if no host entry is being stored in the target or origin section of the config.yaml configuration.

origin:
    path: <ORIGIN_PATH>
    dump_dir: <DUMP_DIR>

Dump Remote

The dump local mode offers the possibility to only save a database dump from your local system. This is not really a synchronisation mode, just an easy way to save a database dump on a remote mashine (e.g. as backup mechanism). No file transfer or database import will be performed. You can specify the dump file location with the dump_dir setting in your config.yaml.

Sync mode sender

This mode is enabled, if the host entry are equal in the target and origin section of the config.yaml configuration.

target:
    host: <ORIGIN_HOST>
    user: <ORIGIN_USER>
    path: <ORIGIN_PATH>
origin:
    host: <ORIGIN_HOST>
    user: <ORIGIN_USER>
    path: <ORIGIN_PATH>
    dump_dir: <DUMP_DIR>

Import Local

The import local mode offers the possibility to only import a database dump from a local file dump. This is not really a synchronisation mode, just an easy way to import a database dump on your local mashine. No file transfer will be performed.

Sync mode sender

target:
    path: <TARGET_PATH>

This mode is enabled, if you add the -i or --import-file option and specify the location of the local dump file.

$ db_sync_tool -f import-local.yaml -i /path/to/file.sql

Import Remote

The import remote mode offers the possibility to only import a database dump on a remote file dump. This is not really a synchronisation mode, just an easy way to import a database dump on a remote maschine. No file transfer will be performed.

Sync mode sender

target:
    host: <TARGET_HOST>
    user: <TARGET_USER>
    path: <TARGET_PATH>

This mode is enabled, if you add the -i or --import-file option, specify the location of the remote dump file and the target in your config.yaml is a remote system.

$ db_sync_tool -f import-local.yaml -i /path/to/file.sql

Sync Local

The sync local mode offers the possibility to sync a database within your local system (origin/target).

Sync mode receiver

This mode is enabled, if no host entry is stored and the path entries differ in the config.yaml configuration.

target:
    path: <TARGET_PATH>
origin:
    path: <ORIGIN_PATH>

Sync Remote

The sync remote mode offers the possibility to sync a database within a remote system (origin/target).

Sync mode receiver

This mode is enabled, if the host entries will be the same and the path entries differ in the config.yaml configuration.

target:
    host: <ORIGIN_HOST>
    user: <ORIGIN_USER>
    path: <TARGET_PATH>
origin:
    host: <ORIGIN_HOST>
    user: <ORIGIN_USER>
    path: <ORIGIN_PATH>