mysqldump -u root -p --single-transaction --quick --lock-tables=false ssc --tables audit_trail --where="stamp < '2018-01-01' " | gzip > /tmp/audit_trail_before_2018.sql.gz mysqldump -u root -p --single-transaction --quick --lock-tables=false ssc --tables location_check_in --where="created < '2018-01-01' " | gzip > /tmp/location_check_in_before_2018.sql.gz