drush config-export dumps my entire site config into files.

What I want is to only export config which is non-default.

ie. if I haven't changed my "automated cron settings" since installing my Drupal site, leave it out of my config.

Is this possible with drush? Some other tool?


Such a concept doesn't really exist in the config system. There is no overridden status like in cools/entity exports in 7.x.

Default config is only default config as long as it is a file in config/install. Once it is installed, it just is your configuration, there isn't really a connection anymore to the original default config file.

There is a hash in those files, so you could technically write something that looks for the default config file and compares the hash or even compare every single value. But keep in mind that default config can actually change, deciding whether you'd want your unchanged existing value or the new default is something that is surprisingly hard to do.

Not sure what you would want this for, the only thing that I can think of would be config for an install profile.

  • 1
    I'm curious if there's a way to use the drush config-export --skip-modules option to achieve this. For example create one module/feature/installation profile that contains all your default settings, and skipping that module when you export your configuration. – Wim Mostrey Jan 9 '17 at 19:25
  • Right - by "default" i just mean, "the config that shipped, rather than the config in my sites dir". Berdir, You guessed it. I'm Trying to write an install profile that doesn't contain the entire standard entire profile - just the delta. My next move is going to be somehow scripting a diff beteween all the config files in my sites directory with their sources. – aaronbauman Jan 9 '17 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.