Include-exclude problems. Including only one directory

staham

ADSM.ORG Senior Member
Joined
Mar 26, 2007
Messages
133
Reaction score
3
Points
0
Location
Lule
I have a problem with the windows clients. I'm trying to configure one client to only include one directory on one drive.

On Unix clients, it's easily fixed with the virtualmountpoint and domain statements, but I can't get it to work with windows.

I've found some info on the internet, and have added the following two lines at the end of dsm.opt:
Exclude "O:\...\*"
Include "O:\Public folder\...\*"

I.e. I want to back up O:\Public folder, but nothing else on O:.
If I restart the service (TSM Scheduler), start the BA Client, and look in:
Utilities->Preview Include-Exclude, I can see that nothing is excluded on O:.

I have also seen that TSM really tries to backup everything in O:.

Does anyone have any ideas?

I'm including the relevant lines from dsm.opt below:

DOMAIN SYSTEMSERVICES
DOMAIN SYSTEMSTATE
DOMAIN ALL-LOCAL

*******************************************************************************
* Common includes/excludes for Windows 2003
*******************************************************************************



INCLUDE "C:\...\*.*" OS_MGMT
INCLUDE "D:\...\*.*" OS_MGMT
INCLUDE.SYSTEMSTATE ALL OS_MGMT
INCLUDE "C:\Program Files\Microsoft SQL Server\MSSQL\Backup\*.*" DB_MGMT
EXCLUDE "D:\Program\Trend\OfficeScan\PCCSRV\HTTPDB\*.*"
EXCLUDE "C:\Program Files\Microsoft SQL Server\MSSQL\Data\*.*"
EXCLUDE.BACKUP "*:\microsoft uam volume\...\*"
EXCLUDE.BACKUP "*:\microsoft uam volume\...\*.*"
EXCLUDE.BACKUP "*:\...\EA DATA. SF"
EXCLUDE.BACKUP "*:\IBMBIO.COM"
EXCLUDE.BACKUP "*:\IBMDOS.COM"
EXCLUDE.BACKUP "*:\IO.SYS"
EXCLUDE.BACKUP "*:\...\system32\config\...\*"
EXCLUDE.BACKUP "*:\...\system32\Perflib*.dat"
EXCLUDE.BACKUP "*:\...\system32\dhcp\...\*"
INCLUDE.BACKUP "*:\...\system32\dhcp\backup\...\*"
EXCLUDE.BACKUP "*:\...\system32\dns\...\*"
INCLUDE.BACKUP "*:\...\system32\dns\backup\...\*"
EXCLUDE.ARCHIVE "*:\microsoft uam volume\...\*"
EXCLUDE.ARCHIVE "*:\microsoft uam volume\...\*.*"
EXCLUDE.ARCHIVE "*:\...\EA DATA. SF"
EXCLUDE.ARCHIVE "*:\IBMBIO.COM"
EXCLUDE.ARCHIVE "*:\IBMDOS.COM"
EXCLUDE.ARCHIVE "*:\IO.SYS"
EXCLUDE.ARCHIVE "*:\...\system32\config\...\*"
EXCLUDE.ARCHIVE "*:\...\system32\Perflib*.dat"
EXCLUDE.ARCHIVE "*:\...\system32\dhcp\...\*"
INCLUDE.ARCHIVE "*:\...\system32\dhcp\backup\...\*"
EXCLUDE.ARCHIVE "*:\...\system32\dns\...\*"
INCLUDE.ARCHIVE "*:\...\system32\dns\backup\...\*"
EXCLUDE.DIR "*:\System Volume Information"
EXCLUDE.DIR "*:\...\Temporary Internet Files"
EXCLUDE.DIR "*:\Recycled"
EXCLUDE.DIR "*:\Recycler"
EXCLUDE.DIR "*:\temp"
Exclude "O:\...\*"
Include "O:\Public folder\...\*"
 
Is it definitely picking up your includes&excludes? If you start up the command line client (dsmc) and run "q inclexcl" do you see the list as you wanted?

If not, your client scheduler/cad aren't picking up your dsm.opt file - might be using a different one.
 
Hmm.. I just found out that it seems to exclude files, but not directories.
That is why it complained about directories it had no right to read in.

I solved it by adding a few exclude.dir lines on the offending directories. The rest is excluded as before.
 
