Source:Creating Exclude List/en: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
Line 24: | Line 24: | ||
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. | 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. | ||
Some files are only temporary, while others are permanently in use. These files should either be excluded from | Some files are only temporary, while others are permanently in use. These files should either be excluded from 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: | ||
*[[Special:MyLanguage/Creating_Exclude_List#GUI|Setting up an ''Exclude list'']] in the GUI. | *[[Special:MyLanguage/Creating_Exclude_List#GUI|Setting up an ''Exclude list'']] in the GUI. | ||
*[[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 | *[[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. | ||
*[[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#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 the SEP sesam configuration file ''sm.ini'']] to exclude files from all backups on the client. | *[[Special:MyLanguage/Creating_Exclude_List#sm.ini|Using the SEP sesam configuration file ''sm.ini'']] to exclude files from all backups on the client. | ||
Line 33: | Line 33: | ||
==={{anchor|GUI}}Exclude list in the GUI=== | ==={{anchor|GUI}}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 [[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 | 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 an exclude list set in the GUI. | ||
<ol><li>From ''Main Selection'' -> '''Tasks''' -> '''By Clients''', select your client and click '''New Backup Task'''. The ''New Backup Task'' window opens. | <ol><li>From ''Main Selection'' -> '''Tasks''' -> '''By Clients''', select your client and click '''New Backup Task'''. The ''New Backup Task'' window opens. | ||
<li>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 | <li>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 the appropriate [[Special:MyLanguage/SEP_sesam_Glossary#task_type|''task type'']].</li> | ||
<li>In the '''Exclude list''', specify the files or folders you do not want to back up in one of the following ways:<br /> | <li>In the '''Exclude list''', specify the files or folders you do not want to back up in one of the following ways:<br /> | ||
{{anchor|browse_button}}'''Exclude using the ''browse'' button'''<br />The easiest way to exclude specific files or folders from | {{anchor|browse_button}}'''Exclude using the ''browse'' button'''<br />The easiest way to exclude specific files or folders from backup is to use the large ''browse'' button (next to the fields ''Source'' and ''Exclude list'') and select the source for 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.<br /> | ||
[[image:Basic_exclude_list_Beefalo_V2.jpg|700px|link=]] | [[image:Basic_exclude_list_Beefalo_V2.jpg|700px|link=]] | ||
<br clear=all> | <br clear=all> | ||
Line 43: | Line 43: | ||
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 (''regex exclude''). | 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 (''regex exclude''). | ||
<br />Add the exclusion patterns one after the other, followed by a comma. The procedure for using regex exclude is SEP sesam version dependent. For more details, see [[Special:MyLanguage/4_4_3_Beefalo:Exclude_with_Regular_Expressions|Exclude with Regular Expressions]]. | <br />Add the exclusion patterns one after the other, followed by a comma. The procedure for using regex exclude is SEP sesam version dependent. For more details, see [[Special:MyLanguage/4_4_3_Beefalo:Exclude_with_Regular_Expressions|Exclude with Regular Expressions]]. | ||
{{note|When creating exclude lists with regex, pay attention to which SEP sesam version you are using. As of [[SEP sesam Release Versions|≥ Jaglion V2 SP2]] it is possible to use separate excludes for files and directories, which can help in creating more selective excludes. | <!-- Commented out as this is currently not possible: {{note|When creating exclude lists with regex, pay attention to which SEP sesam version you are using. As of [[SEP sesam Release Versions|≥ Jaglion V2 SP2]] it is possible to use separate excludes for files and directories, which can help in creating more selective excludes. | ||
This is the syntax that allows separate excludes for files and directories (with the "regexp_split" option enabled as described below): | This is the syntax that allows separate excludes for files and directories (with the "regexp_split" option enabled as described below): | ||
Line 50: | Line 50: | ||
In v. [[SEP sesam Release Versions|≥ Jaglion V2 SP2]], you can customize your exclude lists to use the new syntax by adding the following switch to the [[Special:MyLanguage/Standard_Backup_Procedure#bck_options|backup options in the GUI]]: <br /><code>-o excl<nowiki>=</nowiki>regexp_split</code>.}} | In v. [[SEP sesam Release Versions|≥ Jaglion V2 SP2]], you can customize your exclude lists to use the new syntax by adding the following switch to the [[Special:MyLanguage/Standard_Backup_Procedure#bck_options|backup options in the GUI]]: <br /><code>-o excl<nowiki>=</nowiki>regexp_split</code>.}} | ||
<br /> | <br /> --> | ||
[[image:Exclude_list_Beefalo_V2.jpg|700px|link=]] | [[image:Exclude_list_Beefalo_V2.jpg|700px|link=]] | ||
<br clear=all> | <br clear=all> | ||
Line 59: | Line 59: | ||
==={{anchor|custom}}Create a custom exclude list on the client=== | ==={{anchor|custom}}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 | 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 custom exclude 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 | A custom exclude list must be a text file that is created on the SEP sesam Client where 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]] | ||
Line 70: | Line 70: | ||
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 /> | ||
Create or open the '''backup task''', select the '''Options''' tab and under | Create or open the '''backup task''', select the '''Options''' tab and under ''Additional call arguments'' in the '''Backup options''' field, enter the specified file in the form: | ||
-X C:/sesam/exclude_list.txt | -X C:/sesam/exclude_list.txt | ||
Line 82: | Line 82: | ||
*The exclusion entries have to be set up using regular expression syntax. | *The exclusion entries have to be set up using regular expression syntax. | ||
As of [[SEP sesam Release Versions|≥ 5.0.0.9 Jaglion V2 SP2]], you can use separate excludes for files and directories. See [[Special:MyLanguage/4_4_3_Beefalo:Exclude_with_Regular_Expressions|Exclude with Regular Expressions]] for details. | <!-- | ||
As of [[SEP sesam Release Versions|≥ 5.0.0.9 Jaglion V2 SP2]], you can use separate excludes for files and directories. See [[Special:MyLanguage/4_4_3_Beefalo:Exclude_with_Regular_Expressions|Exclude with Regular Expressions]] for details.--> | |||
This is an example of the ''exclude_list.txt'' on Linux: | |||
\./tmp$ | \./tmp$ | ||
\./home/John Doe/videos.zip$ | \./home/John Doe/videos.zip$ | ||
\./home/John Doe/Business Documents/YearEnd Closing for business year | \./home/John Doe/Business Documents/YearEnd Closing for business year 2021$ | ||
===={{anchor|windows}}Exclude list on Windows==== | ===={{anchor|windows}}Exclude list on Windows==== | ||
Line 108: | Line 109: | ||
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: | 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: | ||
*Each file or directory you want to exclude from the backup must be specified | *Each file or directory you want to exclude from the backup must be specified on a separate line (one entry per line). | ||
*Use only the pattern format for exclude. | *Use only the pattern format for exclude. | ||
Line 123: | Line 124: | ||
/media/nss/VOL1/data/do_not_backup.txt | /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 | For example, ''/media/nss/VOL1'' is set as the source in the backup task. This means that the entire contents ''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 | -X /etc/sesam/exclude_list.txt | ||
SEP sesam will exclude all files and directories | SEP sesam will exclude from backup all files and directories that are listed in the file. | ||
==={{anchor|nosbc}}Creating a special file ''nosbc'' to permanently exclude a directory=== | ==={{anchor|nosbc}}Creating a special file ''nosbc'' to permanently exclude a directory=== | ||
Line 139: | Line 140: | ||
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. | 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. | ||
The default location of the sm.ini file is <tt><SESAM_ROOT>\var\ini\sm.ini</tt>. | The default location of the <tt>sm.ini</tt> file is <tt><SESAM_ROOT>\var\ini\sm.ini</tt>. | ||
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. | 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. | ||
<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. | <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. See [[Special:MyLanguage/4_4_3_Beefalo:Exclude_with_Regular_Expressions|Exclude with Regular Expressions]] for details. | ||
<!-- | |||
* If exclude ends with a trailing slash "<tt>/$</tt>" (e.g. <tt>.tmp/$</tt>), it is recognized as a directory exclude regex. | * If exclude ends with a trailing slash "<tt>/$</tt>" (e.g. <tt>.tmp/$</tt>), it is recognized as a directory exclude regex. | ||
* If there is no trailing slash "<tt>/</tt>" (e.g. <tt>.tmp</tt>) at the end, it is recognized as a file exclude regex. | * If there is no trailing slash "<tt>/</tt>" (e.g. <tt>.tmp</tt>) 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 [[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> | 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> | ||
[SBC_EXCLUDE] | [SBC_EXCLUDE] | ||
ExcludePattern1=\./mnt$ | ExcludePattern1=\./mnt$ | ||
Line 151: | Line 153: | ||
ExcludePattern3=\./media$ | ExcludePattern3=\./media$ | ||
{{Note|The ''ExcludePattern900'' and higher exclude parameters are used for SEP sesam specific | {{Note|The ''ExcludePattern900'' and higher exclude parameters are used for SEP sesam specific exclude patterns. To define your own exclude patterns, use the parameters ''ExcludePattern1'' to ''ExcludePattern899''.}} | ||
<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> | <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> |
Revision as of 17:52, 2 August 2022
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 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:
- Setting up an Exclude list in the GUI.
- Creating a custom exclude list on the SEP sesam Client (SBC CLI) to exclude a larger number of files.
- Creating a special file nosbc in the directory itself to permanently mark the directory for exclusion.
- Using the SEP sesam configuration file sm.ini to exclude files from all backups on the client.
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 an exclude list set in the GUI.
- From Main Selection -> Tasks -> By Clients, select your client and click New Backup Task. The New Backup Task window opens.
- 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 the appropriate task type.
- 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 backup is to use the large browse button (next to the fields Source and Exclude list) and select the source for 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.
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 (regex exclude).
Add the exclusion patterns one after the other, followed by a comma. The procedure for using regex exclude is SEP sesam version dependent. For more details, see Exclude with Regular Expressions.
Click OK.
For more examples of exclusions using regular expression patterns, see Examples for Excluding Matched Patterns.
Note | |
Exclude 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 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 custom exclude 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 where 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 Additional call arguments in the Backup 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 2021$
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 on 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 on 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 the entire contents 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 from backup all files and directories 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. The following example shows the pattern for excluding the directories /dev, /mnt and /media from backup. [SBC_EXCLUDE] ExcludePattern1=\./mnt$ ExcludePattern2=\./dev$ ExcludePattern3=\./media$
- 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 ?).
Note | |
The ExcludePattern900 and higher exclude parameters are used for SEP sesam specific exclude patterns. To define your own exclude patterns, use the parameters ExcludePattern1 to ExcludePattern899. |