https://github.com/aman7123/mysql-backup
A container for backup MySQL instance
https://github.com/aman7123/mysql-backup
Last synced: 3 months ago
JSON representation
A container for backup MySQL instance
- Host: GitHub
- URL: https://github.com/aman7123/mysql-backup
- Owner: Aman7123
- Created: 2022-08-05T21:34:37.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-30T03:23:07.000Z (over 1 year ago)
- Last Synced: 2025-01-14T02:28:58.391Z (5 months ago)
- Language: Shell
- Size: 57.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Custom MySQL Backup
## Description
This project serves as a personal extension of the remarkable [Databacker's MySQL Backup](https://github.com/databacker/mysql-backup) software. It primarily incorporates additional libraries into the container, enabling the use of popular CLI resources like [curl](https://curl.se/) and [jq](https://stedolan.github.io/jq/). The inclusion of these libraries aims to enhance the [Pre- and Post- Processing](https://github.com/databacker/mysql-backup#backup-pre-and-post-processing) features provided in the original project.## Running with Docker-Compose
**IMPORTANT NOTE**: Before running, execute `sudo chmod -R 777` on the `pos-backup` folder to set the necessary permissions.### Ensure to populate these variables:
| Variable | Description |
|---|---|
| DB_SERVER | The host of the MySQL database. |
| DB_USER | The username for database access. |
| DB_PASS | The password for the database user account. |
| DB_DUMP_FREQ | Backup frequency in minutes. |
| SP_ENABLE_ENCRYPTION | Toggle to enable encryption during the upload process. |
| SP_ENCRYPTION_KEY | The encryption key to be used. |
| SP_ENABLE_TRANSFER | Toggle to save to transfer.sh. |
| SP_GH_PK | Utilize a GitHub Personal Access Token to enable upload to GitHub. |
| SP_GH_USER | The username associated with the Access Token for GitHub uploads. |
| SP_GH_REPO | The repository to use when creating backup releases. |
| SP_DISCORD_USER | Toggle to enable direct pings when using Discord alerts. |
| SP_DISCORD_WEBHOOK | Provides the capability to alert via Discord with backup URLs, if configured. |### Discord Alert Example
## Decrypting Backups
```bash
openssl \
enc \
-d \
-aes256 \
-nosalt \
-base64 \
-A \
-md sha256 \
-d \
-k \
-in \
-out db_backup.tgz
```