This is true and works as intended.
My standard dsm.opt on windows is:
EXCLUDE "[a-z]:\...\*"
INCLUDE "C:\<directory with files to include>\...\*"

Notice that TSM reads the opt file from bottom to top and has a fixed order to proces includes and excludes. So i you exclude.dir the directory and than include it again it will not work as exclude.dir as preference over the include. Also include/exclude statements on the server override the client afaik.


Hmm.. I just found out that it seems to exclude files, but not directories.
That is why it complained about directories it had no right to read in.

I solved it by adding a few exclude.dir lines on the offending directories. The rest is excluded as before.
 
Hello,

If you want just to back up O:\Public folder, but nothing else .you can do this:

INCLUDE "O:\Public folder\...\*"
EXCLUDE.DIR "[a-np-z]:\*"
EXCLUDE.DIR "O:\[a-oq-z]*"

the EXCLUDE.DIR filter is readen als first ... so you don't have to make these filters other the INCLUDE filters.

I hope it can help you.

Cyprien
 
Thanks for the replies. I forgot this thread until now. Fixed it somehow, but these are good suggestions. I'll have to try them out!
Thanks :)
 
If I restart the service (TSM Scheduler), start the BA Client, and look in:
Utilities->Preview Include-Exclude, I can see that nothing is excluded on O:.

you should restart the system, restart the service is not sufficient. afaik.
 
Do we need to add Domain O: stanza in dsm.opt.
I have configured the dsm.opt to backup only the folder in O drive and all other drives are backed up with a different dsm.opt file, can you please suggest to include a folder in O alone with one dsm.opt?
 
Include Exclude in Windows

I have edited my optfile but still the backup failed,

dsm.opt.......
**************
DOMAIN G:

INCLUDE "G:\Program Files\Mer\Quality\repo\qc\VST_11\BTC_VST\...\*"
EXCLUDE.DIR "[a-fh-z]:\*"
EXCLUDE.DIR "G:\[a-gi-z]*"

****************************
Backup failed as its trying to backup G drive,

Incremental backup of volume '\\hqbusa0237\g$'
ANS1999E Incremental processing of '\\hqbusa0237\g$' stopped.
ANS1030E The operating system refused a TSM request for memory allocation.

Please any one have any idea?
 
I have edited my optfile but still the backup failed,

dsm.opt.......
**************
DOMAIN G:

INCLUDE "G:\Program Files\Mer\Quality\repo\qc\VST_11\BTC_VST\...\*"
EXCLUDE.DIR "[a-fh-z]:\*"
EXCLUDE.DIR "G:\[a-gi-z]*"

****************************
Backup failed as its trying to backup G drive,

Incremental backup of volume '\\hqbusa0237\g$'
ANS1999E Incremental processing of '\\hqbusa0237\g$' stopped.
ANS1030E The operating system refused a TSM request for memory allocation.

Please any one have any idea?

bprrajeev,

This looks like a different issue. This line:

ANS1030E The operating system refused a TSM request for memory allocation.
Indicates that the client is either low or out of memory. Try:

MEMORYEFFICIENTBACKUP YES

in the client options file and see if that helps. Check the memory utilisation on the client, it might need a reboot. Also, If the volume you're trying to backup has very large numbers of files, you might also need to have a look at Journalling.

I would suggest creating a new thread for this issue, as it doesn't seem to be related to the original post.
 
Yes, MEMORYEFFICIENTBACKUP YES is already updated in dsm.opt.
The folder is having around files I think thats the reason it failes, but I am able to take a manual backup with out any issue. There are around 4Laks files in the folder.
 
hi,

I have a similar problem and didn't get it done ...

this is may include/exclude statements from dsm.opt:

Code:
DOMAIN    C:

INCLUDE "C:\Program Files\DocGenerator\...\*"
EXCLUDE.DIR "C:\*"


