Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to delete a snapshot without confirmation from Command Line?
2016-09-23
09:37 AM
23,633 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
Solved! See The Solution
1 ACCEPTED SOLUTION
zimmerm has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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"
zimmerm has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It worked..Thanks.
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
