RSS Git Download  Clone
Raw Blame History
to restore full HILIS4, HMRN & Outreach (drops & recreates tables - FK check temporarily disabled):

1) download most recent full backup from server backup directory
2) zcat /path/to/archive.sql.gz | mysql -uraj -p
3) CHECK STORED PROCEDURES STILL EXIST IN DB OR INCREMENTAL IMPORT WILL FAIL
4) FIND MASTER_LOG_FILE ENTRY - AT TOP OF FULL BACKUP FILE - USE THIS TO START INCREMENTAL SQL:
5a) mysqlbinlog binlog.00000n binlog.00000n+1 | mysql -uraj -p OR
5b) write them all to file first, then restore from that:
    mysqlbinlog binlog.00000n   >  /tmp/today.sql
    mysqlbinlog binlog.00000n+1 >> /tmp/today.sql
    mysqlbinlog binlog.00000n+x >> /tmp/today.sql
    mysql -uraj -p -e "source /tmp/today.sql"

see http://dev.mysql.com/doc/refman/5.1/en/point-in-time-recovery.html

to update dev db:
zcat archive.sql.gz | mysql hilis4 -uraj -p