EXCLUDE.BACKUP "*:\microsoft uam volume\...\*"
EXCLUDE.BACKUP "*:\microsoft uam volume\...\*.*"
EXCLUDE.BACKUP "*:\...\EA DATA. SF"
EXCLUDE.BACKUP "*:\IBMBIO.COM"
EXCLUDE.BACKUP "*:\IBMDOS.COM"
EXCLUDE.BACKUP "*:\IO.SYS"
EXCLUDE.BACKUP "*:\pagefile.sys"
EXCLUDE.BACKUP "*:\...\system32\Perflib*.dat"
EXCLUDE.BACKUP "*:\...\system32\dhcp\...\*"
INCLUDE.BACKUP "*:\...\system32\dhcp\backup\...\*"
EXCLUDE.BACKUP "*:\...\system32\dns\...\*"
INCLUDE.BACKUP "*:\...\system32\dns\backup\...\*"
EXCLUDE.ARCHIVE "*:\microsoft uam volume\...\*"
EXCLUDE.ARCHIVE "*:\microsoft uam volume\...\*.*"
EXCLUDE.ARCHIVE "*:\...\EA DATA. SF"
EXCLUDE.ARCHIVE "*:\IBMBIO.COM"
EXCLUDE.ARCHIVE "*:\IBMDOS.COM"
EXCLUDE.ARCHIVE "*:\IO.SYS"
EXCLUDE.ARCHIVE "*:\...\system32\config\...\*"
EXCLUDE.ARCHIVE "*:\...\system32\Perflib*.dat"
EXCLUDE.ARCHIVE "*:\...\system32\dhcp\...\*"
INCLUDE.ARCHIVE "*:\...\system32\dhcp\backup\...\*"
EXCLUDE.ARCHIVE "*:\...\system32\dns\...\*"
INCLUDE.ARCHIVE "*:\...\system32\dns\backup\...\*"
EXCLUDE.DIR "*:\System Volume Information"
EXCLUDE.DIR "*:\...\Temporary Internet Files"
EXCLUDE.DIR "*:\Recycled"
EXCLUDE.DIR "*:\Recycler"
EXCLUDE.DIR "*:\$Recycle.Bin"

