Problem/Motivation

There are some configurations, specially variables that are closely related to the current site. Like cron_key or drupal_private_key.

Import and export this variables is not always intended.

Proposed resolution

Allow to define a set of configurations that should be ignored while exporting and importing configs. Also they should be hidden from the UI.

CommentFileSizeAuthor
#1 1931332.exclude_configs.1.patch10.52 KBdagmar

Comments

dagmar’s picture

Status: Active » Needs review
StatusFileSize
new10.52 KB

Status: Needs review » Needs work

The last submitted patch, 1931332.exclude_configs.1.patch, failed testing.

dagmar’s picture

Status: Needs work » Needs review

#1: 1931332.exclude_configs.1.patch queued for re-testing.

dashohoxha’s picture

I just want to support this feature request, because I think that it is fundamental to the goal of configuration management.

Currently, Drupal variables are used for keeping the configuration of a module, or just as a persistent storage (for example the variables that keep cached values). Persistent storage variables have no relation at all with the configuration and they should just be always ignored. How to do this? Maybe by compiling a blacklist of variables from all the important and most popular modules.

Some of the variables that are used for module configuration are just too site specific. For example smtp_username and smtp_password. In my opinion, there are two cases that we need to export the configuration of a site: as a backup, or as a distribution (to build other sites that are very similar but not identical to ours). In the first case we need to save all the variables. In the second case we need to skip the variables that are site specific or that contain sensitive data (passwords, api keys, etc.) How to do this? Again, we can compile a list of site-specific and sensitive variables from all the important and most popular modules.

As a command-line fan, I would love to see a drush option like --export-type=(backup|distro) to the configuration-export-all command.

By the way, the option --all that is used for the drush commands should go away. Why? Because it the normal, default thing to be done (in my opinion). This is why we need to use the configuration management, to export all the configurations of a site (this is why Configuration Management is better than Features). Maybe another option, --exclude, can be introduced, just in case that somebody wants to exclude specific configurations.

dagmar’s picture

Status: Needs review » Fixed

Committed and pushed to 7.x-2.x

By the way, the option --all that is used for the drush commands should go away. Why?

Please open a new issue for that, we can discuss if is a valid suggestion. Thanks.

Status: Fixed » Closed (fixed)

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