Question : Problem: scripting snapshots via admsnap on windows.

I am having problems scripting snapshots remotely.

Using admsnap and our Clarion AX150i on 2003 servers, I am trying to flush and then start a snapshot on the source and then activate it on the target machine, all from the target machine. I was hoping to add this as a pre backup command.

I have a perl script running on the target machine which runs the admsnap command from the c$ share:

$ADMCOMMAND = "\"\\\\appserv1\\c\$\\Program files\\EMC\\Navisphere admsnap\\admsnap.exe\" flush -o F:";
$status = system("$ADMCOMMAND");
if ($status != 0) {
      Log_message ("\n$DATE - $TIME - Flush Command: FAILED, error code: $status");
      exit;
}
      else {
            ("\n$DATE - $TIME - Flush Command: succesful");
            $ADMCOMMAND = "\"\\\\appserv1\\c\$\\Program files\\EMC\\Navisphere admsnap\\admsnap.exe\" start -s session1 -o f:";
            $status = system("$ADMCOMMAND");
Log_message ("\n$DATE - $TIME - Start Command: $status");
}

It flushes the cache fine, but when it tries to start the session, I get the error:

Attempting to start session1 on device \\.\PhysicalDrive2.
Attempting to start the session on the entire LUN.
An error occured while starting session "session1" on device "\\.\PhysicalDrive2".
Error: 0x3E050013 (This device is not a snapshot or associated with a snapshot within snapview)

Now, if I run the exact same command on the source server it works fine which is what I expected.

I then tried to add the admsnap commands to a batch file and run them on the source machine but from the target machine and again, no luck.

What do I do? It's going to be tricky if I have to have two scripts, one on each machine which then have to talk to each other to ensure they have completed before running the next stage.

What do you guys do?

thanks.

Answer : Problem: scripting snapshots via admsnap on windows.

Not sure, but if two scripts are required, then use a shared drive to store token files for each stage, ad the scripts will check when the token shows and start the next step.

Remember to delete the tokens or rename them if you want a history of what happened.

I hope this helps !
Random Solutions  
 
programming4us programming4us