Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4918
  • Last Modified:

Automate backup of NFS mounted filesystems in TSM

Hi all,

I want to automate the backup of NFS mounts using TSM. The scenario is there are 5-6 filesystems on which we are copying systems data which are netapp volumes mounted as NFS on the systems using autofs. Now is there a way in TSM where i can automate this thing. It shud work like when i need to take backup, it should automount the mounts , take the backup & once the backup is complete, unmont the NFS mounts. How can i achieve this.

Thanks
virgo
0
virgo0880
Asked:
virgo0880
  • 6
  • 6
1 Solution
 
woolmilkporcCommented:
Hi again,

this should work just straightforward.

OK, TSM does not back up NFS filesystems by default, but it does back them up when explicitly instructed to do so either by an INCREMENTAL statement:

dsmc INCREMENTAL /path/to/nfsmount1 /path/to/nfsmount2 ...

or by the DOMAIN statement in dsm.sys:

DOMAIN ALL-LOCAL /path/to nfsmount1 /path/to/nfsmount2 ...

autofs will mount the shares at the moment dsmc tries to access them.

If you don't want to modify dsm.sys but want to work with schedules nonetheless you'll have to specify "INCREMENTAL" in the ACTIONS field and " /path/to nfsmount1 /path/to/nfsmount2 ..."
in the OBJECTS field of one or several  separate schedules specifically created for those NFS mounts.

If you suspect that dsmc will not wait long enough until autofs has done its job you could add as a PRESCHEDULECMD which aceesses the filesystems such as e.g. "ls -l  /path/to nfsmount1/* /path/to/nfsmount2/* ... >/dev/null"

Dismounting will also be done by autofs when the timeout has been reached, which is by default 300 seconds.

If you decide to dismount the shares explicitily add as a POSTSCHEDULECMD "umount /path/to nfsmount1 /path/to/nfsmount2 ..."

wmp


0
 
virgo0880Author Commented:
So you mean to say that we can create a schedule or add to the existing schedule this mountpoints right...how can we add it to already created schedule, whether a script is required for that. can you give me the steps for adding it to the already created schedule. According to you, which will be the best option dsm.sys or schedule.

Thanks
virgo0880
0
 
woolmilkporcCommented:
Hi,

if your TSM client version is newer than 5.3 (which I assume) there is a better way to back up autofs: the DOMAIN ALL-AUTO-NFS option.

1) Setting DOMAIN in dsm.sys is the best option if you plan to back up all your NFS automounts with each and every INCREMENTAL run (The INCREMENTAL command when issued without parameters backs up the whole domain).

In this case you don't need to change anything except for the DOMAIN entry in dsm.sys (Don't forget to restart the client scheduler process "dsmc sched" when done).
Change your existing DOMAIN statement in dsm.sys (or add one if there is none) like
DOMAIN ALL-LOCAL ALL-AUTO-NFS

2) If you plan to back up the NFS volumes more often or less frequently than your domain and if you don't want to back up all of them in one run you should create separate schedules including only the desired NFS volumes in the OBJECTS field and INCREMENTAL (which is the default) in the ACTION field, and "-subdir=yes" in the OPTIONS field.

DEF SCHED domainname schedname T=C OBJECTS='"/path/to/nfsmount1/*" "/path/to/nfsmount2/*"' OPTIONS='-subdir=yes' ACTION='INCREMENTAL' ... ...

3) A third option, leaving the DOMAIN in dsm.sys as is but backing up all autofs nonetheless using an existing schedule would be modifying this existing schedule so that it contains in the OPTIONS field:
 '-domain="all-local all-auto-nfs"'

UPD SCHED domainname schedname T=C OPTIONS='-domain="all-local all-auto-nfs"'

Please don't confuse "domainname" in the define/update schedule statements with the DOMAIN entry in dsm.sys. The two mean quite different things!

wmp
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
virgo0880Author Commented:
Ok, so i have to add following option to my dsm.opt file so that the NFS mounts can be mounted, backed up & unmounted automatically. My doubt is first time when the backup start it will do the full backup  & then for every schedule it will do incremental...right ? so my file look like this, kindly confirm. :

$ cat dsm.opt
************************************************************************
* ADSTAR Distributed Storage Manager                                   *
*                                                                      *
* Sample Client User Options file for AIX and SunOS (dsm.opt.smp)      *
************************************************************************

*  This file contains an option you can use to specify the ADSM
*  server to contact if more than one is defined in your client
*  system options file (dsm.sys).  Copy dsm.opt.smp to dsm.opt.
*  If you enter a server name for the option below, remove the
*  leading asterisk (*).

*  For information about additional options you can set in this file,
*  see the options.doc file in the directory where ADSM was installed.

************************************************************************

* SErvername       A server name defined in the dsm.sys file
Servername tsm
*domain / /usr /var /tmp /home /opt /usr/local /export /opt/tsm_isc /mksysbs /ufsdumps
*nodename snbc109gig
*schedmode      prompted
*inclexcl       /usr/tivoli/tsm/client/ba/bin/inclexcl
*  Tracefile   /tmp/Encrtrace.out
*  traceflags  service
*  tracemax 100
DOMAIN ALL-LOCAL ALL-AUTO-NFS

Thanks
virgo
0
 
woolmilkporcCommented:
Yes, that's correct.

Hint: The DOMAIN statement can also go to dsm.sys.
You should decide whether to work with dsm.sys or dsm.opt, because options present in both files will be "or"ed together, which means both settings will add up.
Example: "DOMAIN / " in dsm.sys and "DOMAIN /usr " in dsm.opt will lead to a final DOMAIN setting of
" / /usr " which might or might not be desired. Check the final settings with "Q OPTIONS" issued from yor client's commandline ("dsmc q opt")

wmp



0
 
virgo0880Author Commented:
ok, one more question, now we have various nfs mounts, if i specify ALL-AUTO-NFS then, it wud start backing up all the nfs mounts which are there in autofs configuration right...? so if i want to exclude some of the mount points, can i add that fs/folder to inclexcl file. Also, is there any seperate syntax to exclude nfs mounts >>>?

virgo
0
 
woolmilkporcCommented:
No special syntax for NFS.
inclexcl is the right place.
0
 
woolmilkporcCommented:
You could also try

DOMAIN ALL-LOCAL ALL-AUTO-NFS -/excluded/nfs/mountpoint1 -/excluded/nfs/mountpoint2 ...

Note the minus ( - ) signs! Works only with filesystems/mountpoints, not with simple subdirectories!

0
 
virgo0880Author Commented:
So once i put this option, the first run will backup the whole date & then it will do the incremental backup right....? This node is already there in incremental schedule, but when i add this option whether it will do full backup of nfs mounts first time & then incremental....??

thanks
virgo
0
 
woolmilkporcCommented:
Why don't you simply try it?
I fear you will ask me sooner or later  to travel to your company and run the backups for you.

Anyway, if the same node already backed up the files, which must be in the same filesystem of the same type (NFS in this case, not JFS) only incremental will be run.
0
 
virgo0880Author Commented:
That's a good humour....was asking just to confirm that i should not mess anything else, as I have just started digging into tsm.

thanks
virgo
0
 
virgo0880Author Commented:
OK
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now