Save DRPLANFILE to an offsite location

a_radman

ADSM.ORG Member
Joined
Jun 21, 2007
Messages
9
Reaction score
0
Points
0
can anyone help please, I am trying to save the drplanfile to another (none tivoli) server via a mapped drive but it doesn't work (won't open). Is there any way to get this file saved elsewhere other than on the local tivoli server? Any suggestions gratefully accepted.
Andrea
 
Why don't you just copy it over to the remote server via a cron (UNIX), or at (Windows) job?

This is what I do.
 
i have tried to use windows scheduler and a batch file to copy the data to an offsite server - which is on another domain so when using the mapped drive i need to use a different account/password. Problem is that it doesn't always work so I can't rely on it. How would you suggest setting this up?
Also at present the tivoli servers we have are on different domains and are not crossdefined so can't use virtual volumes as far as i am aware? which is, I assume, how you are saving your plans to another tivoli server - or is there another way to do this??
 
If the target Windows server is on another Domain and the source does not have trusts setup, you can use the "net use" (for more info: enter "net help use" from a DOS window, of course) command to map a drive first before the copy command. Be aware that the user ID and password will be hard coded.
 
I know this is an old post, but I recently developed a simple batch file to send out the DRPlan file.
I use a batch file (contents are below) to look for the most recent DRPlan file that TSM creates, and email it out to an external email address. I use GMAIL, but it could be anything.

The batch file creates a temporary file, appends the email header information, and then looks for the most recent file in the DRPlans folder. It then appends the contents of the DRMPlan file to the header information generated earlier in the batch file and moves the file to a server running IIS, into the inetpub\mailroot\pickup folder. If the TSM server is running IIS and SMTP, simply move the file to it's inetpub\mailroot\pickup folder. Once a file hits that folder, it is sent out immediately.
I set a scheduled task to email it out after the DRM schedule is run.

Here is the batch file. Comments throughout.
Code:
@echo off & setlocal
:: set the temp file location
set tempmail=%temp%\tempmail.%random%.txt
 
setlocal ENABLEDELAYEDEXPANSION
set file=D
:: Set this folder to the folder that DRM uses for the DRPlans
set folder=T:\TSMPlans
:: create a temp file 
:: echo the basic headers to the temp file
echo To: "TSM Admin" ^<[EMAIL="[email protected]"][email protected][/EMAIL]^> > %tempmail%
echo From: "TSM Disaster Plan" ^<[EMAIL="[email protected]"][email protected][/EMAIL]^> >> %tempmail%
echo Subject: TSM Disaster Recovery File >> %tempmail%
:: echo the blank line that separates the header from the body text 
echo.>>%tempmail%
:: echo the body text to the temp file
:: This looks in the folder path for the most recent DRPLan file
for /f "Tokens=*" %%a in ('dir "%folder%\DRPlan.*.*" /b /O-D') do if "!file!" EQU "D" set file=%%a
:: append the headers with the DRPlan file
copy %tempmail% + "%folder%\!file!" %tempmail%
 
:: move the temp file to the mail pickup directory
:: adjust this location for your system
:: If TSM Server is running IIS With SMTP, simply use the local inetpub folder
net use y: [URL="file://\\servername\c$"]\\servername\c$[/URL] password /user:administrator
move %tempmail% y:\inetpub\mailroot\pickup
net use y: /delete
set tempmail=
endlocal

Hope this helps someone.
Kantwin
 
If drive mapping don't work, your problem is most likely that System, the account TSM runs as by default, by default cannot access shares on the network. You need to allow NullSessionShares on the target share and host for that. Google will probably find you something useful; I couldn't offhand tell you exactly how to do it. You don't need a drive mapping BTW, I have tested with UNCs and that worked. Drive mappings are only defined in the context of the user that made them anyway, and it's inconvenient to set up drivemappings for the System account.

FWIW, I have a command file that calls blat on the server, which I start as a command admin schedule. GMail as a recipient works for me (it took setting up an Exchange contact for that). You could just schedule it, but I made it so that the mail would be sent from the same script that does our housekeeping.
 
Back
Top