and this is the output of "dsmc q inclexl"
Code:
*** FILE INCLUDE/EXCLUDE ***
Mode Function  Pattern (match from top down)  Source File
---- --------- ------------------------------ -----------------
Excl Directory *\...\.TsmCacheDir             TSM
Excl Directory c:\WINDOWS\system32\microsoft\protect Operating System
Excl Directory C:\WINDOWS\WinSxS              Operating System
Excl Directory C:\WINDOWS\system32\WBEM\Repository Operating System
Excl Directory C:\WINDOWS\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE} Operating System
Excl Directory C:\WINDOWS\system32\CatRoot\{127D0A1D-4EF2-11D1-8608-00C04FC295EE} Operating System
Excl Directory C:\WINDOWS\system32\CatRoot2\{F750E6C3-38EE-11D1-85E5-00C04FC295EE} Operating System
Excl Directory C:\WINDOWS\system32\CatRoot2\{127D0A1D-4EF2-11D1-8608-00C04FC295EE} Operating System
Excl Directory C:\WINDOWS\Repair\Backup\BootableSystemState\ComRegistrationDatabase Operating System
Excl Directory C:\WINDOWS\Registration        Operating System
Excl Directory C:\adsm.sys                    Operating System
Excl Directory *\$Recycle.Bin                 dsm.opt
Excl Directory *\Recycler                     dsm.opt
Excl Directory *\Recycled                     dsm.opt
Excl Directory *\...\Temporary Internet Files dsm.opt
Excl Directory *\System Volume Information    dsm.opt
Excl Directory C:\*                           dsm.opt
Exclude All       C:\WINDOWS\usrclass.dat.log    Operating System
Exclude All       C:\WINDOWS\usrclass.dat        Operating System
Exclude All       C:\WINDOWS\Tasks\schedlgu.txt  Operating System
Exclude All       C:\WINDOWS\system32\NtmsData\...\* Operating System
Exclude All       C:\WINDOWS\system32\MSDtc\trace\dtctrace.log Operating System
Exclude All       C:\WINDOWS\system32\config\*.evt Operating System
Exclude All       C:\WINDOWS\System32\CatRoot2\...\* Operating System
Exclude All       C:\WINDOWS\SoftwareDistribution\...\* Operating System
Exclude All       C:\WINDOWS\repair\asr.log      Operating System
Exclude All       C:\WINDOWS\repair\asr.err      Operating System
Exclude All       C:\WINDOWS\Registration\*.clb  Operating System
Exclude All       C:\WINDOWS\netlogon.chg        Operating System
Exclude All       C:\WINDOWS\debug\*             Operating System
Exclude All       C:\WINDOWS\csc\...\*           Operating System
Exclude All       C:\DOCUME~1\jhauf.adm\LOCALS~1\Temp\1\...\* Operating System
Exclude All       C:\Documents and Settings\jhauf.adm\...\index.dat Operating System
Exclude All       C:\Documents and Settings\All Users\DRM\...\* Operating System
Exclude All       C:\Documents and Settings\All Users\Application Data\Microsoft\Network\Downloader\* Operating System
Exclude All       *\System Volume Information\MountPointManagerRemoteDatabase Operating System
Exclude All       *\System Volume Information\...\*{3808876B-C176-4e48-B7AE-04046E6CC752} Operating System
Exclude All       *\System Volume Information\*.{7cc467ef-6865-4831-853f-2a4817fd1bca}DB Operating System
Exclude All       *\System Volume Information\*.{7cc467ef-6865-4831-853f-2a4817fd1bca}ALT Operating System
Exclude All       *\Pagefile.sys                 Operating System
Exclude All       *\hiberfil.sys                 Operating System
Exclude All       *\...\*.crmlog                 Operating System
Include Archive   *\...\system32\dns\backup\...\* dsm.opt
Exclude Archive   *\...\system32\dns\...\*       dsm.opt
Include Archive   *\...\system32\dhcp\backup\...\* dsm.opt
Exclude Archive   *\...\system32\dhcp\...\*      dsm.opt
Exclude Archive   *\...\system32\Perflib*.dat    dsm.opt
Exclude Archive   *\...\system32\config\...\*    dsm.opt
Exclude Archive   *\IO.SYS                       dsm.opt
Exclude Archive   *\IBMDOS.COM                   dsm.opt
Exclude Archive   *\IBMBIO.COM                   dsm.opt
Exclude Archive   *\...\EA DATA. SF              dsm.opt
Exclude Archive   *\microsoft uam volume\...\*.* dsm.opt
Exclude Archive   *\microsoft uam volume\...\*   dsm.opt
Include Backup    *\...\system32\dns\backup\...\* dsm.opt
Exclude Backup    *\...\system32\dns\...\*       dsm.opt
Include Backup    *\...\system32\dhcp\backup\...\* dsm.opt
Exclude Backup    *\...\system32\dhcp\...\*      dsm.opt
Exclude Backup    *\...\system32\Perflib*.dat    dsm.opt
Exclude Backup    *\pagefile.sys                 dsm.opt
Exclude Backup    *\IO.SYS                       dsm.opt
Exclude Backup    *\IBMDOS.COM                   dsm.opt
Exclude Backup    *\IBMBIO.COM                   dsm.opt
Exclude Backup    *\...\EA DATA. SF              dsm.opt
Exclude Backup    *\microsoft uam volume\...\*.* dsm.opt
Exclude Backup    *\microsoft uam volume\...\*   dsm.opt
Include All       C:\Program Files\DocGenerator\...\* dsm.opt
No DFS include/exclude statements defined.


- when I start the GUI and choose "backup" I see no folders, just the files which are located directly under C:\

- when I choose "restore" every folder is marked with the icon to exclude the directory.

someone can see what I'm doing wrong?

Thanks for help
 
You have done an exclude.dir c:\*.

This excludes all directories on c:\ so basically it won't backup anything.
 
Johansen, to add to what BBB said, exclude.dir statements are evaluated first, regardless of where they are listed.
 
Thanks for the answers but I do not understand as per following statement nearly same exclude is done and this works?

Hello,

If you want just to back up O:\Public folder, but nothing else .you can do this:

INCLUDE "O:\Public folder\...\*"
EXCLUDE.DIR "[a-np-z]:\*"
EXCLUDE.DIR "O:\[a-oq-z]*"

the EXCLUDE.DIR filter is readen als first ... so you don't have to make these filters other the INCLUDE filters.

I hope it can help you.

Cyprien

In this case what should I do so that only C:\program files\docgenerator is being backed up?

Thanks
 
Hi Johansen,

Okay, so as GregE and Cyprien correctly point out, any EXCLUDE.DIR statements are processed first regardless of actual position - therefore, if the candidate matches the EXCLUDE.DIR statement then it won't get backed up, irrespective of any other INCLUDES which may be present.

