Subscribe
Accepted Solution

How to delete a snapshot without confirmation from Command Line?

Just not getting this.....

 

How do I delete groups of snapshots without confirmation in Ontap v8.3   ???

 

partial script is:

ssh@filer snapshot delete -vserver xxx -volume yyy -snapshot zzz

 

where ZZZ is a string feed list

and ZZZ keeps asking me for confirmation.

 

 

Thanks!

Re: How to delete a snapshot without confirmation from Command Line?

I'm not entirely sure if you need diag mode, but a

 

set diag and then your command with -force true should work

 

so, something like this:

 

"set diag; snapshot delete -vserver xxx -volume yyy -snapshot zzz -force true"

Re: How to delete a snapshot without confirmation from Command Line?

You can set the confirmations to off and this will not prompt for any confirmation, you can do it by using the command set and press tab you will get an option for confirmation and you can turn it to off

Re: How to delete a snapshot without confirmation from Command Line?

[ Edited ]

How do you set the "-confirmations off" permanently for snapshot deletes....?

 

The    command set TAB     works but only for that active ssh session

 

snap

snapshot>

snapshot><CR>

 

Confirmation Messages:  on

 

snapshot> set ?

snapshot> set -privilege admin -confirmation off

snapshot><CR>

 

Confirmation Messages:  off

 

this works as long as the SSH session is still open, when you logout and log back in, the -confirmation is set to "on" again.

 

 

If I'm running a script from Solaris and SSHing every hour to check for "current" snapshots that got created by an application, which under some key trigger I do not want,

then I want to delete that snapshot within the script, without the confirmation.