https://github.com/vukbgit/mariadb-tools
a collection of shell scripts to manage mariadb databases
https://github.com/vukbgit/mariadb-tools
Last synced: 2 months ago
JSON representation
a collection of shell scripts to manage mariadb databases
- Host: GitHub
- URL: https://github.com/vukbgit/mariadb-tools
- Owner: vukbgit
- License: gpl-3.0
- Created: 2025-03-06T14:27:08.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-03-06T15:14:56.000Z (3 months ago)
- Last Synced: 2025-03-06T15:38:26.850Z (3 months ago)
- Language: Shell
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A set of bash scripts to deal with a MariaDB database
## INSTALLATION ##
* clone repository:
`git clone https://github.com/vukbgit/mariadb-tools.git`
* setup config file:
`cp .config.template .config`
* edit config file setting:
* db_source: name of the database to start comparison
* db_target: name of the database to be compared to db_source
* user: MariaDB user name into scripts
* password: MariaDB user password
* host and port if needed## SCRIPTS ##
* `export.sh [database-name] [table-name]`: dumps a whole database or just a table if second argument provided
* `import.sh -d [database-name] -f [path-to-dump-file]`: imports a database from a dump file
* `create_objects.sh [object-1] [object-2] ...`: shows create sql for tables/views
* `dev-to-prod.sh [object-1] [object-2] ...`: overwrites PROD db with DEV one __BE CAREFUL!!!__
* `prod-to-dev.sh [object-1] [object-2] ...`: overwrites DEV db with PROD one __BE CAREFUL!!!__