This is from NodeSquirrel support emails:
Just a question. on our dev and stage servers we would like to have backup and migrate just do a local backup and on production back up to the NodeSquirrel service. We have environment aware settings on dev and stage and set $conf['nodesquirrel_secret_key'] = ''; in the settings file.
We keep getting an error about setting the key. Is there a config array we can use to disable NS on some servers but not others?
This will help when we pull production DBs back for testing.
Note: $conf['nodesquirrel_schedule_enabled'] does not appear to do it:
Local tests still get "WD backup_migrate: You must enter a valid secret key to use NodeSquirrel.” I assumed it was working because I did not get the email from our stage server. Still testing.
Comments
Comment #1
dgorton CreditAttribution: dgorton commentedComment #2
michaelpporter CreditAttribution: michaelpporter commentedTo clarify, I would like it if the backups still ran locally but did not push to NodeSquirrel. So, if you are using NodeSquirrel on prod allow a setting.php flag to disable on dev/stage
Comment #3
pkiff CreditAttribution: pkiff commentedLate response to this one, but if you are still looking at this, then one possibility might be to change the way you configure your backups on your production, and instead of configuring them in the database, configure them using settings.php only. For this to work, you need to revert all database settings on production, so that you don't have anything configured. Then write your NodeSquirrel config into your production-specific settings.php file. Something like what is done here:
Document the ability to enable/disable backup scheduling in settings.php [drupal.org] (an example using Amazon S3)
or
here:
How disable a schedule via settings.php (or elsewhere) on testing or dev environments? [drupal.org] (my example, but does not show NodeSquirrel)
When you move your database to dev/stage, nothing will be enabled by default, and you can then add whatever environment-specific configuration you want in the settings.php for that environment.
Comment #4
michaelpporter CreditAttribution: michaelpporter commentedThank you, I will try that out.
Comment #5
ronan CreditAttribution: ronan commentedEven simpler: If you have note overridden the NodeSquirrel schedule you can disable it in your setting.php with:
$conf['nodesquirrel_schedule_enabled'] = FALSE;
Comment #6
DamienMcKennaIt would be worth documenting this.
Comment #7
jwilson3Comment #8
DamienMcKennaThere's now a new setting to disable all of the cron integration and it has been documented in the README.txt file, see #3014143: Add master switch to turn off hook_cron for details.