mirror of
https://github.com/jkaninda/mysql-bkup.git
synced 2025-12-06 21:49:40 +01:00
32
README.md
32
README.md
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user