I'd approach it like this: instead of all of the EXCLUDE.DIR "[a-np-z]:\*" etc, I'd be tempted to skin that cat another way with by simply using the DOMAIN statement to specify which drive *should* get backed up rather than using EXCLUDE.DIR to exclude all of the rest - for example:

DOMAIN C:
EXCLUDE C:\*
EXCLUDE C:\...\*
INCLUDE "C:\Program Files\docgenerator\*"
INCLUDE "C:\Program Files\docgenerator\...\*"

If you're not fussed about other directory entries getting backed up (and as they're simply directory entries and not files, I personally wouldn't lose to much time trying to work around them as there's likely no significant detriment in processing them), then this should ensure that only the file contents of the C:\Program Files\docgenerator\* tree get backed up.

/David McClelland
London, UK
 
One thing to note, there is no ponit to doing the double entries like you have there, ie:

DOMAIN C:
EXCLUDE C:\*
EXCLUDE C:\...\*
INCLUDE "C:\Program Files\docgenerator\*"
INCLUDE "C:\Program Files\docgenerator\...\*"

This can be simplified to:
DOMAIN C:
EXCLUDE C:\...\*
INCLUDE "C:\Program Files\docgenerator\...\*"
 
not excluding

Hi,
On my XP system, everything is getting backed up and I want to limit it to not do system files.
I have set in dsm.opt
DOMAIN C:
EXCLUDE "C:\*"
INCLUDE "C:\...\notes\data\*.id"
INCLUDE "C:\...\notes\data\names.nsf"
INCLUDE "C:\...\notes\data\desktop8.dsk"
INCLUDE "c:\...\notes\data\v11.nsf"
INCLUDE "C:\...\notes\data\user.dic"
INCLUDE "C:\...\notes\data\bookmark.nsf"
INCLUDE "C:\...\dsm.opt"
INCLUDE "C:\...\My Documents\...\*"
INCLUDE "C:\...\Favorites\...\*"
INCLUDE "C:\...\bookmarks.html"
INCLUDE "C:\...\*.ini"
INCLUDE "C:\...\*.ppt"
INCLUDE "C:\...\*.xls"
INCLUDE "C:\...\*.doc"
INCLUDE "C:\...\*.mpp"
EXCLUDE "C:\...\*.gif"
EXCLUDE "C:\...\*.mpg"
EXCLUDE "C:\...\archive\*.html"

When I do "q inclexcl" it returns that the dsm.opt is being picked up, and seems to have a reasonable listing (although I'm not sure where it is all coming from). Details/screenshot are in an attachment.

An excerpt of the log file shows this:
01/03/2011 02:30:10 Normal File--> 146,432 \\ibm-c0f711ed892\c$\WINDOWS\system\winspool.drv [Sent]
01/03/2011 02:30:10 Normal File--> 15,360 \\ibm-c0f711ed892\c$\WINDOWS\TASKMAN.EXE [Sent]
01/03/2011 02:30:12 Normal File--> 94,784 \\ibm-c0f711ed892\c$\WINDOWS\twain.dll [Sent]
01/03/2011 02:30:13 Normal File--> 50,688 \\ibm-c0f711ed892\c$\WINDOWS\twain_32.dll [Sent]
01/03/2011 02:30:13 Normal File--> 49,680 \\ibm-c0f711ed892\c$\WINDOWS\twunk_16.exe [Sent]
01/03/2011 02:30:13 Normal File--> 25,600 \\ibm-c0f711ed892\c$\WINDOWS\twunk_32.exe [Sent]
01/03/2011 02:30:13 Normal File--> 18,944 \\ibm-c0f711ed892\c$\WINDOWS\vmmreg32.dll [Sent]
01/03/2011 02:30:17 Normal File--> 256,192 \\ibm-c0f711ed892\c$\WINDOWS\winhelp.exe [Sent]
01/03/2011 02:30:20 Normal File--> 283,648 \\ibm-c0f711ed892\c$\WINDOWS\winhlp32.exe [Sent]
01/03/2011 02:31:38 Successful incremental backup of 'System and Boot Files'

Any ideas on how I can limit what is being backed-up?
Dan
 

Attachments

  • ScreenShot.gif
    ScreenShot.gif
    34.9 KB · Views: 15
Back
Top