#!/bin/sh

#=========================================================================
# daily archive of hilis4 & hmrn mysql databases
#=========================================================================

# --ignore-table = MyISAM tables (not compatible with single-transaction)

DBUSER=raj
DBPASS=adm1n

ARCHIVEPATH=/home/ecsg

mysqldump -u $DBUSER -p$DBPASS \
--single-transaction \
--quick \
--add-locks \
--ignore-table=hilis4.sessions \
--ignore-table=hilis4.email_addresses \
--ignore-table=hilis4._request_gross_description \
--ignore-table=hilis4._request_report \
--databases hilis4 hmrn \
| gzip -9 - >$ARCHIVEPATH/hmrn_hilis4.sql.gz # -9 = best compression

