Skip to content

Instantly share code, notes, and snippets.

@makrz
makrz / backup.sh
Created April 7, 2022 06:25 — forked from fracz/backup.sh
Automatic dockerized SUPLA MySQL database backup to Google Drive
#!/usr/bin/env bash
# Sample crontab: 0 */2 * * * /home/unicorn/backup.sh > /home/unicorn/backup.log 2>&1
NOW=$(date +"%Y%m%d%H%M%S")
BACKUP_FILE=supla-$NOW.sql
GDRIVE_DIR=0B0OnuB36CtoeknVRX2xRbS1sT1E
SUPLA_PATH=/var/www/supla-docker
BACKUP_EXPIRATION_DAYS=7