Avatar of virgo0880
virgo0880 asked on

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
Storage SoftwareStorage

Avatar of undefined
Last Comment
virgo0880

8/22/2022 - Mon
woolmilkporc

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


ASKER
virgo0880

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
ASKER CERTIFIED SOLUTION
woolmilkporc

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
virgo0880

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
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
woolmilkporc

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



ASKER
virgo0880

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
woolmilkporc

No special syntax for NFS.
inclexcl is the right place.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
woolmilkporc

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!

ASKER
virgo0880

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
woolmilkporc

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.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
ASKER
virgo0880

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
ASKER
virgo0880

OK