https://github.com/cakebake/eightdump
Scheduled MySQL dump & check
https://github.com/cakebake/eightdump
cron dumper mysqlcheck mysqldump schedule
Last synced: 10 months ago
JSON representation
Scheduled MySQL dump & check
- Host: GitHub
- URL: https://github.com/cakebake/eightdump
- Owner: cakebake
- License: mit
- Created: 2020-11-10T11:21:26.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-09T08:25:13.000Z (almost 5 years ago)
- Last Synced: 2025-01-05T05:26:08.065Z (over 1 year ago)
- Topics: cron, dumper, mysqlcheck, mysqldump, schedule
- Language: Shell
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# EightDump
Scheduled MySQL dump & check.
Features
- [x] Creates GZip MySQL backups
- [x] Optimizes/Repairs MySQL database
- [x] Deletes old backups after a specified time
- [x] Usable with cron, but also manually
- [x] Environment file support
- [ ] Global environment variables support
- [x] Supports MariaDb
- [x] Logging
## Installation
```bash
mkdir -p ~/bin && \
wget https://raw.githubusercontent.com/cakebake/EightDump/main/eightdump.sh -O ~/bin/eightdump && \
chmod +x ~/bin/eightdump
```
> Check if `~/bin` is in the global $PATH or add it. Example: `echo "export PATH=$PATH:$HOME/bin" >> ~/.bashrc`
## Configuration
Create or edit a configuration file with following variables.
```bash
BACKUP_USER=user
BACKUP_PASSWORD=password
BACKUP_HOST=localhost
BACKUP_PORT=3306
BACKUP_DATABASE=name
BACKUP_DESTINATION_DIR=/var/www/html/project/backup
BACKUP_KEEP_MINUTES=10080
```
## Usage
CLI
```bash
eightdump /path/to/.env
```
Cron
```cron
# every day 04h00
0 4 * * * /home/name/bin/eightdump /path/to/.env >/dev/null 2>&1
# every 6h
0 */6 * * * /home/name/bin/eightdump /path/to/.env >/dev/null 2>&1
```