Unsolved
This post is more than 5 years old
1 Rookie
•
12 Posts
0
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!
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!
0 events found
No Events found!


Topher27981
1 Rookie
•
12 Posts
0
October 27th, 2009 12:00
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
dynamox
11 Legend
•
20.4K Posts
•
87.4K Points
0
October 27th, 2009 13:00
Topher27981
1 Rookie
•
12 Posts
0
October 27th, 2009 13:00
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
AranH1
2.2K Posts
1
October 27th, 2009 13:00
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.
Topher27981
1 Rookie
•
12 Posts
0
October 27th, 2009 13:00
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!
AranH1
2.2K Posts
0
October 27th, 2009 13:00
Topher27981
1 Rookie
•
12 Posts
0
October 27th, 2009 13:00
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?
kelleg
6 Operator
•
4.5K Posts
0
October 30th, 2009 08:00
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
DGM3
238 Posts
0
October 30th, 2009 15:00
We will review the segments you've noted, and address any errata there. Thank you for pointing these items out.
Regards,
DGM