db-sync-tool-kmi 2.11.6__py3-none-any.whl → 3.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. db_sync_tool/__main__.py +7 -252
  2. db_sync_tool/cli.py +733 -0
  3. db_sync_tool/database/process.py +94 -111
  4. db_sync_tool/database/utility.py +339 -121
  5. db_sync_tool/info.py +1 -1
  6. db_sync_tool/recipes/drupal.py +87 -12
  7. db_sync_tool/recipes/laravel.py +7 -6
  8. db_sync_tool/recipes/parsing.py +102 -0
  9. db_sync_tool/recipes/symfony.py +17 -28
  10. db_sync_tool/recipes/typo3.py +33 -54
  11. db_sync_tool/recipes/wordpress.py +13 -12
  12. db_sync_tool/remote/client.py +206 -71
  13. db_sync_tool/remote/file_transfer.py +303 -0
  14. db_sync_tool/remote/rsync.py +18 -15
  15. db_sync_tool/remote/system.py +2 -3
  16. db_sync_tool/remote/transfer.py +51 -47
  17. db_sync_tool/remote/utility.py +29 -30
  18. db_sync_tool/sync.py +52 -28
  19. db_sync_tool/utility/config.py +367 -0
  20. db_sync_tool/utility/config_resolver.py +573 -0
  21. db_sync_tool/utility/console.py +779 -0
  22. db_sync_tool/utility/exceptions.py +32 -0
  23. db_sync_tool/utility/helper.py +155 -148
  24. db_sync_tool/utility/info.py +53 -20
  25. db_sync_tool/utility/log.py +55 -31
  26. db_sync_tool/utility/logging_config.py +410 -0
  27. db_sync_tool/utility/mode.py +85 -150
  28. db_sync_tool/utility/output.py +122 -51
  29. db_sync_tool/utility/parser.py +33 -53
  30. db_sync_tool/utility/pure.py +93 -0
  31. db_sync_tool/utility/security.py +79 -0
  32. db_sync_tool/utility/system.py +277 -194
  33. db_sync_tool/utility/validation.py +2 -9
  34. db_sync_tool_kmi-3.0.2.dist-info/METADATA +99 -0
  35. db_sync_tool_kmi-3.0.2.dist-info/RECORD +44 -0
  36. {db_sync_tool_kmi-2.11.6.dist-info → db_sync_tool_kmi-3.0.2.dist-info}/WHEEL +1 -1
  37. db_sync_tool_kmi-2.11.6.dist-info/METADATA +0 -276
  38. db_sync_tool_kmi-2.11.6.dist-info/RECORD +0 -34
  39. {db_sync_tool_kmi-2.11.6.dist-info → db_sync_tool_kmi-3.0.2.dist-info}/entry_points.txt +0 -0
  40. {db_sync_tool_kmi-2.11.6.dist-info → db_sync_tool_kmi-3.0.2.dist-info/licenses}/LICENSE +0 -0
  41. {db_sync_tool_kmi-2.11.6.dist-info → db_sync_tool_kmi-3.0.2.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,99 @@
1
+ Metadata-Version: 2.4
2
+ Name: db_sync_tool-kmi
3
+ Version: 3.0.2
4
+ Summary: Synchronize a database from and to host systems.
5
+ Home-page: https://github.com/jackd248/db-sync-tool
6
+ Author: Konrad Michalik
7
+ Author-email: support@konradmichalik.eu
8
+ License: MIT
9
+ Classifier: Programming Language :: Python :: 3.10
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.14
14
+ Classifier: Development Status :: 5 - Production/Stable
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: MacOS :: MacOS X
17
+ Classifier: Operating System :: Microsoft :: Windows
18
+ Classifier: Operating System :: POSIX
19
+ Classifier: Topic :: Database
20
+ Classifier: Intended Audience :: Developers
21
+ Requires-Python: >=3.10
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: paramiko>=4.0
25
+ Requires-Dist: pyyaml>=6.0.2
26
+ Requires-Dist: jsonschema>=4.20
27
+ Requires-Dist: requests>=2.31.0
28
+ Requires-Dist: semantic_version>=2.10.0
29
+ Requires-Dist: rich>=13.0
30
+ Requires-Dist: typer[all]>=0.15.0
31
+ Dynamic: author
32
+ Dynamic: author-email
33
+ Dynamic: classifier
34
+ Dynamic: description
35
+ Dynamic: description-content-type
36
+ Dynamic: home-page
37
+ Dynamic: license
38
+ Dynamic: license-file
39
+ Dynamic: requires-dist
40
+ Dynamic: requires-python
41
+ Dynamic: summary
42
+
43
+ <div align="center">
44
+
45
+ ![db-sync-tool](docs/images/db-sync-tool-example-receiver.gif)
46
+
47
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/db_sync_tool-kmi)](https://pypi.org/project/db-sync-tool-kmi/)
48
+ [![PyPI](https://img.shields.io/pypi/v/db_sync_tool-kmi)](https://pypi.org/project/db-sync-tool-kmi/)
49
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/db-sync-tool-kmi)](https://pypi.org/project/db-sync-tool-kmi/)
50
+ [![Packagist](https://img.shields.io/packagist/v/kmi/db-sync-tool)](https://packagist.org/packages/kmi/db-sync-tool)
51
+
52
+ # Database Sync Tool
53
+
54
+ A Python CLI to synchronize MySQL/MariaDB databases between systems with automatic credential extraction.
55
+
56
+ [**Explore the docs &raquo;**](https://konradmichalik.github.io/db-sync-tool/)
57
+
58
+ [Report Bug](https://github.com/konradmichalik/db-sync-tool/issues/new) ·
59
+ [Request Feature](https://github.com/konradmichalik/db-sync-tool/issues/new) ·
60
+ [Latest Release](https://github.com/konradmichalik/db-sync-tool/releases/latest)
61
+
62
+ </div>
63
+
64
+ ## ✨ Features
65
+
66
+ * Sync databases from and to remote systems via SSH
67
+ * Proxy mode for transfers between isolated environments
68
+ * Automatic credential extraction from PHP frameworks
69
+ * TYPO3, Symfony, Drupal, WordPress, Laravel
70
+ * Auto-discovery configuration for quick syncs
71
+ * Host protection to prevent accidental overwrites
72
+ * Optimized transfers with gzip compression and rsync
73
+
74
+ ## 🚀 Getting Started
75
+
76
+ ```bash
77
+ # Install via pip
78
+ pip install db-sync-tool-kmi
79
+
80
+ # Sync using auto-discovery
81
+ db_sync_tool production local
82
+
83
+ # Or use a config file
84
+ db_sync_tool -f config.yaml
85
+ ```
86
+
87
+ Find more [installation methods](https://konradmichalik.github.io/db-sync-tool/getting-started/installation) in the documentation.
88
+
89
+ ## 📕 Documentation
90
+
91
+ Find all configuration options, sync modes, and framework guides in the [official documentation](https://konradmichalik.github.io/db-sync-tool/).
92
+
93
+ ## 🧑‍💻 Contributing
94
+
95
+ Please have a look at [`CONTRIBUTING.md`](CONTRIBUTING.md).
96
+
97
+ ## ⭐ License
98
+
99
+ This project is licensed under the MIT License.
@@ -0,0 +1,44 @@
1
+ db_sync_tool/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ db_sync_tool/__main__.py,sha256=j9dhLKLWTizr-YysfBjepEdYjBoI6jMEw72vvyZgIF8,300
3
+ db_sync_tool/cli.py,sha256=-mX6B1-51Tc3FkxkJ1ZL4xYKfUDR96pxU6iY5T2yXdA,21276
4
+ db_sync_tool/info.py,sha256=mpz1rD00jHYlQeF3pN2LvfJP_NhSnnJ4Qp3uBQJRYfE,164
5
+ db_sync_tool/sync.py,sha256=rQoRDUauY0qwDk_QYUuOx2t-GOXmyQJfUqUifzRhU4Y,3030
6
+ db_sync_tool/database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ db_sync_tool/database/process.py,sha256=gOVpc77YjMCADGy4FrfKgTKMkWtGlNJ7ozgSsKtqPTQ,7778
8
+ db_sync_tool/database/utility.py,sha256=qpDLX9wXaO6GhFLorCYEQmckU-FUT_d7BTOD8PuznGM,15917
9
+ db_sync_tool/recipes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
+ db_sync_tool/recipes/drupal.py,sha256=tE5XIGph4bFz0Ep6NiU8kva-ZcbNn8hb08DXNMzj7bQ,3895
11
+ db_sync_tool/recipes/laravel.py,sha256=pkSlkTnL5teOCRAQAKe4NxoOSIyqiRwHaHCThkF3elk,1219
12
+ db_sync_tool/recipes/parsing.py,sha256=SZbzhl6gaW9u0HX7ocdG15jdMI7zVguVwACGYE5XjVQ,3516
13
+ db_sync_tool/recipes/symfony.py,sha256=EB1iGPuveOL90Hqw29TwH9JrgZFXX5McU8aMK8xOVME,2257
14
+ db_sync_tool/recipes/typo3.py,sha256=3K0Yr4a0BI4qkzDciWCElgzdJaYteMcVRmYmQKPHjNo,4014
15
+ db_sync_tool/recipes/wordpress.py,sha256=CGDGzxoR8PvAKofPO23BVvvv-6y_m_xkm9eEU7RYrok,1371
16
+ db_sync_tool/remote/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
+ db_sync_tool/remote/client.py,sha256=CIwQKDVBZgtPwEuY_zFTGgf_qy8xB4Cdooo3YSPnSEc,10839
18
+ db_sync_tool/remote/file_transfer.py,sha256=b4YbTvN8wNfLrKflvQQb3PhU913oqOb7fXsg1kit8LY,8753
19
+ db_sync_tool/remote/rsync.py,sha256=2Gq5xQXmbZ8X5y7iuaKW-H660io3cSD2huF5_VybS_U,4169
20
+ db_sync_tool/remote/system.py,sha256=14FbE3YH742pQkbyN95gslmoIFGrdmBbZ_9erz6G9HY,1163
21
+ db_sync_tool/remote/transfer.py,sha256=zS7qPSaYsoLvvD5T1D9mQoGE_LehmgKx_CiIExbOj9o,5450
22
+ db_sync_tool/remote/utility.py,sha256=vq67kY83M-OIDUAH3cqFs2bTlHEyzCKmgI3jxphhvzQ,3508
23
+ db_sync_tool/utility/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
+ db_sync_tool/utility/config.py,sha256=rubVEKMJgGHe81yFlw6QHwCzLKwJiQncskPpO0Bf9So,12550
25
+ db_sync_tool/utility/config_resolver.py,sha256=zanrhRf-dWaF_NBBDqMwZOrvAlN3GufPgpDOr20zcRw,19920
26
+ db_sync_tool/utility/console.py,sha256=AUQ7w-_kmaE0-GVpLXMDwi7d8YlbAA-Z4DLQqFG_pcQ,29391
27
+ db_sync_tool/utility/exceptions.py,sha256=v8VR0ceIYoksyp2viQMEFL9xCBzYDtK61nCf0exCRfA,789
28
+ db_sync_tool/utility/helper.py,sha256=Kr7Nmas5lnr5KaKvvyrvfNfAvPUhZSeubWvdYkIOLkA,9843
29
+ db_sync_tool/utility/info.py,sha256=ODL5APUj6yl8WKCc2rqnxBQzd9kMElYfht2NSIKSFno,3716
30
+ db_sync_tool/utility/log.py,sha256=2havcheWeb1SpoJquAXjHsAPr25a_3LhAboyLRiLai4,1711
31
+ db_sync_tool/utility/logging_config.py,sha256=PK7J-lguHkK_yBv4TdG6uyxH6ObA6APcPIS7FHd6sYM,12754
32
+ db_sync_tool/utility/mode.py,sha256=7p72qnzpvZrE9kWVMhXxfV2xwo9nIHeLVjf4On0_KEc,8081
33
+ db_sync_tool/utility/output.py,sha256=eM2PMrqSmOn17bZlLMwQjc-n9_baf7aqQGKfMtlpE1g,6778
34
+ db_sync_tool/utility/parser.py,sha256=79_x6JzzFxlXthnCd32PYymx0iEao5MEMwbAoJZMezg,6151
35
+ db_sync_tool/utility/pure.py,sha256=tdYctDrZPaMLksGiV3x9hjz1xBbNCykJJuu3QlWcbH4,2499
36
+ db_sync_tool/utility/security.py,sha256=Ex-PfcnEEmKiNxEIqWEuI6EPepN6rrp_hpNJe4r2Apo,2530
37
+ db_sync_tool/utility/system.py,sha256=ViO6A2oOHT49BcqpXuCcSq-HILYjelsPfkaTEAGLW4U,21537
38
+ db_sync_tool/utility/validation.py,sha256=elhxyLkXofw1whM9NaAw_kYUKEv70q--bCPI6G9EKT0,3432
39
+ db_sync_tool_kmi-3.0.2.dist-info/licenses/LICENSE,sha256=o_R9gPKBRl4PQVcGCrWuTYsJQJ7uuQDcDaq-wapBUaw,1082
40
+ db_sync_tool_kmi-3.0.2.dist-info/METADATA,sha256=xj7DfSh6auXYrsBWvLcyOy6AFz6yJMrydi6aBENGjg8,3403
41
+ db_sync_tool_kmi-3.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
42
+ db_sync_tool_kmi-3.0.2.dist-info/entry_points.txt,sha256=bVk6UR_ejpfY2oSCoOii7uKQivwV9MtA6Tdqpjg4Yvo,60
43
+ db_sync_tool_kmi-3.0.2.dist-info/top_level.txt,sha256=Uj5hJLhmdynFrBE0VnX0PfgIBC8_n7h2vgldqUQ-xfw,13
44
+ db_sync_tool_kmi-3.0.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,276 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: db-sync-tool-kmi
3
- Version: 2.11.6
4
- Summary: Synchronize a database from and to host systems.
5
- Home-page: https://github.com/jackd248/db-sync-tool
6
- Author: Konrad Michalik
7
- Author-email: support@konradmichalik.eu
8
- License: MIT
9
- Classifier: Programming Language :: Python :: 3.5
10
- Classifier: Programming Language :: Python :: 3.6
11
- Classifier: Programming Language :: Python :: 3.7
12
- Classifier: Programming Language :: Python :: 3.8
13
- Classifier: Programming Language :: Python :: 3.9
14
- Classifier: Development Status :: 5 - Production/Stable
15
- Classifier: License :: OSI Approved :: MIT License
16
- Classifier: Operating System :: MacOS :: MacOS X
17
- Classifier: Operating System :: Microsoft :: Windows
18
- Classifier: Operating System :: POSIX
19
- Classifier: Topic :: Database
20
- Classifier: Intended Audience :: Developers
21
- Requires-Python: >=3.5
22
- Description-Content-Type: text/markdown
23
- License-File: LICENSE
24
- Requires-Dist: paramiko >=2.11
25
- Requires-Dist: future-fstrings >=1.2
26
- Requires-Dist: pyyaml >=6.0
27
- Requires-Dist: jsonschema >=4.2.1
28
- Requires-Dist: requests >=2.26.0
29
- Requires-Dist: semantic-version >=2.8.5
30
- Requires-Dist: yaspin >=2.1
31
-
32
- # db sync tool
33
-
34
- ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/db_sync_tool-kmi)
35
- ![PyPI](https://img.shields.io/pypi/v/db_sync_tool-kmi)
36
- [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/jackd248/db-sync-tool/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/jackd248/db-sync-tool/?branch=master)
37
- [![Build Status](https://scrutinizer-ci.com/g/jackd248/db-sync-tool/badges/build.png?b=master)](https://scrutinizer-ci.com/g/jackd248/db-sync-tool/build-status/master)
38
-
39
- Python script to synchronize a database from an origin to a target system with automatic database credential extraction depending on the selected framework.
40
-
41
- ## Features
42
-
43
- - __Database sync__ from and to a remote system
44
- - [MySQL](https://www.mysql.com/) (>= 5.5)
45
- - [MariaDB](https://mariadb.org/) (>= 10.0)
46
- - __Proxy mode__ between two remote systems
47
- - Several [synchronisation modes](docs/MODE.md)
48
- - Automatic database __credential extraction__ using a supported framework
49
- - [TYPO3](https://typo3.org/) (>= v7.6)
50
- - [Symfony](https://symfony.com/) (>= v2.8)
51
- - [Drupal](https://www.drupal.org/) (>= v8.0)
52
- - [Wordpress](https://wordpress.org) (>= v5.0)
53
- - [Laravel](https://laravel.com/) (>= v4.0)
54
- - Easily dump creation (database __backup__)
55
- - __Cleanup__ feature for backups
56
- - Extended __logging__ capabilities
57
- - Many more possibilities for [customization](docs/CONFIG.md)
58
-
59
- ## Installation
60
-
61
- ### Prerequisite
62
-
63
- The script needs [python](https://python.org/) __3.5__ or higher. It is necessary for some additional functionalities to have [pip](https://pypi.org/project/pip/) installed on your local machine.
64
-
65
- <a name="install-pip"></a>
66
- ### pip
67
- The library can be installed from [PyPI](https://pypi.org/project/db-sync-tool-kmi/):
68
- ```bash
69
- $ pip3 install db-sync-tool-kmi
70
- ```
71
-
72
- <a name="install-composer"></a>
73
- ### composer
74
- While using the script within the PHP framework context, the script is available via [packagist.org](https://packagist.org/packages/kmi/db-sync-tool) using composer:
75
-
76
- ```bash
77
- $ composer require kmi/db-sync-tool
78
- ```
79
-
80
- Additionally install the python requirements via the following pip command:
81
-
82
- ````bash
83
- $ pip3 install -e vendor/kmi/db-sync-tool/
84
- ````
85
-
86
- ## Quickstart
87
-
88
- Detailed instructions for:
89
-
90
- - [Manual database sync](docs/quickstart/START.md)
91
- - [TYPO3 database sync](docs/quickstart/TYPO3.md)
92
- - [Symfony database sync](docs/quickstart/SYMFONY.md)
93
- - [Drupal database sync](docs/quickstart/DRUPAL.md)
94
- - [Wordpress database sync](docs/quickstart/WORDPRESS.md)
95
-
96
- If you want to have an inside in more configuration examples, see the [test scenarios](tests/scenario).
97
-
98
- ## Usage
99
-
100
- ### Command line
101
-
102
- Run the python script via command line.
103
-
104
- Installed via [pip](#install-pip):
105
- ```bash
106
- $ db_sync_tool
107
- ```
108
-
109
- Installed via [composer](#install-composer):
110
- ```bash
111
- $ python3 vendor/kmi/db-sync-tool/db_sync_tool
112
- ```
113
-
114
- ![Example receiver](docs/images/db-sync-tool-example-receiver.gif)
115
-
116
- <a name="shell-arguments"></a>
117
- #### Shell arguments
118
-
119
- ```bash
120
- usage: db_sync_tool [-h] [-f CONFIG_FILE] [-v] [-y] [-m] [-dr] [-i IMPORT_FILE] [-dn DUMP_NAME] [-kd KEEP_DUMP] [-o HOST_FILE] [-l LOG_FILE] [-cd] [-ta TABLES] [-r] [-t TYPE] [-tp TARGET_PATH]
121
- [-tn TARGET_NAME] [-th TARGET_HOST] [-tu TARGET_USER] [-tpw TARGET_PASSWORD] [-tk TARGET_KEY] [-tpo TARGET_PORT] [-tdd TARGET_DUMP_DIR] [-tkd TARGET_KEEP_DUMPS] [-tdn TARGET_DB_NAME]
122
- [-tdh TARGET_DB_HOST] [-tdu TARGET_DB_USER] [-tdpw TARGET_DB_PASSWORD] [-tdpo TARGET_DB_PORT] [-tad TARGET_AFTER_DUMP] [-op ORIGIN_PATH] [-on ORIGIN_NAME] [-oh ORIGIN_HOST]
123
- [-ou ORIGIN_USER] [-opw ORIGIN_PASSWORD] [-ok ORIGIN_KEY] [-opo ORIGIN_PORT] [-odd ORIGIN_DUMP_DIR] [-okd ORIGIN_KEEP_DUMPS] [-odn ORIGIN_DB_NAME] [-odh ORIGIN_DB_HOST]
124
- [-odu ORIGIN_DB_USER] [-odpw ORIGIN_DB_PASSWORD] [-odpo ORIGIN_DB_PORT] [-fpw] [-ur] [-uro USE_RSYNC_OPTIONS]
125
- [origin] [target]
126
-
127
- A tool for automatic database synchronization from and to host systems.
128
-
129
- positional arguments:
130
- origin Origin database defined in host file
131
- target Target database defined in host file
132
-
133
- optional arguments:
134
- -h, --help show this help message and exit
135
- -f CONFIG_FILE, --config-file CONFIG_FILE
136
- Path to configuration file
137
- -v, --verbose Enable extended console output
138
- -y, --yes Skipping user confirmation for database import
139
- -m, --mute Mute console output
140
- -dr, --dry-run Testing process without running database export, transfer or import.
141
- -i IMPORT_FILE, --import-file IMPORT_FILE
142
- Import database from a specific file dump
143
- -dn DUMP_NAME, --dump-name DUMP_NAME
144
- Set a specific dump file name (default is "_[dbname]_[date]")
145
- -kd KEEP_DUMP, --keep-dump KEEP_DUMP
146
- Skipping target import of the database dump and saving the available dump file in the given directory
147
- -o HOST_FILE, --host-file HOST_FILE
148
- Using an additional hosts file for merging hosts information with the configuration file
149
- -l LOG_FILE, --log-file LOG_FILE
150
- File path for creating a additional log file
151
- -cd, --clear-database
152
- Dropping all tables before importing a new sync to get a clean database.
153
- -ta TABLES, --tables TABLES
154
- Defining specific tables to export, e.g. --tables=table1,table2
155
- -r, --reverse Reverse origin and target hosts
156
- -t TYPE, --type TYPE Defining the framework type [TYPO3, Symfony, Drupal, Wordpress]
157
- -tp TARGET_PATH, --target-path TARGET_PATH
158
- File path to target database credential file depending on the framework type
159
- -tn TARGET_NAME, --target-name TARGET_NAME
160
- Providing a name for the target system
161
- -th TARGET_HOST, --target-host TARGET_HOST
162
- SSH host to target system
163
- -tu TARGET_USER, --target-user TARGET_USER
164
- SSH user for target system
165
- -tpw TARGET_PASSWORD, --target-password TARGET_PASSWORD
166
- SSH password for target system
167
- -tk TARGET_KEY, --target-key TARGET_KEY
168
- File path to SSH key for target system
169
- -tpo TARGET_PORT, --target-port TARGET_PORT
170
- SSH port for target system
171
- -tdd TARGET_DUMP_DIR, --target-dump-dir TARGET_DUMP_DIR
172
- Directory path for database dump file on target system
173
- -tkd TARGET_KEEP_DUMPS, --target-keep-dumps TARGET_KEEP_DUMPS
174
- Keep dump file count for target system
175
- -tdn TARGET_DB_NAME, --target-db-name TARGET_DB_NAME
176
- Database name for target system
177
- -tdh TARGET_DB_HOST, --target-db-host TARGET_DB_HOST
178
- Database host for target system
179
- -tdu TARGET_DB_USER, --target-db-user TARGET_DB_USER
180
- Database user for target system
181
- -tdpw TARGET_DB_PASSWORD, --target-db-password TARGET_DB_PASSWORD
182
- Database password for target system
183
- -tdpo TARGET_DB_PORT, --target-db-port TARGET_DB_PORT
184
- Database port for target system
185
- -tad TARGET_AFTER_DUMP, --target-after-dump TARGET_AFTER_DUMP
186
- Additional dump file to insert after the regular database import
187
- -op ORIGIN_PATH, --origin-path ORIGIN_PATH
188
- File path to origin database credential file depending on the framework type
189
- -on ORIGIN_NAME, --origin-name ORIGIN_NAME
190
- Providing a name for the origin system
191
- -oh ORIGIN_HOST, --origin-host ORIGIN_HOST
192
- SSH host to origin system
193
- -ou ORIGIN_USER, --origin-user ORIGIN_USER
194
- SSH user for origin system
195
- -opw ORIGIN_PASSWORD, --origin-password ORIGIN_PASSWORD
196
- SSH password for origin system
197
- -ok ORIGIN_KEY, --origin-key ORIGIN_KEY
198
- File path to SSH key for origin system
199
- -opo ORIGIN_PORT, --origin-port ORIGIN_PORT
200
- SSH port for origin system
201
- -odd ORIGIN_DUMP_DIR, --origin-dump-dir ORIGIN_DUMP_DIR
202
- Directory path for database dump file on origin system
203
- -okd ORIGIN_KEEP_DUMPS, --origin-keep-dumps ORIGIN_KEEP_DUMPS
204
- Keep dump file count for origin system
205
- -odn ORIGIN_DB_NAME, --origin-db-name ORIGIN_DB_NAME
206
- Database name for origin system
207
- -odh ORIGIN_DB_HOST, --origin-db-host ORIGIN_DB_HOST
208
- Database host for origin system
209
- -odu ORIGIN_DB_USER, --origin-db-user ORIGIN_DB_USER
210
- Database user for origin system
211
- -odpw ORIGIN_DB_PASSWORD, --origin-db-password ORIGIN_DB_PASSWORD
212
- Database password for origin system
213
- -odpo ORIGIN_DB_PORT, --origin-db-port ORIGIN_DB_PORT
214
- Database port for origin system
215
- -fpw, --force-password
216
- Force password user query
217
- -ur, --use-rsync Use rsync as transfer method
218
- -uro USE_RSYNC_OPTIONS, --use-rsync-options USE_RSYNC_OPTIONS
219
- Additional rsync options
220
- -w WHERE, --where WHERE
221
- Additional where clause for mysql dump to sync only selected rows, e.g. --where="deleted=0"
222
- -amo OPTIONS, --additional-mysqldump-options OPTIONS
223
- Additional mysqldump options for creating the database dump, e.g. --additional-mysqldump-options="--where="deleted=0"
224
- ```
225
-
226
- If you haven't declared a path to a SSH key, during the script execution you are requested to enter the SSH password for the given user in the shell argument or the `config.json` to enable a SSH connection for the remote system.
227
-
228
- ### Import
229
-
230
- You can import the python package and use them inside your project:
231
-
232
- ```python
233
- from db_sync_tool import sync
234
-
235
- if __name__ == "__main__":
236
- sync.Sync(config={}, args*)
237
- ```
238
-
239
- ## Configuration
240
-
241
- You can configure the script with [shell arguments](#shell-arguments) or using a separate configuration file.
242
-
243
- ### Configuration File
244
-
245
- The `config.json` contains important information about the origin and the target system. In dependence on the given configuration the [synchronisation mode](docs/MODE.md) is implicitly selected.
246
-
247
- Example structure of a `config.yml` for a Symfony system in receiver mode (`path` defines the location of the Symfony database configuration file):
248
- ```yaml
249
- type: Symfony
250
- origin:
251
- host: 192.87.33.123
252
- user: ssh_demo_user
253
- path: /var/www/html/project/shared/.env
254
- target:
255
- path: /var/www/html/app/.env
256
- ```
257
-
258
- It is possible to adjust the `config.yml` [configuration](docs/CONFIG.md).
259
-
260
- ## File sync
261
-
262
- There is an addon script available to sync files to. Use the [file-sync-tool](https://github.com/jackd248/file-sync-tool) to easily transfer files between origin and target system.
263
-
264
- ## Release Guide
265
-
266
- A detailed guide is available to release a new version. See [here](docs/RELEASE.md).
267
-
268
- ## Tests
269
-
270
- A docker container set up is available for testing purpose. See [here](tests/README.md).
271
-
272
- ## Support
273
-
274
- If you like the project, feel free to support the development.
275
-
276
- <a href="https://www.buymeacoffee.com/konradmichalik" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-green.png" alt="Buy Me A Coffee" height="41" width="174"></a>
@@ -1,34 +0,0 @@
1
- db_sync_tool/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- db_sync_tool/__main__.py,sha256=-pD13j2oYcKLhPprLy-LQeDCapj-FKrV3CDFHuYJu3g,11541
3
- db_sync_tool/info.py,sha256=Dp0DluuDEA_8H2BV2Iq4vzULDRDfH_phTf_FU9DoNkc,165
4
- db_sync_tool/sync.py,sha256=WMfMts0M8z3oecI-HL07xG9ktbba8D8h7_U-8tBwizY,2087
5
- db_sync_tool/database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- db_sync_tool/database/process.py,sha256=zmaKkxMVLYG3kr7S9rUUuxE1fgsdKasRNOhxZgSfzvg,8357
7
- db_sync_tool/database/utility.py,sha256=EfxWwHUsS6hVIMD4Jrz3n2_HQNBn3pB2GWo6OpWph4k,7783
8
- db_sync_tool/recipes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- db_sync_tool/recipes/drupal.py,sha256=jlWuSQQeoLkVBq6nqka853QnEyy2ZO_08o5mfkv0jDo,1481
10
- db_sync_tool/recipes/laravel.py,sha256=-iF-2SHh5tOKuOC4C2qQMdz_sn9gm0-TBN9XpiYEuC4,1151
11
- db_sync_tool/recipes/symfony.py,sha256=rk2epXLEBLfsNTiV5G43JUnJtjn5-JTtnhQFi-tgmJQ,2493
12
- db_sync_tool/recipes/typo3.py,sha256=7ThFTkqN086FcpYv_aUhxMTEKh2JQl6BB5VrFzNrEWA,4737
13
- db_sync_tool/recipes/wordpress.py,sha256=Cdjc10c30shHAG8WpQeFvhl8fojHeCto3UInRLb9FFU,1444
14
- db_sync_tool/remote/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- db_sync_tool/remote/client.py,sha256=wjcoQ1jp9i8PMO_6XX2XMXZCoLXy-ySA38seZtY-Sns,6553
16
- db_sync_tool/remote/rsync.py,sha256=VsLbCCgZRSXjmYz5o7B_OpKPna0X1WFqlr-irLN83EY,4252
17
- db_sync_tool/remote/system.py,sha256=A9OIaypETMYx7frTKpXBgja-kXj7vSD6gJs8pUNpL_I,1188
18
- db_sync_tool/remote/transfer.py,sha256=pYVsad4SKkJ0TgZHcyLc17Z9xK6exdyO7R8TBe4qQcQ,5872
19
- db_sync_tool/remote/utility.py,sha256=knTfzFKLdw2QsirvTfTz76XmckagKURKVBhjyREsQIo,3580
20
- db_sync_tool/utility/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
- db_sync_tool/utility/helper.py,sha256=KSnps4JQHc-wUmi8HNqI1d836R4ZUiQJo94t1gYNFuo,7987
22
- db_sync_tool/utility/info.py,sha256=8VdUMi3fsyykfMKKrmgUVoW9WEHPXbzPkVNHOIsNAMo,2976
23
- db_sync_tool/utility/log.py,sha256=OdJsVKyvJqQYl5NUzb5bIg1uhUJ9kj7c7kT9oKbGvo8,869
24
- db_sync_tool/utility/mode.py,sha256=DAkt-N5sYr6r2iTL_1sWu7_WHq04DNO4YjvBLkU3LeA,8588
25
- db_sync_tool/utility/output.py,sha256=uoiWE7Pm8qv1a3vrBupZHE545d1uZSQHiLAUgkHofLM,4758
26
- db_sync_tool/utility/parser.py,sha256=DIdWVGyiltyH8akoWyyXLvUmFPR-nvBrnzDctPJzgKw,6624
27
- db_sync_tool/utility/system.py,sha256=G74lWGFcJNmLr0l6-GkZWmkk7q3icv4MccuHFKP_Vsw,18539
28
- db_sync_tool/utility/validation.py,sha256=qZNPgkTwV_kJTNtFh0OXb2FHrsWPnDA2W_fftWs5hZc,3530
29
- db_sync_tool_kmi-2.11.6.dist-info/LICENSE,sha256=o_R9gPKBRl4PQVcGCrWuTYsJQJ7uuQDcDaq-wapBUaw,1082
30
- db_sync_tool_kmi-2.11.6.dist-info/METADATA,sha256=x_N_6SPFgsNz7wlvuDziLpUbgkz9LkHrwCk3E3dQbH8,12505
31
- db_sync_tool_kmi-2.11.6.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
32
- db_sync_tool_kmi-2.11.6.dist-info/entry_points.txt,sha256=bVk6UR_ejpfY2oSCoOii7uKQivwV9MtA6Tdqpjg4Yvo,60
33
- db_sync_tool_kmi-2.11.6.dist-info/top_level.txt,sha256=Uj5hJLhmdynFrBE0VnX0PfgIBC8_n7h2vgldqUQ-xfw,13
34
- db_sync_tool_kmi-2.11.6.dist-info/RECORD,,