How can we help?

We think these articles could help:

    See More
    Home > CrashPlan > Latest > Configuring > Excluding Or Filtering Files Using File Type & Regular Expressions

    Excluding Or Filtering Files Using File Type & Regular Expressions

    Applies to:
    • CrashPlan for Home
    • CrashPlan PRO
    • CrashPlan PROe

    Overview

    Certain files and file types can be globally excluded from a backup without having to modify the file selection by unchecking each individual file/folder. These exclusions can be added either by file type or by using regular expressions (regex). This tutorial explains how to configure your backup using both file type and regular expression exclusions.

    Considerations

    • If you have an existing backup, implementing a file exclusion will remove any files in your backup archive that match that exclusion.
    • Code42 is not responsible for data removed in this manner.
    • Code42 cannot offer support for creating a specific regex.
    • Some file types are excluded by default from CrashPlan for Home and CrashPlan PRO
    Backup Sets And Exclusions
    Backup sets are an optional feature. If you use backup sets, special caution is needed when creating file exclusions. Specifically, file exclusions specified for any backup set impact all sets backing up to the same destination.

    Example: Set A and Set B back up to an external hard drive destination. Set A has an exclusion indicating that files ending in .mp3 shouldn't back up. Even though the exclusion isn't specified for Set B, MP3s from this set will not back up to the external hard drive. 

    Common Exclusions

    Since many of the files below can be easily re-downloaded or installed, you can exclude them all together. This may decrease the initial upload duration.

    • Windows executable files (.exe)
    • Disc images (.iso)
    • Temporary files (.tmp)
    • OSX DS_Store files (.DS_Store)

    Add Exclusions By File Type

    Steps

    1. Open the CrashPlan app
    2. Go to Settings > Backup
    3. Next to Filename exclusions, click Configure
    4. By default, exclusions are based on file extensions.  For example, to exclude your music files, enter "mp3" or ".mp3" and click the plus sign to add the exclusion.

    Backup Exclusions by File Type

    Add Exclusions Using Regular Expressions

    A regular expression (regex) is a string of text used as a search pattern to match filenames containing a specific sequence of characters. Leverage the power of regular expressions to fine-tune and allow for more complex backup file exclusion rules.

    Steps

    1. Open the CrashPlan app
    2. Go to Settings > Backup
    3. Next to Filename exclusions, click Configure
    4. Check the Regular Expression box.  This allows for more complex file exclusions.  For example, the following regex excludes any folder that starts with IMAP.

    Backup Exclusions using Regular Expressions

    Example 1 - Exclude Files Ending With .mp3

    .*\.mp3
    

    In simple terms, this expression means:

    • A filename of any length, made up of any character(s), that ends with ".mp3"

    Specific components of the expression are defined as follows:

    • The first dot (period) indicates the filename can contain any character, and the * indicates the filename can be any length (from a length of zero to infinity, or more accurately, up to your operating system's filename length limit).
    • The backslash (\) before the second dot indicates that dot should be evaluated literally as a dot (not as a character wildcard like the dot at the beginning of the expression).  You may hear this described as "the dot in .mp3 is escaped with a backslash."

    Case-insensitive:

    (?i).*\.mp3

    Any pattern beginning with (?i) indicates a case-insensitive search, so the example above will match files that end with .mp3 and .MP3 (as well as .Mp3 and .mP3).

    Example 2 - Exclude Files And Folders Starting With TEMP

    .*/TEMP.*
    

    This expression means any file or folder name that begins with TEMP would be excluded from backups. For example, the following would be excluded by this expression:

    • C:\Windows\TEMP
    • C:\Windows\TEMP2
    • ​C:\Windows\TEMP.tmp
    • C:\Windows\security\TEMPLATES

    In the above examples, note that other directories in the \Windows and \Windows\security folders that do not begin with TEMP would still be included.   However, all subdirectories, or folders within the excluded folders, would be excluded as well.

    Note that CrashPlan treats all file separators as forward slashes (/).

    External Resources

    There are many fantastic regex resources on the Internet. Here are a few of our favorites:

    If you need help with your regular expressions, you might also try asking for help from other users in our User Forums.

    You must to post a comment.
    Last Modified
    14:21, 4 Nov 2014

    Tags