This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Backup all databases to separate archives. | |
# 1. Each table is dumped into separate *.sql file. | |
# 2. Each view is dumped into separate file with DEFINER=CURRENT_USER. | |
# 3. All routines are dumped into routines-dbname.sql, | |
# 4. All files are added to archive dbname.7z, compressed with 7-zip, max compression. | |
# | |
# Usage: mysqlback.sh /output/directory | |
# |