3

Sitecore instance is doing a backup of configuration history every 20 minutes.

I do not know where it comes from and what it is used for.

Is it necessary to keep all those backups? How to change the delay of the backup or simply remove it.

If someone have a little information about this it would be greatly appreciated. Thanks

I'm using Sitecore 8.2

Here's some screenshot of the path :

2 Answers 2

1

The backup of the configuration files is a feature that was added back in Sitecore 8 update-3, primarily introduced to help Sitecore Support with diagnostics information when trying to resolve issues.

The Sitecore.Pipelines.Loader.DumpConfigurationFiles processor is responsible for creating these dumps/zip, but note that this is called from the initialize pipeline which means that this will only happen once on startup, and it is not a processor that runs periodically or on a schedule.

If there multiple backup files that appear to be 20 mins apart it is purely coincidental, happening after a deployment or App Pool restart for whatever reason. If this is your local machine then it may be after a code deployment then it is probably again coincidental with a deploy from Visual Studio.

Note: If this is happening on a Production server then I would be more worried about this issue, and there is a different underlying issue causing your application to restart too often. Do not just patch the processor out, instead figure out what the problem is.

As useful as this may be, it is not strictly required, you can remove the processor with a patch config if you so wish:

<pipelines>
    <initialize>
        <processor type="Sitecore.Pipelines.Loader.DumpConfigurationFiles, Sitecore.Kernel">
            <patch:delete />
        </processor>
    </initialize>
</pipelines>

If this on your local machine, you may wish to use the Developer Performance configs from Kam Figy.

Or as Peter points out in his answer, change the maxAge property of the CleanupAgent task. For example, to only keep files less than 6 hours old, patch the config:

<scheduling>
  <agent type="Sitecore.Tasks.CleanupAgent">
    <files>
      <remove folder="$(dataFolder)/diagnostics/configuration_history" set:maxAge="06:00:00" />
    </files>
  </agent>
</scheduling>

You can read more about the processors in this blog post.

1
  • 1
    Thank you for the help ! Our website was on a test server and it was the application pool idle timeout that was set to 20 minutes. So as you mentioned, Sitecore was creating a backup file when the Application pool restarted.
    – JP Rioux
    Jul 27, 2018 at 19:11
1

The Sitecore.Pipelines.Loader.DumpConfigurationFiles processor is responsible for creating these dumps of configuration files.

It is defined in Sitecore.Diagnostics.config like this:

<processor type="Sitecore.Pipelines.Loader.DumpConfigurationFiles, Sitecore.Kernel">
  <dumpFolder>$(dataFolder)/diagnostics/configuration_history</dumpFolder>
  <zip>true</zip>
  <files hint="raw:AddPath">
    <file path="/App_Config" />
    <file path="/Web.config" />
    <file path="/Global.asax" />
    <file path="/sitecore/shell/sitecore.version.xml" />
  </files>
</processor>

This agent is responsible for cleaning up this folder after 30 days:

<scheduling>
  <agent type="Sitecore.Tasks.CleanupAgent">
  <files>
    <remove folder="$(dataFolder)/diagnostics/configuration_history" pattern="*" maxAge="30.00:00:00" recursive="false" />
    <remove folder="$(dataFolder)/diagnostics/health_monitor" pattern="*.*" maxAge="07.00:00:00" recursive="false" />
  </files>
  </agent>
</scheduling>

Mind the MaxAge parameter set to 30.00:00:00. You can maybe lower this number to 7.00:00:00 to only store backups of configuration files for last seven days. Do this by creating patch config file. Do not change config directly.

I couldn't find any parameter that can be set to change interval between backups.

You can also remove the pipeline but I wouldn't recommend doing it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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