cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Cloud



Etc


Reference














.

Action disabled: source
hardware:7mode:snapshot.html



NetApp Data ONTAP 7-Mode CLI Commands [Old Device]

Netapp :: Snapshot

Note

  • Snapshot is free.


Commmands

Operation Command Complement
df
snap reserve VOLUMENAME
snap reserve VOLUMENAME PERCENT
snap reserve VOLUMENAME 20 ← 20%
snap reserve VOLUMENAME 0 ← not use snapshot
snap create VOLUMENAME SNAPSHOT
snap create pocvol snap1
snap list VOLUMENAME
snap list pocvol
snap delete VOLUMENAME SNAPSHOTNAME
snap delete pocvol nightly.1
snap delete VOLUMENAME SNAPSHOTNAME
snap delete pocvol nightly.1
snap delete -a -f VOLUMENAME
snap delete -a -f pocvol
snap sched pocvol
snap sched pocvol 0 0 0
snap sched pocvol 0 2 6@8,12,16,20

Backup

snap create VOLUME_NAME  SNAPSHOT_NAME

Restore

Volume restore using Snapshot

snap  restore -t vol -s SNAPSHOT_NAME  VOLUME_NAME

File Restore using Snapshot

snap restore -t file -s SNAPSHOT_NAME -r /vol/testvol/file.before_snapshot  /vol/testvol/file.before_snapshot


Example

>snap list

  Volume engineering

    %/used       %/total  date          name
  ----------  ----------  ------------  --------
    0% ( 0%)    0% ( 0%)  Nov 14 08:00  hourly.0
   50% (50%)    0% ( 0%)  Nov 14 00:00  nightly.0
   67% (50%)    0% ( 0%)  Nov 13 20:00  hourly.1
   75% (50%)    0% ( 0%)  Nov 13 16:00  hourly.2
   80% (50%)    0% ( 0%)  Nov 13 12:00  hourly.3
   83% (50%)    1% ( 0%)  Nov 13 08:00  hourly.4
   86% (50%)    1% ( 0%)  Nov 13 00:00  nightly.1
   87% (50%)    1% ( 0%)  Nov 12 20:00  hourly.5
>snap list -l

  Volume engineering

  snapshot date               retention date              name
  --------------------------  --------------------------  --------
  Jun 30 21:49:08 2003 -0700  Jun 30 21:49:08 2013 -0700  nightly.0
  Jan 02 01:23:00 2004 -0700  Jan 02 01:23:00 2014 -0700  nightly.1
  Oct 12 18:00:00 2004 -0700  May 05 02:00:00 2010 -0700  nightly.2


Restore

Volume restore using Snapshot

>  snap  restore -t vol -s testsnap testvol

WARNING! This will revert the volume to a previous snapshot.
All modifications to the volume after the snapshot will be
irrevocably lost.

Volume testvol will be made restricted briefly before coming back online.

Are you sure you want to do this? yes

You have selected volume testvol, snapshot testsnap

Proceed with revert? yes
Volume testvol: revert successful.

File Restore using Snapshot

>  snap restore -t file -s testsnap -r /vol/testvol/file.before_snapshot  /vol/testvol/file.before_snapshot

 WARNING! This will restore a file from a snapshot into the active
 filesystem.  If the file already exists in the active filesystem,
 it will be overwritten with the contents from the snapshot.

 Are you sure you want to do this? yes

 You have selected file /vol/testvol/file.before_snapshot, snapshot testsnap
 It will be restored as /vol/testvol/file.before_snapshot

 Proceed with restore? yes



hardware/7mode/snapshot.html.txt · Last modified: 2016/09/18 by admin

Page Tools