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

dgorton’s picture

Issue summary: View changes
michaelpporter’s picture

To 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

pkiff’s picture

Late 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.

michaelpporter’s picture

Thank you, I will try that out.

ronan’s picture

Even simpler: If you have note overridden the NodeSquirrel schedule you can disable it in your setting.php with:

$conf['nodesquirrel_schedule_enabled'] = FALSE;

DamienMcKenna’s picture

Version: 7.x-3.0 » 7.x-3.x-dev
Component: Code » Documentation
Category: Feature request » Task

It would be worth documenting this.

jwilson3’s picture

Title: Create a setting to disable backups on dev/stage » Document how to disable NodeSquirrel backups on dev/stage
DamienMcKenna’s picture

Status: Active » Fixed
Related issues: +#3014143: Add master switch to turn off hook_cron

There'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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.