diff -urp dbscripts/config.inc.example dbscripts_new/config.inc.example --- dbscripts/config.inc.example 2010-02-25 09:28:57.000000000 -0600 +++ dbscripts_new/config.inc.example 2010-02-25 09:32:20.000000000 -0600 @@ -55,6 +55,21 @@ $raise_increments_on_merge = TRUE; */ $remove_column_charset = TRUE; +/** + * Paranoia + * + * This setting will cause 'restore' to dump your database to the specified + * directory (relative to your dump path) prior to restoring the specified + * database. This is useful for making a local backup of your database + * so you can easily roll back prior to the restore. + * + * This setting can be overridden at runtime by passing options to restore.php. + * To disable paranoia at runtime, pass the 'nopar' flag: + * ./restore.php development full nopar + * To enable paranoia at runtime (rather than here): + * ./restore.php development full -par= + */ +//$paranoia = "paranoia_dump" /** * Enable debugging diff -urp dbscripts/dbscripts.module dbscripts_new/dbscripts.module --- dbscripts/dbscripts.module 2010-02-25 09:28:57.000000000 -0600 +++ dbscripts_new/dbscripts.module 2010-02-25 09:31:35.000000000 -0600 @@ -2167,7 +2167,7 @@ NAME Restore - database restore script SYNOPSIS - restore.php [branch] [filter-option] + restore.php [branch] [filter-option] [runtime-options] EXAMPLE USAGE development: restore.php @@ -2211,6 +2211,22 @@ OPTIONS Defaults to: full + runtime-options + Additional options that will affect how the restore script runs. These + options override settings in your configuration files. + -par= + When set, restore will dump your existing database to the path + specified prior to restoring. Essentially, this makes a backup + copy of your database so you can easily roll back after a + restore. + Example: + ./restore.php development none -par=paranoid_dump + This will first dump the database into the + 'paranoid_dump' folder in your dump path. Then, it + will restore the development branch with no filters. + nopar + Disables the 'paranoia' setting in your config.inc. + FILES {$script_path}/config.inc Configuration settings for customizing these scripts for your