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.
See The Solution
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"
View solution in original post
How do you set the "-confirmations off" permanently for snapshot deletes....?
The command set TAB works but only for that active ssh session
Confirmation Messages: on
snapshot> set ?
snapshot> set -privilege admin -confirmation off
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.
First i turned off the confiramation using Admin mode in PRIV..
Next Prepared a script and executed all. It eased my work.
snapshot show -vserver XXXX -volume XXXX -snapshot * -create-time <365d -fields create-time,size -is-7-mode true