dirmc with exclude.fs?

TeamTLR

ADSM.ORG Member
Joined
Feb 1, 2017
Messages
24
Reaction score
0
Points
0
PREDATAR Control23

Hi All!

I want to verify and make certain my DB2 filesystems are getting backed up. We are not using a dirmc mgmt class today, but my cloptset looks like this: INCLEXCL 1 No exclude.fs "/db2"

INCLEXCL 7 No exclude.fs "/db2mirrorlogs"

INCLEXCL 8 No exclude.fs "/db2logs"

INCLEXCL 9 No exclude.fs "/db2data4" INCLEXCL 10 No exclude.fs "/db2data3" INCLEXCL 11 No exclude.fs "/db2data2" INCLEXCL 12 No exclude.fs "/db2data1" INCLEXCL 13 No exclude.dir "/var/vio/VMLibrary" INCLEXCL 14 No exclude.dir "/proc" INCLEXCL 15 No exclude.dir "/var/adm/ras/livedump" INCLEXCL 16 No exclude "/... /dsmerror.log" INCLEXCL 17 No exclude "/... /dsmsched.log" INCLEXCL 18 No exclude "/... /core" INCLEXCL 19 No exclude "/unix" INCLEXCL 20 No domain all- local "/tmp" INCLEXCL 21 No exclude.fs "/db2/.../sapdata[0-9]" INCLEXCL 22 No exclude.fs "/db2evtmon" INCLEXCL 23 No exclude.fs "/db2/.../logfailarch" INCLEXCL 24 No exclude.fs "/db2/.../logoverflow" INCLEXCL 25 No exclude.fs "/db2/.../logdir" INCLEXCL 26 No exclude.fs "/db2/.../logdir2" INCLEXCL 27 No exclude.fs "/db2/.../db2dump" INCLEXCL 28 No exclude.fs "/db2data[0-9]" INCLEXCL 29 No exclude.fs "/db2diag" INCLEXCL 30 No exclude.fs "/db2data/.../" INCLEXCL 31 No exclude.fs "/db2logs-mirror" INCLEXCL 32 No exclude.fs "/db2/instgis/gis[a-z]* INCLEXCL 36 No exclude.fs "/db2data0[0-9]* INCLEXCL 37 No exclude.fs "/db2/.../sapdata0[0-9]*" INCLEXCL 38 No exclude.fs "/db2/.../log_dir2" INCLEXCL 39 No exclude.fs "/db2/.../log_dir" INCLEXCL 40 No exclude.fs "/db2/db2bid" INCLEXCL 41 No exclude.dir /var/vio/SSP ==
The exlcude.fs entries are intentional for the OS backups per client however I still need TSM to backup the directories and the subdirs below /db2data for example. If I set up a dirmc will TSM perform this backup of dirs/subdirs w/out the files? How do I tell the client to still use its default mgmtclass, but also use the dirmc? I tested a restore and TSM did not restore any /db2/* subdirs. Thank you!

tsm> def clientopt aix dirmc directory
tsm> def mgmtclass r2domaixvtl r2polaixvtl dirmgmtcl migdestination=SPACEMGPOOL
tsm> validate policyset r2domaixvtl r2polaixvtl
On a client I have in its dsm.sys file
include /.../*dirmc
restarted client dsmcad
dsmc q inclexcl

ANS1128S The management class assigned to directories does not exist. .
 
PREDATAR Control23

f I set up a dirmc will TSM perform this backup of dirs/subdirs w/out the files?
  1. DIRMC is only used to specify which management class to bind to directories to if you want to override the default. By default directories are bound the the management class with the longest retention (retextra).
  2. Your include/exclude will determine which files will be backed up or not (all directories backed up even if files in it are excluded)
  3. Exclude.dir if you want to completely exclude a directory including subdirectories (note that it's explicit, can't overwrite it with an include).
  4. Subdir yes to process all subdirectories, but it's by default of the the schedule is "action=incremental" and object is null.
 
PREDATAR Control23

OK thank you but I dont see it working as expected. I did not follow your #4 point. Yes it is incr, but object null???

ls -al /db2evtmon
total 24
drwxr-xr-x 4 root system 256 Feb 01 13:10 .
drwxr-xr-x 41 root system 8192 Jul 18 2016 ..
-rw-r--r-- 1 root system 23 Feb 01 13:09 file1
drwxr-xr-x 2 root system 256 May 18 2016 lost+found
drwxr-xr-x 2 root system 256 Feb 01 13:10 testdir

# dsmc res /db2evtmon/ /tmp/restore/ -subdir=yes
IBM Tivoli Storage Manager
Command Line Backup-Archive Client Interface
Client Version 7, Release 1, Level 1.0
Client date/time: 02/15/17 13:45:45
(c) Copyright by IBM Corporation and other(s) 1990, 2014. All Rights Reserved.

Node Name: xxxxxx
Session established with server xxxxxx: AIX
Server Version 7, Release 1, Level 3.0
Data compression forced off by the server
Server date/time: 02/15/17 13:45:45 Last access: 02/15/17 13:45:36

Restore function invoked.

ANS1247I Waiting for files from the server...
Restoring 256 /db2evtmon/lost+found --> /tmp/restore/lost+found [Done]
< 0 B> [ - ]
Restore processing finished.

Total number of objects restored: 1
Total number of objects failed: 0
Total number of bytes transferred: 0 B
Data transfer time: 0.00 sec
Network data transfer rate: 0.00 KB/sec
Aggregate data transfer rate: 0.00 KB/sec
Elapsed processing time: 00:00:05

[root@xxxxxx] /tmp/restore
# ls -la
total 32
drwxr-xr-x 3 root system 256 Jan 31 10:35 .
drwxrwxrwt 23 bin bin 16384 Feb 15 13:45 ..
drwxr-xr-x 2 root system 256 May 18 2016 lost+found
 
PREDATAR Control23

OK thank you but I dont see it working as expected. I did not follow your #4 point. Yes it is incr, but object null???
I am talking at backup time.
q sched {domain_name} {sched_name} f=d
If Object is null, or empty. That's the same as doing "dsmc inc". So -=su=yes is implied. If object has a directory or filesystem name, that's like "dsmc inc /path/*" and -su=no is implied.

To be sure, you can add this in the option file:
subdir yes
 
PREDATAR Control23

I did add that to the client opt file, restarted client daemon, retried restore and TSM is only restoring the lost n found subdir.

tsm: R2TSM01>q sched R2DOMAIXVTL AIX-INC-DAILY-2030 f=d

Policy Domain Name: R2DOMAIXVTL
Schedule Name: AIX-INC-DAILY-2030
Description: AIX files incremental backup daily at 20:30
Action: Incremental
Subaction:
Options:
Objects:
Priority: 5
Start Date/Time: 12/11/2014 20:30:00
Duration: 6 Hour(s)
Maximum Run Time (Minutes): 0
Schedule Style: Classic
Period: 1 Day(s)
Day of Week: Any
Month:
Day of Month:
Week of Month:
Expiration:
Last Update by (administrator): SERVER_CONSOLE
Last Update Date/Time: 12/11/2014 14:40:21
Managing profile:

# cat /usr/tivoli/tsm/client/ba/bin64/dsmerror.log
02/15/17 14:29:47 ANS1115W File '/var/adm/ras/livedump' excluded by Include/Exclude list
[root@xxxx /tmp/restore

cat dsm.opt
SE sapxxxx
subdir yes

I just ran a dsmc i
then
dsmc res /db2evtmon/ /tmp/restore/ -subdir=yes

server inclexcl: INCLEXCL 22 No exclude.fs "/db2evtmon"

Note there is enough space in /tmp.
 
PREDATAR Control23

Did you look at the output of dsmc inc to see what was backed up?

You can preview a backup too:
dsmc preview backup /db2evtmon/* -su=yes

Look at the output file after, it will show you each file and if they are included or excluded.

server inclexcl: INCLEXCL 22 No exclude.fs "/db2evtmon"
The filesystem is excluded.
 
PREDATAR Control23

ok so how do I include ONLY the directory structures for backup and not the data because we use DB2'2 TSM API for the actual data?
 
PREDATAR Control23

# cat /usr/tivoli/tsm/client/ba/bin64/dsmprev.txt
Preview generated on 02/15/17 15:35:31.
Name: Size: Type: Status: Pattern: Source: Mgmt Class:
/db2evtmon/file1 23 B - Included - - DEFAULT
/db2evtmon/lost+found/file1 0 B - Excluded - - -
/db2evtmon/testdir/file1 0 B - Excluded - - -
/db2evtmon/testdir/testdir2/file2 0 B - Excluded - - -
/db2evtmon/lost+found 256 B Directory Included - - R2MCAIXVTL
/db2evtmon/lost+found/lost+found 0 B - Excluded - - -
/db2evtmon/testdir/lost+found 0 B - Excluded - - -
/db2evtmon/testdir/testdir2/lost+found 0 B - Excluded - - -
/db2evtmon/testdir 256 B Directory Included - - R2MCAIXVTL
/db2evtmon/lost+found/testdir 0 B - Excluded - - -
/db2evtmon/testdir/testdir 0 B - Excluded - - -
/db2evtmon/testdir/testdir2/testdir 0 B - Excluded - - -
 
PREDATAR Control23

1. remove the exclude.fs so that the filesystem is processed
2. exclude all the files in that directory with an exclude (exclude only exclude files, exclude.dir directories+files).
 
PREDATAR Control23

well what if there are many files with different names. I'll work through it, not a big deal.
 
PREDATAR Control23

well what if there are many files with different names.
If you exclude all files, you use wildcards not every file.. Example:
exclude /path/.../* {this doesn't exclude directories, just all files in all directories under /path/}
 
PREDATAR Control23

right, but I need to goto almost every server to make sure I get the correct pattern.
 
PREDATAR Control23

right, but I need to goto almost every server to make sure I get the correct pattern.
Unfortunately, if the pattern is not the same, you have to hand-edit all of the dsm.opt file for all nodes.

If the pattern is the same, you can write a script that appends the modifying line to the dsm.opt, save the file, and restart the TSM services for the change to take effect.
 
PREDATAR Control23

The original exclude.fs was in a client option set, you can just edit that one and replace:
INCLEXCL 22 No exclude.fs "/db2evtmon"

With:
INCLEXCL 22 No exclude "/db2evtmon/.../*"

This will backup the directory tree under /db2evtmon, but not files.
 
PREDATAR Control23

ok cool Ill use that. Want to get this right or at least better than it has been. Is this server based inclexcl exclude "*.TBL" or exclude "db2*.log" the same as exclude "/.../*.TBL" or exclude "/.../db2*.log" ?
 
Top