File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 1
1
# mysql-backup
2
2
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)
You can’t perform that action at this time.
0 commit comments