Solved

Automate backup of NFS mounted filesystems in TSM

Posted on 2010-11-12
12
3,930 Views
Last Modified: 2013-11-14
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
Comment
Question by:virgo0880
  • 6
  • 6
12 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 34127941
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
 

Author Comment

by:virgo0880
ID: 34128654
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
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 34128860
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
 

Author Comment

by:virgo0880
ID: 34176621
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
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 34177126
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
 

Author Comment

by:virgo0880
ID: 34192588
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 68

Expert Comment

by:woolmilkporc
ID: 34192613
No special syntax for NFS.
inclexcl is the right place.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 34194979
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
 

Author Comment

by:virgo0880
ID: 34198840
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
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 34203324
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
 

Author Comment

by:virgo0880
ID: 34206352
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
 

Author Closing Comment

by:virgo0880
ID: 34268338
OK
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

How to fix error ""Failed to validate the vCentre certificate. Either install or verify the certificate by using the vSphere Data Protection Configuration utility" when you are trying to connect to VDP instance from Vcenter.
Are you looking to recover an email message or a contact you just deleted mistakenly? Or you are searching for a contact that you erased from your MS Outlook ‘Contacts’ folder and now realized that it was important.
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now