1752440 Members
5966 Online
108788 Solutions
New Discussion юеВ

cliq createsnapshot

 
kornax
Occasional Contributor

cliq createsnapshot

I am using the cliq createsnapshot to run some simple batch files to take snapshots at specific times, when a database is down.

I am particularly having an issue with the Snapshot name parameter. If I give it a name, the next time the task runs, it fails because it is the same snapshot name.

How do I allow it to increment or is there some option to create variable names with the createsnapshot command?
4 REPLIES 4
PCrid
Advisor

Re: cliq createsnapshot

Funnily enough, we're looking at something similar, and I've come to the conclusion that the best way to do this is to programatically. Attached is a perlscript I'm currently working on to do this - the original also uses the vsphere CLI to snap a VM and snapshot the VMFS LUN but I've removed that element for clarity.

The script adds timestamps rather than sequential numbers to the snapshots, which I think is more helpful than simply a sequential numebring, but it could be adapted to get last number and increment I guess.

As I say, its not finished - eventually I plan to have it do cold weeklies as well as hot dailies, get snapshots on the volumes and delete them if there are more than x dailies or y weeklies, but it gives you an idea how we're thinking of working the problem.

Also requires a couple of sql scripts:

beginbackup.sql ---- puts database into hot backup mode

alter database begin backup;
exit;

endbackup.sql ---- exits hot backup mode, archives current logfile before snapping log lun and backs up controlfile to log lun

alter database end backup;
alter system archive log current;
alter database backup controlfile to trace;
alter database backup controlfile to 'e:\cf.bak' reuse;
exit;

Hope this may be of some assistance
PCrid
Advisor

Re: cliq createsnapshot

Incidentally, please excuse the extremely ugly scripting - I'm a hardware/db specialist who occasionally scripts rather than a scripter who knows hardware/dbs is my excuse!
VIN Support
New Member

Re: cliq createsnapshot

I'm trying to use the createsnapshot command also with some success, however I would like to mount the newly created snapshot also. However i dont see how i can assign a server iqn to a newly created snapshot through the cliq interface - any ideas?

Thanks
DungKHoang_1
Visitor

Re: cliq createsnapshot

To mount a snapshot and assign permissions
you can use the CLIQ command assignvolume with the parameter initiator= and provide IQN of server
Hope that helps!
/Dung