Skip to content

Commit 968b207

Browse files
author
Jakub Krkoska
committed
Updated README file
1 parent d07d61e commit 968b207

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,18 @@
11
# mysql-backup
22
Backups mysql database using mysql dump.
3+
4+
## Crontab
5+
- backups are being done by crontab, which runs backup.sh script in set interval
6+
- with each backup the size and duration of the backup are being logged
7+
- these logs are optionally saved to the database as well
8+
- log database shoud be named 'logs'
9+
- there should be one table named 'backup_logs' with 3 columns(duration, backup_size, backup_name)
10+
11+
## Env variables
12+
DB_HOST -> database host, either domain name or IP address
13+
DB_PORT -> database port
14+
DB_USERNAME -> database username
15+
DB_PASSWORD -> database password
16+
DB_NAME -> name of the database which should be backed up
17+
CRON_SCHEDULE_PATTERN -> pattern for cron which specifies how often should be the backups done (default value set to '0 */2 * * *')
18+
WRITE_LOGS -> whether to write logs to log database (default value set to 0)

0 commit comments

Comments
 (0)