Score:0

configuring backup migrate file name in settings file

in flag

Drupal 9.3.7, backup_migrate 5.0.1 --- On my dev machine, I've set the name for backup_migrate backup files in the config settings. When I export the database to my production machine, I'd like to use a different file name for the backup. How can I do this in the settings.php for the production site? (I have separate settings.php for the dev and prod sites). Can I set a $settings[] var in settings.php? I'm not sure what the name of it would be. In backup_migrate, I set this in a settings profile; is it possible to use a different profile depending on the host?

cn flag
Simple way to get the name of config for settings.php: export the config to a file, then look at the name of the file. [docs here](https://www.drupal.org/docs/drupal-apis/configuration-api/configuration-override-system#s-global-overrides)
pglatz avatar
in flag
Thanks - I saw that, but not sure how to specify the var. I imagine it would be based on backup_migrate.backup_migrate_settings.standard, so what would the variable be? Something like $settings['backup_migrate.backup_migrate_settings']['standard']['name'] ?
cn flag
You are on the right track, but pretty sure you are looking for `$config` vs `$settings`. Aside, I like to install the https://www.drupal.org/project/config_override_warn module since it will give some indication within the admin UI that this is controlled elsewhere.
pglatz avatar
in flag
$config['backup_migrate.backup_migrate_settings']['standard']['name'] = 'backup-en9-local-override'; But when I set a breakpoint (xdebug, using phpStorm) in the settings.php file, $config is shown as being empty. I see my setting added after stepping over the line but I don't see it changed on the b/m settings page.
cn flag
Changes in settings.php do not show up in the admin UI, so you won’t see a change. For local development you can use the Config Override Warn module as noted above, but note the warning “do not use this module in production”.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.