script
I'm using AutoMySQLBackup v2.5 and haven't upgraded to v3.0 because the new version splits out config from code (nice) but also expects you to put everything in /etc (not nice). It's a fairly simple script made complicated by this new version which even includes an installer script now, which is more reason to keep with the old version.
Some changes I made:
OPT=" --quote-names --opt --skip-lock-tables"
I'm running this script out of cron and I don't want to lock tables which the web server is serving, even if it means some rows will be out of sync.
Then I change all "rm -fv" to "rm -f" because OpenBSD rm doesn't have a "-v" option, which if my assumption is correct means "verbose" and it's not useful in this script.
Since my databases aren't so small anymore, I've had to set MAXATTSIZE="20000". I also want to filter certain tables (big ones that never change, cache and log tables) and AutoMySQLBackup 3.0 has a new setting CONFIG_table_exclude for this.
The section of new code that does this is:
if ((${#CONFIG_table_exclude[@]})); then for i in "${CONFIG_table_exclude[@]}"; do opt=( "${opt[@]}" "--ignore-table=$i" ) done fi
In 2.5 we can add these tables manually to the OPT variable after the "
OPT" line, e.g.
$OPT="$OPT --ignore-table=foo.bar --ignore-table=foo.baz"
This saves a lot of disk space and space in my Gmail account used for storing backups.
- tomo's blog
- Login to post comments
- Comments
Recent comments
1 year 11 weeks ago
2 years 3 days ago
2 years 1 week ago
2 years 3 weeks ago
2 years 19 weeks ago
2 years 19 weeks ago
2 years 19 weeks ago
2 years 19 weeks ago
2 years 19 weeks ago
2 years 19 weeks ago