Source:Creating Exclude List: Difference between revisions

From SEPsesam
m (Corrected – to -.)
No edit summary
Line 9: Line 9:
{|style="margin: auto; margin-bottom:1em; width:100%; border:0px solid grey;"
{|style="margin: auto; margin-bottom:1em; width:100%; border:0px solid grey;"
| rowspan="2" style="padding:0px 10px 0px;" | [[File:SEP_next.png|45px|link=SBC_CLI#exclude_lists]]
| rowspan="2" style="padding:0px 10px 0px;" | [[File:SEP_next.png|45px|link=SBC_CLI#exclude_lists]]
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | See also: [[Special:MyLanguage/SBC_CLI#exclude_lists|SBC CLI]] – [[Special:MyLanguage/Exclude_with_File_Patterns_4.4|Exclude with file patterns]] – [[Special:MyLanguage/FAQ#exclude_VSS_writers|Excluding VSS writers]]
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | See also: [[Special:MyLanguage/SBC_CLI#exclude_lists|SBC CLI exclude]] – [[Special:MyLanguage/Exclude_with_Regular_Expressions_4.4|Exclude with regular expressions]] – [[Special:MyLanguage/Exclude_with_File_Patterns_4.4|Exclude with file patterns]] –[[Special:MyLanguage/FAQ#exclude_VSS_writers|How to exclude specific VSS writers from a backup?]]
|}
|}


Line 25: Line 25:
Some files are only temporary while others are permanently in use. These files should be either excluded from the ordinary backup or be backed up in a special way. For example, you may not want to back up any temporary (''.tmp'') files, read-only files, or files from specific directories (e.g., ''download directory''). SEP sesam provides a number of ways for setting up exclusion:  
Some files are only temporary while others are permanently in use. These files should be either excluded from the ordinary backup or be backed up in a special way. For example, you may not want to back up any temporary (''.tmp'') files, read-only files, or files from specific directories (e.g., ''download directory''). SEP sesam provides a number of ways for setting up exclusion:  


;Simple ''Exclude List'' in backup task wizard: [[Special:MyLanguage/Creating_Exclude_List#editor|Add files, file types or regular expressions]] (regex) to ''Exclude List'' when creating a [[Special:MyLanguage/Standard_Backup_Procedure#task|backup task]].  
*[[Special:MyLanguage/Creating_Exclude_List#editor|Specifying files, file types or regular expressions in ''Exclude List'']]  when creating a [[Special:MyLanguage/Standard_Backup_Procedure#task|backup task]].  
 
*[[Special:MyLanguage/Creating_Exclude_List#custom|Creating a custom exclude list]] on the [[Special:MyLanguage/SBC_CLI#exclude_lists|SEP sesam Client (SBC SLI)]] to exclude a larger number of files
;Excludes specified as a separate file on client:[[Special:MyLanguage/Creating_Exclude_List#custom|Create a custom exclude list]] on the [[Special:MyLanguage/SBC_CLI#exclude_lists|SEP sesam Client (SBC SLI)]] to exclude a larger number of files.
*[[Special:MyLanguage/Creating_Exclude_List#nosbc|Creating a special file ''nosbc'' in the directory]] itself to permanently mark the directory for exclusion.
 
*[[Special:MyLanguage/Creating_Exclude_List#sm.ini|Using SEP sesam configuration file ''sm.ini'']] to exclude files from all backups on the client.  
;Permanently marking the directory for exclusion: [[Special:MyLanguage/Creating_Exclude_List#nosbc|Create a special file ''nosbc'']] in the directory itself.


=={{anchor|editor}}Add files, file types or regular expressions in the ''Exclude List Editor''==
=={{anchor|editor}}Add files, file types or regular expressions in the ''Exclude List Editor''==
Line 50: Line 49:


A custom exclude list must be a text file that is created on the SEP sesam Client on which the backup will be executed. The syntax for exclude entries is platform/OS dependent, see:
A custom exclude list must be a text file that is created on the SEP sesam Client on which the backup will be executed. The syntax for exclude entries is platform/OS dependent, see:
*[[Special:MyLanguage/Creating_Exclude_List&#linux|Exclude list on Linux]]
*[[Special:MyLanguage/Creating_Exclude_List#linux|Exclude list on Linux]]
*[[Special:MyLanguage/Creating_Exclude_List&#windows|Exclude list on Windows]]
*[[Special:MyLanguage/Creating_Exclude_List#windows|Exclude list on Windows]]
*[[Special:MyLanguage/Creating_Exclude_List&#novell|Exclude list for Novell OES]]
*[[Special:MyLanguage/Creating_Exclude_List#novell|Exclude list for Novell OES]]


Once you have created the exclude file, for example ''exclude_list.txt'', enter it in the backup task properties as follows:<br />
Once you have created the exclude file, for example ''exclude_list.txt'', enter it in the backup task properties as follows:<br />
Line 107: Line 106:
The behavior can be switched off for a specific backup task by entering the ''-o noexcl'' switch under the '''backup task properties''', tab '''Options''' -> '''Save options'''.
The behavior can be switched off for a specific backup task by entering the ''-o noexcl'' switch under the '''backup task properties''', tab '''Options''' -> '''Save options'''.


=={{anchor|sm.ini}}Using ''sm.ini'' to completely exclude files from backups on the client==
You can use the central SEP sesam config file <tt>sm.ini</tt> to specify the files on the client that should never be backed up. The advantage of using this method is that you can exclude files or directories from all backups performed on the respective client.<!--Do we have a list of files that are excluded by default?-->
The default location of the sm.ini file is <tt><SESAM_ROOT>\var\ini\sm.ini</tt>.
To define the excludes for the client, open the <tt>sm.ini</tt> file and under the parameter <tt>SBC_EXCLUDE</tt> enter one parameter per line. Use regular expressions to define the excludes. For example, to exclude the directories ''/dev'', ''/mnt'' and ''/media''
from the backup, specify the following:
[SBC_EXCLUDE]
ExcludePattern1=\./mnt$
ExcludePattern2=\./dev$
ExcludePattern3=\./media$
If you would rather create an exclude list based on file patterns, see [[Special:MyLanguage/FAQ#SBC|How can I set the SBC so that the exclude list always uses the file pattern (?,*) instead of using regular expressions?]]
==See also==
==See also==
[[Special:MyLanguage/Exclude_with_File_Patterns_4.4|Exclude with file patterns]] – [[Special:MyLanguage/Exclude_with_Regular_Expressions_4.4|Exclude with regular expressions]] – [[Special:MyLanguage/FAQ#exclude_VSS_writers|How to exclude specific VSS writers from a backup?]] – [[Special:MyLanguage/SEP_Sesam_Admin_Manual#Default_exclude_list|Default exclude list]] – [[Special:MyLanguage/FAQ#Linux_backup| Exclude a large number of files for backup in Linux]] – [[Special:MyLanguage/FAQ#exclude_file| Exclude a large number of files for backup in Windows]]
[[Special:MyLanguage/Exclude_with_Regular_Expressions_4.4|Exclude with regular expressions]] – [[Special:MyLanguage/Exclude_with_File_Patterns_4.4|Exclude with file patterns]] –[[Special:MyLanguage/FAQ#exclude_VSS_writers|How to exclude specific VSS writers from a backup?]]

Revision as of 15:38, 31 January 2017

Draft.png WORK IN PROGRESS
This article is in the initial stage and may be updated, replaced or deleted at any time. It is inappropriate to use this document as reference material as it is a work in progress and should be treated as such.

Copyright © SEP AG 1999-2024. All rights reserved.

Any form of reproduction of the contents or parts of this manual is allowed only with the express written permission from SEP AG. When compiling and designing user documentation SEP AG uses great diligence and attempts to deliver accurate and correct information. However, SEP AG cannot issue a guarantee for the contents of this manual.

Docs latest icon.png Welcome to the latest SEP sesam documentation version 4.4.3. For previous documentation version(s), check Documentation archive.


Overview

For each backup you can back up only selected files, files that match a specific pattern and exclude specific files, file types or directories from backups.

Some files are only temporary while others are permanently in use. These files should be either excluded from the ordinary backup or be backed up in a special way. For example, you may not want to back up any temporary (.tmp) files, read-only files, or files from specific directories (e.g., download directory). SEP sesam provides a number of ways for setting up exclusion:

Add files, file types or regular expressions in the Exclude List Editor

When creating a backup task, you specify the source for your backup as well as define any files or patterns you want to exclude from backup.

  1. From Main Selection -> Tasks -> By clients, select your client and click New backup task. The New backup task window opens.
  2. Enter the Task name.
  3. From the Backup type drop-down list, select appropriate backup type.
  4. Specify the Source. If you want to back up individual files, you can either browse for directories and files that you want to include in the backup or enter their names followed by a comma (C:/Program Files/SEPsesam/var/db,C:\Users\AA\Documents\references). If you want to backup the whole file system, set the source as all. If you want to back up only files that match a specific pattern, use the include list instead.
  5. In the Exclude List Editor, specify the exclusions by using regular expressions. Add the exclusion patterns on by one followed by a comma. For example, if you want to back up source /usr but skip *.tmp and old*.c files and all old* directories, add the following pattern to the editor:
  6. \.tmp$, /old.*\.c$, /old.*/$
    Exclude list.png

Information sign.png Note
Exclude by using regular expressions is the default setting, but you can change it to use the file pattern (?,*) instead of regex by modifying the configuration file <SESAM_VAR>/var/ini/sm.ini on the SEP sesam Client. In the config file sm.ini change the entry
EXCLUDE_MATCH= REGEXP to EXCLUDE_MATCH= PATTERN .

Create a custom exclude list on client

You can specify a custom exclude list of items to be skipped during backup by creating a special file on SEP sesam Client. Typically, you would create a separate exclude file when the number of files or directories to be excluded for backup exceeds allowed length for exclude list (max. 1024 characters in SEP sesam version ≥ 4.4.3; max. 255 characters in version ≤ 4.4.2).

A custom exclude list must be a text file that is created on the SEP sesam Client on which the backup will be executed. The syntax for exclude entries is platform/OS dependent, see:

Once you have created the exclude file, for example exclude_list.txt, enter it in the backup task properties as follows:
Create or open the backup task, select the Options tab and under the Additional call arguments in the Save options field, enter the specified file in the form: -X C:/sesam/exclude_list.txt.

Exclude list on Linux

Create the exclude file on the client in the directory /etc/sesam, for example /etc/sesam/exclude_list.txt. The following rules apply:

  • Each file or directory that you want to exclude from backup must be specified in a separate line (one entry per line).
  • Wildcards are not supported.
  • The exclude entries have to be set up with a regular expressions syntax.

This is an example of the exclude_list.txt on Linux:

 \./tmp$
 \./home/John Doe/videos.zip$
 \./home/John Doe/Business Documents/YearEnd Closing for business year 2006$

Exclude list on Windows

Create the exclude file on the client in the directory C:\Program Files\SEPsesam\var\ini, for example exclude_list.txt. The following rules apply:

  • Use only / (slash) in the exclude file and NOT \ (backslash).
  • Each file or directory that you want to exclude from backup must be specified in a separate line (one entry per line). This also applies to paths that include spaces.

This is an example of the exclude_list.txt on Windows:

D:/DOWNLOAD
D:/PREKITS
D:/Dev
D:/kit_2_3_1_7
D:/kit_2_3_1_5
D:/knoppix
D:/ACHIM
D:/gui

Exclude list for Novell OES

Create the exclude file on the client in the directory /etc/sesam, for example /etc/sesam/exclude_list.txt. The following rules apply:

  • Each file or directory that you want to exclude from backup must be specified in a separate line (one entry per line).
  • Use only the pattern format for exclude.
  • Wildcards are allowed in the file or directory entries.
  • An exclude folder must end with a / (slash).

This is an example of the exclude_list.txt

/media/nss/VOL1/tmp/
/media/nss/VOL1/USR/*/Notes/Workspace/
/media/nss/VOL1/data/do_not_backup.txt

For example, /media/nss/VOL1 is entered as source in the backup task. This means that the complete VOL1 will be backed up, excluding the items in the exclude file that is specified by the following entry in the Save options field of the Options tab in the backup task definition:

 -X /etc/sesam/exclude_list.txt

SEP sesam will exclude all the files and directories from the backup that are listed in the file.

Creating a special file nosbc to permanently exclude a directory

You can permanently exclude a directory from all backups on the client by creating a special file in the directory itself – this file is .nosbc on Unix or nosbc on Windows. By creating such a file in the directory, the directory will not be backed up even though is might be included in the specified source.

The behavior can be switched off for a specific backup task by entering the -o noexcl switch under the backup task properties, tab Options -> Save options.

Using sm.ini to completely exclude files from backups on the client

You can use the central SEP sesam config file sm.ini to specify the files on the client that should never be backed up. The advantage of using this method is that you can exclude files or directories from all backups performed on the respective client.

The default location of the sm.ini file is <SESAM_ROOT>\var\ini\sm.ini.

To define the excludes for the client, open the sm.ini file and under the parameter SBC_EXCLUDE enter one parameter per line. Use regular expressions to define the excludes. For example, to exclude the directories /dev, /mnt and /media from the backup, specify the following:

[SBC_EXCLUDE]
ExcludePattern1=\./mnt$
ExcludePattern2=\./dev$
ExcludePattern3=\./media$

If you would rather create an exclude list based on file patterns, see How can I set the SBC so that the exclude list always uses the file pattern (?,*) instead of using regular expressions?

See also

Exclude with regular expressionsExclude with file patternsHow to exclude specific VSS writers from a backup?