#!/bin/sh # creates core_data.gz from hilis4 tables - use to setup new centre - run # rebuild_db.pl + new_centre.sql (change user location from HMDS to name of new lab) DBUSER=raj DBPASS=adm1n SRC=hilis4 GZ=core_data # -t = Do not write CREATE TABLE statements that re-create each dumped table; # -c = Use complete INSERT statements that include column names mysqldump -u $DBUSER -p$DBPASS $SRC -t -c \ additional_options \ consent_options \ diagnosis_change_options \ diagnostic_categories \ error_codes \ hospital_departments \ parent_organisations \ phone_log_options \ referral_sources \ referral_types \ referrer_department \ referrers \ report_error_codes \ sample_types \ screen_category \ status_options \ user_functions \ user_group_function \ user_groups \ | gzip -9 - >$GZ.gz # -9 = best compression