[BlueOnyx:13719] Re: Exclude a DB from raqbackup
Michael Aronoff
maronoff at gmail.com
Sun Sep 22 09:43:13 -05 2013
Jeff Wrote:
> You might be able to fit the trick mentioned in this link into the
function dumpmysql ():
>
http://kaslnetwork.com/articles/how-to-exclude-specific-databases-from-an-al
l-databases-mysql-dump/
Thanks for that link.
I adapted it as follows:
MYSQL=$(mysql -N -u$MYSQLUSER -p$MYSQLPASS -hlocalhost <<<"SHOW DATABASES" |
grep -v av-spam5 | grep -v information_schema | grep -v test | tr "\n" " ")
I let it backup the database "mysql" since that has permissions (correct?).
I then added it above the mysqldump in raqbackup and modified the mysqldump
line as follows.
$MYSQLDUMP --databases --add-locks -Q -f -u $MYSQLUSER -p$MYSQLPASS ${MYSQL}
1> $WORKDIR/data/$SOURCE.mysqldump.sql 2> $WORKDIR/logs/errors-mysqldump.log
That should work. I will find out tonight :-)
M Aronoff Out
More information about the Blueonyx
mailing list