Skip to content

Custom rules

There are 3 ways to customise Sanitization Policies for volumes in your environment configuration:

Policy Name Description
drupal-public Ignores styles/, css/, js/ and .htaccess folder & files when backing up a filesystem.
drupal-private Ignores .php/, *.sql & .htaccess folders and files when backing up a filesystem.
no-policy This is by default used on the temporary file system or users can use to not ignore any file when backing up.

These rules can be optionally applied to the volumes section under sanitize. It also replaces the older config under backup->volume.

Example new config

volumes:
  public:
    backup:
      sanitize:
        policies:
          - no-policy
        rules:
          exclude:
            - my-private-file.txt

Example old config

backup:
  volume:
    public:
      paths:
        exclude:
          - "js/*"
          - "css/*"
          - "styles/*"
    private:
      paths:
       exclude:
          - ".php/*"
          - "preview-site/*"

You can change these defaults by adding and modifying configuration found below to .skpr/defaults.yml or to the configuration file for each environment.