Source:Creating Exclude List: Difference between revisions

From SEPsesam
(Marked this version for translation)
(Marked this version for translation)
(35 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<translate><!--T:1-->
<languages /><translate><!--T:1-->
<div class="noprint"><languages />
<noinclude>
<div class="noprint">
{{Copyright SEP AG‎|en}}
{{Copyright SEP AG‎|en}}


<!--T:2-->
<!--T:2-->
{{Navigation_latest|release=4.4.3|link=[[Special:MyLanguage/SEP_sesam_Documentation#previous|Documentation archive]]}}</div>
{{Navigation_latest|release=[[Special:MyLanguage/SEP_sesam_Release_Versions|4.4.3 ''Beefalo''/5.0.0 ''Jaglion'']]|link=[[Special:MyLanguage/SEP_sesam_Documentation#previous|Documentation archive]]}}<br /></div>


 
===Overview=== <!--T:3--></translate>
==Overview== <!--T:3--></translate>
<div class="boilerplate metadata" id="Additional resources" style="background-color: #f0f0f0; color:#636f73; border: 1px ridge #cdd3db; margin: 0.5em; padding: 0.5em; float: right; width: 35%; "><center><b><translate><!--T:4-->
<div class="boilerplate metadata" id="Additional resources" style="background-color: #f0f0f0; color:#636f73; border: 1px ridge #cdd3db; margin: 0.5em; padding: 0.5em; float: right; width: 35%; "><center><b><translate><!--T:4-->
Additional resources</translate></b></center>
Additional resources</translate></b></center>
Line 13: Line 13:
{|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;" | <translate><!--T:5-->
| rowspan="2" style="padding:0px 10px 0px;" | <translate><!--T:5-->
[[File:SEP_next.png|45px|link=SBC_CLI#exclude_lists]]</translate>
[[File:SEP_next.png|45px|link=Special:MyLanguage/SBC_CLI#exclude_lists|SBC CLI exclude]]</translate>
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | <translate><!--T:6-->
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | <translate><!--T:6-->
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/RegExp:_Examples_for_Excluding_Matched_Patterns|Examples for Excluding Matched Patterns]] – [[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?]]</translate>
See also: [[Special:MyLanguage/SBC_CLI#exclude_lists|SBC CLI exclude]] – [[Special:MyLanguage/4_4_3_Beefalo:Exclude_with_Regular_Expressions|Exclude with regular expressions]] – [[Special:MyLanguage/RegExp:_Examples_for_Excluding_Matched_Patterns|Examples for Excluding Matched Patterns]] – [[Special:MyLanguage/4_4_3_Beefalo:Exclude_with_File_Patterns|Exclude with file patterns]] – [[Special:MyLanguage/SEP_sesam_Volume_Shadow_Copy_Service_(VSS)_for_Windows#exclude|Manually excluding a VSS writer from backup]] – [[Special:MyLanguage/4_4_3_Beefalo:FAQ#exclude_VSS_writers|How to exclude specific VSS writers from a backup?]]</translate>
|}
|}


{|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;" | <translate><!--T:7-->
| rowspan="2" style="padding:0px 10px 0px;" | <translate><!--T:7-->
[[File:SEP Tip.png|45px|link=Special:MyLanguage/FAQ|FAQ]]</translate>
[[File:SEP Tip.png|45px|link=Special:MyLanguage/4_4_3_Beefalo:FAQ|FAQ]]</translate>
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | <translate><!--T:8-->
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | <translate><!--T:8-->
Check [[Special:MyLanguage/FAQ#exclude_directory|FAQ]] for additional information on exclude lists.</translate>
Check [[Special:MyLanguage/4_4_3_Beefalo:FAQ#exclude_directory|FAQ]] for additional information on exclude lists.</translate>
|}
|}


Line 30: Line 30:
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | <translate><!--T:10-->
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | <translate><!--T:10-->
If you are using an older SEP sesam version, refer to [[Special:MyLanguage/SEP_sesam_Documentation#previous|Documentation archive]].</translate>
If you are using an older SEP sesam version, refer to [[Special:MyLanguage/SEP_sesam_Documentation#previous|Documentation archive]].</translate>
|}</div>
|}</div></noinclude>
<translate><!--T:11-->
<translate><!--T:11-->
For each backup you can back up only selected files, [[Special:MyLanguage/FAQ#incl-excl_files|files that match a specific pattern]] and exclude specific files, file types or directories from backups.</translate><!-- What if include and exclude lists are specifying the same files/directories? Which list has a higher priority then? For example, if one specifies the same file in the include and exclude list/field, will the file be included or excluded from backup?-->  
For each backup, you can back up only selected files, [[Special:MyLanguage/4_4_3_Beefalo:FAQ#incl-excl_files|files that match a specific pattern]], and exclude specific files, file types or directories from backups.</translate>


<translate><!--T:12-->
<translate><!--T:12-->
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:</translate>
Some files are only temporary, while others are permanently in use. These files should either be excluded from the normal backup or backed up in a special way. For example, you may not want to back up temporary (''.tmp'') files, read-only files, or files from specific directories (e.g., the ''download'' directory). SEP sesam provides a number of ways to set exclusions:</translate>


*<translate><!--T:13-->
*<translate>
[[Special:MyLanguage/Creating_Exclude_List#editor|Specifying files, file types or regular expressions in ''Exclude List'']] when creating a [[Special:MyLanguage/Creating_a_Backup_Task|backup task]]. </translate>
<!--T:69-->
[[Special:MyLanguage/Creating_Exclude_List#GUI|Setting up an ''Exclude list'']] in the GUI.</translate>
*<translate><!--T:14-->
*<translate><!--T:14-->
[[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</translate>
[[Special:MyLanguage/Creating_Exclude_List#custom|Creating a custom exclude list]] on the [[Special:MyLanguage/SBC_CLI#exclude_lists|SEP sesam Client (SBC CLI)]] to exclude a larger number of files</translate>
*<translate><!--T:15-->
*<translate><!--T:15-->
[[Special:MyLanguage/Creating_Exclude_List#nosbc|Creating a special file ''nosbc'' in the directory]] itself to permanently mark the directory for exclusion.</translate>
[[Special:MyLanguage/Creating_Exclude_List#nosbc|Creating a special file ''nosbc'' in the directory]] itself to permanently mark the directory for exclusion.</translate>
*<translate><!--T:16-->
*<translate><!--T:16-->
[[Special:MyLanguage/Creating_Exclude_List#sm.ini|Using SEP sesam configuration file ''sm.ini'']] to exclude files from all backups on the client. </translate>
[[Special:MyLanguage/Creating_Exclude_List#sm.ini|Using the SEP sesam configuration file ''sm.ini'']] to exclude files from all backups on the client. </translate>


<translate>=={{anchor|editor}}Add files, file types or regular expressions in the ''Exclude List Editor''== <!--T:17-->
<translate>==={{anchor|GUI}}Exclude list in the GUI=== <!--T:70-->  


<!--T:18-->
<!--T:71-->
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.</translate>  
When creating a backup task, you specify the source for your backup and define any files or patterns you want to exclude from the backup. Note that if the number of files to be excluded from the backup exceeds the allowed length for the exclude list, you should set up the exclusion as described in the section [[Special:MyLanguage/Creating_Exclude_List#custom|Create a custom exclude list on the client]]. Such a custom exclude list (e.g., -X C:/sesam/exclude_list.txt) takes precedence over any exclude list set in the GUI.</translate>
 
<ol><li><translate><!--T:72-->
<ol><li><translate><!--T:19-->
From ''Main Selection'' -> '''Tasks''' -> '''By Clients''', select your client and click '''New Backup Task'''. The ''New Backup Task'' window opens.</translate>
From '''Main Selection -> Tasks -> By clients''', select your client and click '''New backup task'''. The ''New backup task'' window opens.</translate>
<li><translate><!--T:73-->
<li><translate><!--T:20-->
Specify the '''Source'''. If you want to back up individual files, you can either browse for directories and files 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 back up the entire file system, enter ''all'' as the source. If you only want to back up files that match a specific pattern, use the [[Special:MyLanguage/4_4_3_Beefalo:FAQ#incl-excl_files|include list]] instead. Note that if you select the source by browsing, the ''task type'' and ''task name'' are set automatically. If you enter the source manually, you have to enter the ''task name'' and select relevant [[Special:MyLanguage/SEP_sesam_Glossary#task_type|''task type'']].</translate></li>
Enter the '''Task name'''.</translate>
<li><translate><!--T:74-->
<li><translate><!--T:21-->
In the '''Exclude list''', specify the files or folders you do not want to back up in one of the following ways:</translate><br />
From the '''Backup type''' drop-down list, select '''appropriate backup type'''.</translate>
<translate><!--T:75-->
<li><translate><!--T:22-->
{{anchor|browse_button}}'''Exclude using the ''browse'' button'''</translate><br /><translate><!--T:76-->
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 [[Special:MyLanguage/FAQ#incl-excl_files|include list]] instead.</translate>  
The easiest way to exclude specific files or folders from the backup is to use the large ''browse'' button (next to the fields ''Source'' and ''Exclude list'') and select the source for the exclusion in the ''Client File View'' window. In our example, we have excluded ''logs'' and ''program files'' from the backup, as shown in the screenshot below.</translate><br />
<li><translate><!--T:23-->
<translate><!--T:77-->
In the '''Exclude List Editor''', specify the exclusions by using regular expressions. Add the exclusion patterns one 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: {{path|\.tmp$, /old.*\.c$, /old.*/$}} </translate><br />
[[image:Basic_exclude_list_Beefalo_V2.jpg|700px|link=]]</translate>
<translate><!--T:24-->
<br clear=all>
[[image:exclude_list.jpg|700px|link=]]</translate>
<translate><!--T:78-->
{{anchor|editor}}'''Add files, file types or regular expressions in the ''Exclude list editor'''''</translate><br />
<translate><!--T:79-->
In the '''Exclude list editor''', you can specify exclusions using regular expressions. On Windows, you can also use the option ''Pattern exclude'', but on Linux it is only possible to exclude using regular expressions (''RegExp exclude'').</translate>
<br /><translate><!--T:80-->
Add the exclusion patterns one after the other, followed by a comma. For example, if you want to back up the source ''/usr'' but skip the ''*.tmp'' and ''old*.c'' files and all old* directories, add the following pattern in the editor: {{path|\.tmp$, /old.*\.c$, /old.*/$}} </translate>
{{<translate><!--T:86--> note</translate>|<translate><!--T:87--> When creating exclude lists with regex, pay attention to which SEP sesam version you are using. As of [[SEP sesam Release Versions|≥ Jaglion V2 SP1]] it is possible to use separate excludes for files and directories, which can help in creating more selective excludes.</translate>
*<translate><!--T:88--> If exclude ends with a trailing slash "<tt>/$</tt>" (e.g. <tt>.tmp/$</tt>), it is recognized as a regex for directory exclusion.</translate>
*<translate><!--T:89--> If there is no trailing slash "<tt>/</tt>" (e.g. <tt>.tmp</tt>) at the end, it is recognized as a regex for file exclusion.</translate>}}
<br />
<translate>
<!--T:81-->
[[image:Exclude_list_Beefalo_V2.jpg|700px|link=]]</translate>
<br clear=all>
<br clear=all>
</li></ol>
<translate><!--T:82-->
 
Click '''OK'''.</translate></li></ol>
<translate><!--T:25-->
<translate>
For more examples on excludes using regular expression patterns, see [[Special:MyLanguage/RegExp:_Examples_for_Excluding_Matched_Patterns|Examples for Excluding Matched Patterns]].</translate>
<!--T:83-->
 
For more examples of exclusions using regular expression patterns, see [[Special:MyLanguage/RegExp:_Examples_for_Excluding_Matched_Patterns|Examples for Excluding Matched Patterns]].</translate>
{{<translate><!--T:66-->
{{<translate><!--T:66-->
note</translate>|<translate><!--T:26-->
note</translate>|<translate><!--T:26-->
Exclude by using regular expressions is the default setting, but you can change it to use the file pattern (?,*) instead of regexp by modifying the configuration file <tt><SESAM_VAR>/var/ini/sm.ini</tt> on the [[Special:MyLanguage/SEP_sesam_Glossary#SBC|SEP sesam Client]]. In the config file <tt>sm.ini</tt> change the entry</translate><br /> <translate><!--T:67-->
Exclude using regular expressions is the default setting, but you can change it to use the file pattern (?,*) instead of regexp by modifying the configuration file <tt><SESAM_VAR>/var/ini/sm.ini</tt> on the [[Special:MyLanguage/SEP_sesam_Glossary#SBC|SEP sesam Client]]. In the config file <tt>sm.ini</tt> change the entry</translate><br /> <translate><!--T:67-->
<nowiki>EXCLUDE_MATCH= REGEXP to EXCLUDE_MATCH= PATTERN</nowiki></translate>.}}
<nowiki>EXCLUDE_MATCH= REGEXP to EXCLUDE_MATCH= PATTERN</nowiki></translate>.}}


<translate>=={{anchor|custom}}Create a custom exclude list on client== <!--T:27-->
<translate>==={{anchor|custom}}Create a custom exclude list on the client=== <!--T:27-->


<!--T:28-->
<!--T:28-->
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).
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 if the number of files or directories to be excluded for backup exceeds the allowed length for the exclude list (max. 1024 characters). Such a user-defined exclusion list takes precedence over an exclude list specified in the GUI (the latter is ignored if both are specified).


<!--T:29-->
<!--T:29-->
Line 94: Line 107:


<translate><!--T:34-->
<translate><!--T:34-->
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''.</translate>  
Create or open the '''backup task''', select the '''Options''' tab and under the ''Additional call arguments'' in the '''Backup options''' (previously ''Save options'') field, enter the specified file in the form:
-X C:/sesam/exclude_list.txt</translate>  


<translate>==={{anchor|linux}}Exclude list on Linux=== <!--T:35-->
<translate>===={{anchor|linux}}Exclude list on Linux==== <!--T:35-->


<!--T:36-->
<!--T:36-->
Create the exclude file on the client in the directory {{path|/etc/sesam}}, for example {{path|/etc/sesam/exclude_list.txt}}. The following rules apply:</translate>
Create the exclude file on the client in the directory {{path|/etc/sesam}}, for example {{path|/etc/sesam/exclude_list.txt}}. The following rules apply:</translate>
*<translate><!--T:37-->
*<translate><!--T:37-->
Each file or directory that you want to exclude from backup must be specified in a separate line (one entry per line). </translate>
Each file or directory you want to exclude from the backup must be specified on a separate line (one entry per line). </translate>


*<translate><!--T:38-->
*<translate><!--T:38-->
Line 107: Line 121:


*<translate><!--T:39-->
*<translate><!--T:39-->
The exclude entries have to be set up with a regular expressions syntax.</translate>
The exclusion entries have to be set up using regular expression syntax.</translate>


<translate><!--T:40-->
<translate><!--T:40-->
Line 114: Line 128:
   \./home/John Doe/videos.zip$
   \./home/John Doe/videos.zip$
   \./home/John Doe/Business Documents/YearEnd Closing for business year 2006$
   \./home/John Doe/Business Documents/YearEnd Closing for business year 2006$
 
<!--{{<translate>
{{<translate>
<!--T:64-->
<!--T:64-->
note</translate>|<translate>
note</translate>|<translate>
<!--T:65-->
<!--T:65-->
In SEP sesam versions < 4.4.3.45, the exclude list, defined on Linux/UNIX in a Lotus Notes backup task, does not work if specified with {{path|\.}}. For versions < 4.4.3.45, specify the exclude list for Notes without the preceding backslash and a dot, e.g., use {{path|/srv/notesdata/help$}} instead of {{path|\./srv/notesdata/help$'}}. </translate>}}
In SEP sesam versions < 4.4.3.45, the exclude list, defined on Linux/UNIX in a Lotus Notes backup task, does not work if specified with {{path|\.}}. For versions < 4.4.3.45, specify the exclude list for Notes without the preceding backslash and a dot, e.g., use {{path|/srv/notesdata/help$}} instead of {{path|\./srv/notesdata/help$'}}. </translate>}}-->
 
<translate>===={{anchor|windows}}Exclude list on Windows==== <!--T:41-->
<translate>==={{anchor|windows}}Exclude list on Windows=== <!--T:41-->


<!--T:42-->
<!--T:42-->
Line 129: Line 141:


* <translate><!--T:44-->
* <translate><!--T:44-->
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.</translate>
Each file or directory you want to exclude from the backup must be specified in a separate line (one entry per line). This also applies to paths that contain spaces.</translate>




<translate><!--T:45-->
<translate><!--T:45-->
This is an example of the ''exclude_list.txt'' on Windows:</translate>
This is an example of the ''exclude_list.txt'' file on Windows:</translate>
  D:/DOWNLOAD
  D:/DOWNLOAD
  D:/PREKITS
  D:/PREKITS
Line 143: Line 155:
  D:/gui
  D:/gui


<translate>==={{anchor|novell}}Exclude list for Micro Focus OES (formerly Novell OES)=== <!--T:46-->
<translate>===={{anchor|novell}}Exclude list for Micro Focus OES (formerly Novell OES)==== <!--T:46-->


<!--T:47-->
<!--T:47-->
Create the exclude file on the client in the directory {{path|/etc/sesam}}, for example {{path|/etc/sesam/exclude_list.txt}}. The following rules apply:</translate>
Create the exclude file on the client in the directory {{path|/etc/sesam}}, for example {{path|/etc/sesam/exclude_list.txt}}. The following rules apply:</translate>
*<translate><!--T:48-->
*<translate><!--T:48-->
Each file or directory that you want to exclude from backup must be specified in a separate line (one entry per line). </translate>
Each file or directory you want to exclude from the backup must be specified in a separate line (one entry per line). </translate>


*<translate><!--T:49-->
*<translate><!--T:49-->
Line 157: Line 169:


*<translate><!--T:51-->
*<translate><!--T:51-->
An exclude folder must end with a {{path|/}} (slash).</translate>
A folder to be excluded must end with a {{path|/}} (slash).</translate>




<translate><!--T:52-->
<translate><!--T:52-->
This is an example of the ''exclude_list.txt'':</translate>
This is an example of the ''exclude_list.txt'' file:</translate>


  /media/nss/VOL1/tmp/
  /media/nss/VOL1/tmp/
Line 168: Line 180:


<translate><!--T:53-->
<translate><!--T:53-->
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:</translate>
For example, ''/media/nss/VOL1'' is set as the source in the backup task. This means that all of ''VOL1'' will be backed up, except for the items in the exclusion file specified by the following entry in the ''backup task properties'' -> '''Options''' tab -> '''Backup options''' (previously ''Save options'') field:</translate>


   -X /etc/sesam/exclude_list.txt
   -X /etc/sesam/exclude_list.txt


<translate><!--T:54-->
<translate><!--T:54-->
SEP sesam will exclude all the files and directories from the backup that are listed in the file.
SEP sesam will exclude all files and directories from the backup that are listed in the file.


==Creating a special file ''nosbc'' to permanently exclude a directory== <!--T:55-->
==={{anchor|nosbc}}Creating a special file ''nosbc'' to permanently exclude a directory=== <!--T:55-->


<!--T:56-->
<!--T:56-->
You can permanently exclude a directory from all backups on the client by creating a special file in the directory itself – this file is <tt>.nosbc</tt> on Unix or <tt>nosbc</tt> 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.  
You can permanently exclude a directory from all backups on the client by creating a special file in the directory itself – this file is called <tt>.nosbc</tt> on Unix or <tt>nosbc</tt> on Windows. By creating such a file in the directory, the directory will not be backed up, even if it is included in the specified source.  


<!--T:57-->
<!--T:57-->
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'''.
This behavior can be switched off for a specific backup task by entering the ''-o noexcl'' switch in the '''backup task properties''', tab '''Options''' -> '''Backup options'''.


=={{anchor|sm.ini}}Using ''sm.ini'' to completely exclude files from backups on the client== <!--T:58-->
==={{anchor|sm.ini}}Using ''sm.ini'' to completely exclude files from backups on the client=== <!--T:58-->


<!--T:59-->
<!--T:59-->
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.</translate><!--Do we have a list of files that are excluded by default?-->
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 this method is that you can exclude files or directories from all backups performed on the respective client.</translate>  


<translate><!--T:60-->
<translate><!--T:60-->
Line 192: Line 204:


<!--T:61-->
<!--T:61-->
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''
To define the exclusions for the client, open the <tt>sm.ini</tt> file and under the parameter <tt>SBC_EXCLUDE</tt> enter one parameter per line.  
from the backup, specify the following:</translate>
<ul><li>On Linux, use regular expressions to define the exclusions in <tt>sm.ini</tt>. Note that as of [[SEP sesam Release Versions|≥ Jaglion V2 SP1]], it is possible to use separate excludes for files and directories.</translate>
*<translate> <!--T:90--> If exclude ends with a trailing slash "<tt>/$</tt>" (e.g. <tt>.tmp/$</tt>), it is recognized as a directory exclude regex.</translate>
*<translate> <!--T:91--> If there is no trailing slash "<tt>/</tt>" (e.g. <tt>.tmp</tt>) at the end, it is recognized as a file exclude regex.</translate>}}
<translate><!--T:92--> The following example shows the pattern for excluding the directories ''/dev'', ''/mnt'' and ''/media'' from backup for versions [[SEP sesam Release Versions|≤ Jaglion V2]]. For versions newer than Jaglion V2, a directory to be excluded must end with a {{path|/}} (trailing slash). </li></translate>
  [SBC_EXCLUDE]
  [SBC_EXCLUDE]
  ExcludePattern1=\./mnt$
  ExcludePattern1=\./mnt$
  ExcludePattern2=\./dev$
  ExcludePattern2=\./dev$
  ExcludePattern3=\./media$
  ExcludePattern3=\./media$
{{<translate><!--T:85--> Note</translate>|<translate><!--T:84-->
The ''ExcludePattern900'' and higher exclude parameters are used for SEP sesam specific exclusion patterns. To define your own exclusion patterns, use the parameters ''ExcludePattern1'' to ''ExcludePattern899''.</translate>}}


<translate><!--T:62-->
<translate><!--T:62-->
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?]]</translate>
<li>On Windows, use file patterns to define the exclusions in <tt>sm.ini</tt>. This allows you to exclude files that match the specified names or paths (note that <file_name> can also contain wildcard characters, e.g., * and ?).</li></ul></translate>


<translate><div class="noprint">
<noinclude><translate><div class="noprint">
==See also== <!--T:63-->
===See also=== <!--T:63-->
[[Special:MyLanguage/SBC_CLI#exclude_lists|SBC CLI exclude]] – [[Special:MyLanguage/Exclude_with_Regular_Expressions_4.4|Exclude with regular expressions]] – [[Special:MyLanguage/RegExp:_Examples_for_Excluding_Matched_Patterns|Examples for Excluding Matched Patterns]] – [[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?]]</div></translate>
[[Special:MyLanguage/SBC_CLI#exclude_lists|SBC CLI exclude]] – [[Special:MyLanguage/4_4_3_Beefalo:Exclude_with_Regular_Expressions|Exclude with regular expressions]] – [[Special:MyLanguage/RegExp:_Examples_for_Excluding_Matched_Patterns|Examples for Excluding Matched Patterns]] – [[Special:MyLanguage/4_4_3_Beefalo:Exclude_with_File_Patterns|Exclude with file patterns]] – [[Special:MyLanguage/SEP_sesam_Volume_Shadow_Copy_Service_(VSS)_for_Windows#exclude|Manually excluding a VSS writer from backup]] – [[Special:MyLanguage/4_4_3_Beefalo:FAQ#exclude_VSS_writers|How to exclude specific VSS writers from a backup?]]</div></translate></noinclude>

Revision as of 10:22, 20 June 2022

Other languages:

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 Beefalo/5.0.0 Jaglion. 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 either be excluded from the normal backup or backed up in a special way. For example, you may not want to back up temporary (.tmp) files, read-only files, or files from specific directories (e.g., the download directory). SEP sesam provides a number of ways to set exclusions:

Exclude list in the GUI

When creating a backup task, you specify the source for your backup and define any files or patterns you want to exclude from the backup. Note that if the number of files to be excluded from the backup exceeds the allowed length for the exclude list, you should set up the exclusion as described in the section Create a custom exclude list on the client. Such a custom exclude list (e.g., -X C:/sesam/exclude_list.txt) takes precedence over any exclude list set in the GUI.

  1. From Main Selection -> Tasks -> By Clients, select your client and click New Backup Task. The New Backup Task window opens.
  2. Specify the Source. If you want to back up individual files, you can either browse for directories and files 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 back up the entire file system, enter all as the source. If you only want to back up files that match a specific pattern, use the include list instead. Note that if you select the source by browsing, the task type and task name are set automatically. If you enter the source manually, you have to enter the task name and select relevant task type.
  3. In the Exclude list, specify the files or folders you do not want to back up in one of the following ways:
    Exclude using the browse button
    The easiest way to exclude specific files or folders from the backup is to use the large browse button (next to the fields Source and Exclude list) and select the source for the exclusion in the Client File View window. In our example, we have excluded logs and program files from the backup, as shown in the screenshot below.
    Basic exclude list Beefalo V2.jpg
    Add files, file types or regular expressions in the Exclude list editor
    In the Exclude list editor, you can specify exclusions using regular expressions. On Windows, you can also use the option Pattern exclude, but on Linux it is only possible to exclude using regular expressions (RegExp exclude).
    Add the exclusion patterns one after the other, followed by a comma. For example, if you want to back up the source /usr but skip the *.tmp and old*.c files and all old* directories, add the following pattern in the editor: \.tmp$, /old.*\.c$, /old.*/$
    Information sign.png Note
    When creating exclude lists with regex, pay attention to which SEP sesam version you are using. As of ≥ Jaglion V2 SP1 it is possible to use separate excludes for files and directories, which can help in creating more selective excludes.
    • If exclude ends with a trailing slash "/$" (e.g. .tmp/$), it is recognized as a regex for directory exclusion.
    • If there is no trailing slash "/" (e.g. .tmp) at the end, it is recognized as a regex for file exclusion.


    Exclude list Beefalo V2.jpg

    Click OK.

For more examples of exclusions using regular expression patterns, see Examples for Excluding Matched Patterns.

Information sign.png Note
Exclude using regular expressions is the default setting, but you can change it to use the file pattern (?,*) instead of regexp 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 the 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 if the number of files or directories to be excluded for backup exceeds the allowed length for the exclude list (max. 1024 characters). Such a user-defined exclusion list takes precedence over an exclude list specified in the GUI (the latter is ignored if both are specified).

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 Backup options (previously 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 you want to exclude from the backup must be specified on a separate line (one entry per line).
  • Wildcards are not supported.
  • The exclusion entries have to be set up using regular expression 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 you want to exclude from the backup must be specified in a separate line (one entry per line). This also applies to paths that contain spaces.


This is an example of the exclude_list.txt file 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 Micro Focus OES (formerly 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 you want to exclude from the 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.
  • A folder to be excluded must end with a / (slash).


This is an example of the exclude_list.txt file:

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

For example, /media/nss/VOL1 is set as the source in the backup task. This means that all of VOL1 will be backed up, except for the items in the exclusion file specified by the following entry in the backup task properties -> Options tab -> Backup options (previously Save options) field:

 -X /etc/sesam/exclude_list.txt

SEP sesam will exclude all 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 called .nosbc on Unix or nosbc on Windows. By creating such a file in the directory, the directory will not be backed up, even if it is included in the specified source.

This behavior can be switched off for a specific backup task by entering the -o noexcl switch in the backup task properties, tab Options -> Backup 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 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 exclusions for the client, open the sm.ini file and under the parameter SBC_EXCLUDE enter one parameter per line.

  • On Linux, use regular expressions to define the exclusions in sm.ini. Note that as of ≥ Jaglion V2 SP1, it is possible to use separate excludes for files and directories.
    • If exclude ends with a trailing slash "/$" (e.g. .tmp/$), it is recognized as a directory exclude regex.
    • If there is no trailing slash "/" (e.g. .tmp) at the end, it is recognized as a file exclude regex.}}
    The following example shows the pattern for excluding the directories /dev, /mnt and /media from backup for versions ≤ Jaglion V2. For versions newer than Jaglion V2, a directory to be excluded must end with a / (trailing slash).
  • [SBC_EXCLUDE] ExcludePattern1=\./mnt$ ExcludePattern2=\./dev$ ExcludePattern3=\./media$
    Information sign.png Note
    The ExcludePattern900 and higher exclude parameters are used for SEP sesam specific exclusion patterns. To define your own exclusion patterns, use the parameters ExcludePattern1 to ExcludePattern899.
  • On Windows, use file patterns to define the exclusions in sm.ini. This allows you to exclude files that match the specified names or paths (note that <file_name> can also contain wildcard characters, e.g., * and ?).