Reference information for including or excluding files for backup using CrashPlan for Small Business

Overview

By default, the CrashPlan app backs up files in the user's home directory. This article contains information about using variables and regex to define what should be included and excluded in the backup file selection.

The file selection can also be adjusted directly from the Manage Files menu in the CrashPlan app. 

For an overview of the different inclusion and exclusion methods, see Include and exclude files for backup for Small Business.

How it works

There are several ways of specifying which files and folders should be included or excluded in the backup file selection.

  • Use substitution variables
  • Specify filename patterns using wildcards
  • Specify file extensions to exclude
  • Use regular expressions
Included and excluded files
Inclusions are processed first, followed by exclusions. Files that are in both the inclusions and exclusions will be excluded, since the exclusion list is processed last.
 
Incorrect drive-letter capitalization may cause data loss
Drive letters are case sensitive. Adding a file path with incorrect capitalization of the drive letter removes all files from the backup file selection for devices with a different case drive letter. For example, adding a file path that starts with lowercase c (such as c:\Users) removes the backups of files whose actual path on disk starts with a capital C (such as C:\Users).

See also Real-time changes not detected in CrashPlan for Small Business for details about directory-name case sensitivity.
 
The CrashPlan app does not back up Windows UNC file paths
The CrashPlan app does not support Universal Naming Convention (UNC) file paths (for example, //SERVERNAME/shareddir/).

File selections must use an absolute path (for example, C:/) to enable backup and restore. 
 
Only Linux devices honor case-sensitivity
Files whose names differ only in capitalization are recognized as distinct files on Linux devices when you select files for backup, as well as when you select files for download. On Windows and Mac devices, files whose names differ only in capitalization are treated as the same file. When you restore two Linux files whose names differ only in capitalization to a Windows or Mac device, the files have "original<number>" prefixed to their names to differentiate them from one another.

Considerations

Excluded files

  • To exclude a file from backup, the file's parent must be included. This means that if an exclusion uses a directory and not a token (for example, :user, :root, and so on), and the exclusion does not have a parent directory explicitly shown in the inclusion list, the exclusion is pruned automatically from the exclusions list. 
  • Excluded and deselected files are treated differently than deleted files, so the Remove deleted files setting does not apply to excluded files. As a result, the files that have been excluded are removed from the backup archive and are permanently unrecoverable.

Test, test, test

Make sure you verify your exclusions and inclusions any time you make a change. Otherwise, essential files may not be backing up, or too many nonessential files may be taking up space and bandwidth.

Mac metadata

If you find that certain system or media files are not backing up on a Mac, verify that the affected files do not contain exclusion metadata. Certain metadata attributes tell applications that the file should not be backed up. It is possible to remove the exclusion metadata for a file, so that the CrashPlan app can back up the file.

Include a trailing slash for directories

When you want to include a directory in the included or excluded files fields of device backup settings, you must include a trailing slash ("/") in the path name. For example, C:/data/ is correct, but C:/data is incorrect. If you do not include the trailing slash, CrashPlan Cloud treats the path name as a file rather than a directory. This could have the following consequences:

  • Files within the directory that you want to include in your backup will not be backed up.
  • Files within the directory that you want to exclude from your backup will not be excluded.

Console: Use substitution variables

Substitution variables offer cross-platform shortcuts to common user and system folders. Instead of identifying each user folder by name, you can use substitution variables.

Use substitution variables to specify the types of files or locations in the directory field. These variables are applied in the following situations:

When the variable is applied, then the specific device's settings replace the variable with the explicit list of the corresponding files and folders.

Case sensitivity
Substitution variables are case-sensitive. As a best practice, add separate inclusions/exclusions for each case-combination that exists on users’ devices (for example, both “My Documents” and “my documents”).
Variable Description
:main Main volume (For example: C:\ on Windows or / on Unix or Mac)
:applications Default applications folder for the device's OS (functions on all platforms)
:user User’s home folder
:desktop User’s desktop folder
:documents User’s default document folder
:music User’s music folder
:pictures User’s pictures folder
:movies User’s movies folder
:allUsers

Includes the parent Users folder (For example: C:\Users\ on Windows, /Users/ on Mac, or /home/ on Linux)

:allDesktops All users' desktop folders at the time the CrashPlan app is installed
:allDocuments All users' default document folders at the time the CrashPlan app is installed
:allMusic All users' default music folders at the time the CrashPlan app is installed
:allPictures All users' default pictures folders at the time the CrashPlan app is installed
:allMovies All users' default movie folders at the time the CrashPlan app is installed

Substitution variable example

User laptops at ABC Company are deployed with a directory under the user's home directory called “WorkFolder”. Users have been instructed to store their important files in WorkFolder so that this is backed up.

Some users also have certain confidential documents on their systems. These documents cannot be backed up due to compliance reasons and users are instructed to store those confidential documents in a directory called Private. In this example, we include the WorkFolder but exclude the Private folder.

Included Excluded

:user/WorkFolder/

:user/WorkFolder/Private/

In the case of a specific device, Joe's MacBook Air, the result of applying the variables looks like:

Included Excluded

/User/Joe/WorkFolder/

/User/Joe/WorkFolder/Private/

And on Jill's Windows PC, the end result of the same variables is:

Included Excluded

C:\Documents and Settings\Jill\WorkFolder\

C:\Documents and Settings\Jill\WorkFolder\Private\

Exclude files from backup

In the CrashPlan console, you can specify filename patterns to exclude by default for all users in your CrashPlan for Small Business environment. Go to Device Backup > Backup. Enter exclusions in Filename Exclusions.

The default settings for some of these exclusions are often satisfactory for most customers. You may wish to add additional inclusions and exclusions tuned to your needs.

CrashPlan app and CrashPlan console: Regular expressions

Regular expressions are a complex but powerful way of designating files to be excluded from backup. Each expression you provide is always matched against the absolute path of the file, which requires that you take the full file path into account when you exclude files.

File paths
CrashPlan Cloud always uses / as the file separator character.

Here's an example: Consider the absolute path: /Users/Peter/Documents/examples/regex.txt. You could exclude the file with:

regex Description
.*\.txt All text files in all directories will be excluded, case-sensitive
(?i).*\.txt Same as previous, case-insensitive
(?i).*/examples/.*\.txt Text files in examples folder are excluded, case-insensitive
(?i)/Users/Peter/.*\.txt Text files in Peter's home directory are excluded, case-insensitive
(?i)/Users/.*/examples/.*\.txt Text files contained in User's home directory within an examples folder are excluded, case-insensitive

Make sure the 'Regular Expressions' checkbox is selected if you want to use regular expressions. All entries will be evaluated accordingly.

Test your changes

Always test your file inclusion and exclusion changes prior to deploying in a production environment. To test your exclusions on a test system:

  1. Apply your exclusions by Pushing your settings changes.
  2. Manually start a file scan verification from the Backup Set Settings Menu by selecting Scan for file changes. You must complete a file scan verification before the inclusions/exclusions take effect.
  3. Trigger Archive Maintenance for the test system's backup archive:
    1. Go to the test system's Device detail screen.
    2. Select Maintain Archive from the Archive action menu.
  4. View the files in the backup archive from restore from the console or from the desktop.

Following the above process in a test environment lets you see which files remain backed up before making changes in your production environment. Always verify in a test environment before making any changes.

Apply settings

In the System-wide Device Defaults, there are two ways to apply settings from the CrashPlan console: save and push.

  • Saving a setting applies it for new devices in the future. Saving settings does not affect any existing devices.
  • push.png Pushing a setting changes it on user devices, but still allows users to change the setting later.

 

Applies changes to future devices Applies changes to existing devices Allows users to change settings
Save Yes No Yes
Push Yes Yes Yes

Save

Click Save to save settings for new devices in the future. Saving settings does not affect any existing devices.

Push

Click Push (to the right of the inclusion and exclusion settings) to send your settings to users without replacing the filename patterns that users have already entered, merging the user and administrative file selections.

Pushing a setting only applies additive changes. Therefore, if you try to remove a path from the included or excluded files field and click Push, that path won’t be removed from existing devices.

Apply settings considerations

  • When editing settings for a single device, any changes are automatically pushed to that device.

Examples

Several examples are included here. Refer also to Exclude or filter files using file type and regular expressions (regex) in CrashPlan for Small Business for even more information on regular expressions.

In the following examples, the parent directories for the excluded files must have already been added to the file inclusions list.

Example 1: Exclude files ending with .mp3

.*\.mp3

This pattern means any character (the dot) for any number of times (the star) ending with ”.mp3”. The dot in mp3 is escaped with a backslash.

Case-insensitive:

(?i).*\.mp3

Any pattern beginning with (?i) indicates a case-insensitive search. This example will match both .mp3 and .MP3.

Example 2: Exclude folders starting with IMAP

.*/IMAP.*

As above, any characters until a directory starting with IMAP followed by any characters. Note that CrashPlan Cloud treats all file separators as forward slashes (/).

Test your regular expressions
Because these types of regular expressions are often extremely complex, it is especially important to test any regular expressions thoroughly prior to deployment in a production environment.
Was this article helpful?
0 out of 0 found this helpful

Articles in this section

See more