Skip to content

Instantly share code, notes, and snippets.

@alexantr
alexantr / mysql_backup.sh
Created November 9, 2018 08:54
Simple mysql backup with Yandex.Disk support.
#!/bin/bash
# save password for db user "backup" in "~/.mylogin.cnf":
# mysql_config_editor set --login-path=local --host=localhost --user=backup --password
# permisions for backup user: Select table data, Show databases, Lock tables, Show View
# Base folder with backups
BASE_BACKUP_DIR="$HOME/.backup"
# Current date for folder name