Merge pull request #44 from jkaninda/develop

Develop
This commit is contained in:
2024-01-20 04:06:19 +01:00
committed by GitHub
2 changed files with 18 additions and 16 deletions

View File

@@ -38,21 +38,21 @@ MySQL Backup and Restoration tool. Backup database to AWS S3 storage or any S3 A
## Usage ## Usage
| Options | Shorts | Usage | | Options | Shorts | Usage |
|---------------|--------|------------------------------------| |-----------------------|--------|------------------------------------|
| mysql_bkup | bkup | CLI utility | | mysql-bkup | bkup | CLI utility |
| --operation | -o | Set operation. backup or restore (default: backup) | | --operation | -o | Set operation. backup or restore (default: backup) |
| --storage | -s | Set storage. local or s3 (default: local) | | --storage | -s | Set storage. local or s3 (default: local) |
| --file | -f | Set file name for restoration | | --file | -f | Set file name for restoration |
| --path | | Set s3 path without file name. eg: /custom_path | | --path | | Set s3 path without file name. eg: /custom_path |
| --dbname | -d | Set database name | | --dbname | -d | Set database name |
| --port | -p | Set database port (default: 3306) | | --port | -p | Set database port (default: 3306) |
| --mode | -m | Set execution mode. default or scheduled (default: default) | | --mode | -m | Set execution mode. default or scheduled (default: default) |
| --disable-compression | | Disable database backup compression | | --disable-compression | | Disable database backup compression |
| --period | | Set crontab period for scheduled mode only. (default: "0 1 * * *") | | --period | | Set crontab period for scheduled mode only. (default: "0 1 * * *") |
| --timeout | -t | Set timeout (default: 60s) | | --timeout | -t | Set timeout (default: 60s) |
| --help | -h | Print this help message and exit | | --help | -h | Print this help message and exit |
| --version | -V | Print version information and exit | | --version | -V | Print version information and exit |
## Note: ## Note:
@@ -206,7 +206,7 @@ services:
command: command:
- /bin/sh - /bin/sh
- -c - -c
- mysql_bkup --operation restore --storage s3 -f database_20231217_115621.sql.gz - mysql-bkup --operation restore --storage s3 -f database_20231217_115621.sql.gz
environment: environment:
- DB_PORT=3306 - DB_PORT=3306
- DB_HOST=mysql - DB_HOST=mysql

View File

@@ -40,6 +40,8 @@ COPY --from=build /app/mysql-bkup /usr/local/bin/mysql-bkup
RUN chmod +x /usr/local/bin/mysql-bkup RUN chmod +x /usr/local/bin/mysql-bkup
RUN ln -s /usr/local/bin/mysql-bkup /usr/local/bin/bkup RUN ln -s /usr/local/bin/mysql-bkup /usr/local/bin/bkup
RUN ln -s /usr/local/bin/mysql-bkup /usr/local/bin/mysql_bkup
ADD docker/supervisord.conf /etc/supervisor/supervisord.conf ADD docker/supervisord.conf /etc/supervisor/supervisord.conf