Include Files In Website Backup

Sample rules to include files & directories in website backup

You can backup files based on a regular expression. This is useful when you want to backup specific files from different directories with some kind of pattern in their path.

On the node modify page you will see the following boxes where you can add rules based on regular expression and glob pattern.


Using Regular Expression - Regex

Include all the zip files under wpvividbackups directory.

(.\_)\/public_html\/wp-content\/wpvividbackups\/.\_zip$

This rule will match the following directory structures

  • user1/public_html/wp-content/wpvividbackups/backup-1.zip
  • user2/public_html/wp-content/wpvividbackups/backup-2.zip

Using Glob Pattern

Include all the zip files under wpvividbackups directory.

*/public_html/wp-content/wpvividbackups/*.zip

This rule will match the following directory structures

  • user1/public_html/wp-content/wpvividbackups/backup-1.zip
  • user2/public_html/wp-content/wpvividbackups/backup-2.zip