Skip to content

Instantly share code, notes, and snippets.

Vadim Nicolai nicolad

Block or report user

Report or block nicolad

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nicolad
nicolad / dump.sh
Created Nov 17, 2016 — forked from andsens/dump.sh
Backup all MySQL databases into separate files
View dump.sh
#!/bin/sh
## backup each mysql db into a different file, rather than one big file
## as with --all-databases. This will make restores easier.
## To backup a single database simply add the db name as a parameter (or multiple dbs)
## Putting the script in /var/backups/mysql seems sensible... on a debian machine that is
## Create the user and directories
# mkdir -p /var/backups/mysql/databases
# useradd --home-dir /var/backups/mysql --gid backup --no-create-home mysql-backup
## Remember to make the script executable, and unreadable by others
You can’t perform that action at this time.