How can I revert a set of bulk changes to the database?
I was able to create a script to revert in bulk.  I needed to look up the log_conn_id value associated with the bulk change I made.  I made the change using the API import, but any change that happens in a single connection can be reverted.  Simply change the value of $log_conn_id in the script below, and change $tablesToRevert to include the table(s) that need reversion.



#!/usr/bin/php
&lt;?php
eval(`cv php:boot`);

$log_conn_id = '5dcf086e9a837';
$log_date = NULL;
$tablesToRevert = ['civicrm_address'];

$reverter = new CRM_Logging_Reverter($log_conn_id, $log_date);
$differ = new CRM_Logging_Differ($log_conn_id, $log_date);
$diffs = $differ-&gt;diffsInTables($tablesToRevert);
$reverter-&gt;setDiffs($diffs);
$reverter-&gt;revert();