Unsolved

This post is more than 5 years old

1 Rookie

 • 

12 Posts

1493

October 27th, 2009 10:00

CLI - Add Snapshot to Storage Group

Hi all, I'm having a bit of a problem adding a snapshot to a storage group from the CLI and was hoping someone could help. I'm using naviseccli and passing credentials at the time of issuing the command. Here's the command I'm trying to run: (names and IP have been changed to protect the innocent)

naviseccli.exe -user administrator -password sample -scope 0 -h 10.10.10.100 snapview -storagegroup -addsnapshot -gname SG_SERVERNAME -snapshotname SERVERNAME_SNAPSHOT_D

I'm running it from a PowerShell console on a secondary host and the command "appears" to be successful, at least it doesn't return any errors. However, it's not adding the snapshot to the storage group. I can add it manually from the GUI without any problems, but the CLI just doesn't seem to be working as I would expect it to.

Other commands I've issues using naviseccli are working fine (ie: creating snapshot and session), I just can't see to get it to show up in the storage group so I can active it.

Anybody see any errors in my command line syntax? I really need it to work from CLI because I'm writing a series of scripts for snapping, and unsnapping for Disaster recovery tests.

Another thing to note, I'm not snapping a LUN per se. Actually, I'm trying to snap a secondary image that is part of a MirrorView/A mirror. I've been told that this CAN be done.

Any help would be greatly appreciated!

1 Rookie

 • 

12 Posts

October 27th, 2009 12:00

Well, I resolved my own problem. Turns out it WAS a syntax error on the command. For anyone experiencing this issue, the correct syntax is the following:

naviseccli.exe -user administrator -password -scope 0 -h storagegroup -addsnapshot -gname -snapshotname

IMPORTANT FYI: I see a lot of people on these forums making reference to the SnapView Snapshots and SnapSessions Knowledgebook. It was this exact same document that I got the incorrect syntax for this command. The typo is on page 10 of this document.

So, do I get 10 points for answering my own question? LOL

11 Legend

 • 

20.4K Posts

 • 

87.4K Points

October 27th, 2009 13:00

i believe the only restriction with security file is that you can not move it to another system, you have to generate a new one on that particular system.

1 Rookie

 • 

12 Posts

October 27th, 2009 13:00

Found another problem in the knowledgebook.
On page 14 it lists the naviseccli command for activating a snapshot as the following:

naviseccli -h snapview -activatesnapshot Exchange_DB_Monday

However, it leaves off the following required parameter:

-snapshotname

So... the knowledgebook SHOULD read as the following instead:

naviseccli -h snapview -activatesnapshot Exchange_DB_Monday -snapshotname ExchangeDB_Data

2.2K Posts

October 27th, 2009 13:00

Yes it is created in the local user profile of the logged on user. But you can create the security file and place it in a commonly accessible location. There is a switch in the cli where you specify the file to use.

So you can either create the file in the default location for each user logon, create a common file that is referenced in scripts, or (if automating scripts using a scheduler) use a service account for the scheduling of the scripts and create the file for the service account.

1 Rookie

 • 

12 Posts

October 27th, 2009 13:00


security file for the service account that runs the scripts


Nevermind, that just answered my question. I didn't catch the "service account" statement you mentioned. I guess if we all logged into the server as that service account, there wouldn't be a problem. Or if we fire them off from a scheduled task.

Thanks!

2.2K Posts

October 27th, 2009 13:00

Hey, good catch. Glad you got it resolved. I have some automated scripts for snashot creation and deletion and I find that it is easier if I create a security file for the service account that runs the scripts. That way I don't have to specify the username and password in clear in the script file for anyone to find.

1 Rookie

 • 

12 Posts

October 27th, 2009 13:00


I find that it is easier if I create a security file for the service account that runs the scripts


Yeah, I was going to do that, but it was my understanding that the security file gets created within my windows profile. Is that correct?

My concern with this is that during our company DR testing, anyone on my team might be using these scripts. Wont each of us have to log on and create the security file on all of our DR servers prior to our DR test?

6 Operator

 • 

4.5K Posts

October 30th, 2009 08:00

The White papers and Knowledgebooks are good reference, but for the last word on commands and syntax you should always check in the specific CLI manual. See page 104 in the "EMC SnapView Command Line Interface (CLI) Reference"

SYNTAX
snapview-activatesnapshotsessionname-snapshotiduid or snapview-activatesnapshotsession
name-snapshotnamename

OPTIONS
-activatesnapshot sessionname

Specifies session name (that you assigned when the session was started with
-startsession).

-snapshotid uid

Specifies the 32-byte unique ID of the snapshot (assigned by the system when the copy
was created with -createsnapshot).

-snapshotname name

Specifies the name of the snapshot (that you optionally assigned when the copy was
created with -createsnapshot).

glen

238 Posts

October 30th, 2009 15:00

Topher2798,
We will review the segments you've noted, and address any errata there. Thank you for pointing these items out.

Regards,
DGM

0 events found

No Events found!

Top