Snapshots: Difference between revisions

From UMIACS
Jump to navigation Jump to search
(Added a more functional explanation of why snapshots are important)
No edit summary
 
(34 intermediate revisions by 6 users not shown)
Line 1: Line 1:
Snapshots are a implementation of [http://en.wikipedia.org/wiki/Copy-on-write| copy-on-write] that allows for a file system to quickly take a point-in-time copy of the file system and provide access to the data through a .snapshot directory. Snapshots provide a fast, user-accessible way to recover data that has been accidentally deleted or corrupted within a recent time window -- rather than having to retrieve the data from comparatively slow tape backups. They also help to span the time gap between full backups.
Snapshots are a implementation of [http://en.wikipedia.org/wiki/Copy-on-write copy-on-write] that allows for a file system to quickly take a point-in-time copy of the file system and provide access to the data through a .snapshot directory. Snapshots provide a fast, user-accessible way to recover data that has been accidentally deleted or corrupted within a recent time window, rather than having to retrieve the data from comparatively slow tape backups. They also help to span the time gap between [[NightlyBackups | full backups]].


We provide [[Snapshots]] on our [[ONStor]], [[SnapshotsNexenta | Nexenta]] and [[Snapshots:FluidFS | FluidFS]] filers to certain file systems.
We provide snapshots on our Isilon, ZFS, VAST, and Qumulo filers to certain file systems. If you are ever unsure if a particular volume has snapshots enabled, please contact the [[HelpDesk | Help Desk]].


Please see [[SnapshotFileSystems]] for a list of our file systems that have snapshots in the department.
==Snapshot Retention Policy==
Our core file systems are on a 4 hour snapshot cycle.


==Snapshot Policy==
{| class="wikitable"
 
!Snapshot Name
Our core file systems in the department are on a 4 hour snapshot cycle.  Snapshots are taken at,
!Retention Length
 
!When is it taken?
{| style="color:green; background-color:#ffffcc;" cellpadding="5" cellspacing="0"
|-
| 12am
|'''Hourly'''
| 4am
|24-32 hours
| 8am
|Every day 12am, 4am, 8am, 12pm, 4pm
| 12pm
|-
| 4pm
|'''Daily'''
| 8pm
|2 days
|Every day 8pm or 12am
|-
|'''Weekly'''
|1 week
|Every Saturday 8pm or Sunday 12am
|}
|}


We retain up to 8 hourly snapshots, 2 daily snapshots and 1 weekly snapshot.
In other words, we retain up to either 6 or 8 hourly snapshots, 2 daily snapshots and 1 weekly snapshot. Hourly snapshots may be superseded by daily snapshots, and daily snapshots may be superseded by the weekly snapshot.
 
The [[OpenLAB]] filesystems on which snapshots are available are listed on the [[SnapshotFileSystems]] page.


==Snapshot Restoring==
==Snapshot Restoring==
If you have deleted a file by mistake and you need to get it back, you can use the snapshots directory to recopy the file.  It generally will not be visible, even when viewing hidden directories.


If you have deleted a file by mistake and you need to get it back, you can use the snapshots directory to recopy the file.  This directory can typically be found in your home directory; it will be prepended by a ., so you will need to use the command "ls -a" to find it.  It will be one of three:
'''It will be either''':
* .snapshot for the Isilon, VAST, or Qumulo filers
* .zfs/snapshot for the ZFS filer


* .snapshot for the [[ONStor]] (will be removed soon!) / [[Snapshots:NetApp | NetApp]] filers
The inside of one of these will look something like:
* .snapshots for the [[Snapshots:FluidFS | FluidFS]] filer
* .zfs/snapshots for the [[SnapshotsNexenta | Nexenta]] / [[Snapshots:ZFS | ZFS]] filers


The inside of one of these will look something like:
Isilon filesystem:
<pre>
$ pwd
/nfshomes/username
$ cd .snapshot
$ ls
nfshomes_2024-09-14_00:00  nfshomes_2024-09-16_04:00                         
nfshomes_2024-09-15_00:00  nfshomes_2024-09-16_08:00                         
nfshomes_2024-09-15_16:00  nfshomes_2024-09-16_12:00                         
nfshomes_2024-09-15_20:00  Weekly_nfshomes_2024-09-08_00:00                   
nfshomes_2024-09-16_00:00  Weekly_nfshomes_2024-09-15_00:00
</pre>


[[File:Screenshot-.snapshot_-_bash.png]]
ZFS filesystem:
<pre>
$ pwd
/nmhomes/username
$ cd .zfs/snapshot
$ ls
zfs-auto-snap_daily-2024-09-14-2000  zfs-auto-snap_hourly-2024-09-16-0000   
zfs-auto-snap_daily-2024-09-15-2000  zfs-auto-snap_hourly-2024-09-16-0400   
zfs-auto-snap_hourly-2024-09-15-0400  zfs-auto-snap_hourly-2024-09-16-0800   
zfs-auto-snap_hourly-2024-09-15-0800  zfs-auto-snap_hourly-2024-09-16-1200   
zfs-auto-snap_hourly-2024-09-15-1200  zfs-auto-snap_weekly-2024-09-14-2000   
zfs-auto-snap_hourly-2024-09-15-1600
</pre>


For an example of file restoration, please see [[Snapshots:Example | this page]].
For an example of file restoration, please see [[Snapshots:Example | this page]].
[[Category:Snapshots]]
__NOTOC__

Latest revision as of 19:50, 16 September 2024

Snapshots are a implementation of copy-on-write that allows for a file system to quickly take a point-in-time copy of the file system and provide access to the data through a .snapshot directory. Snapshots provide a fast, user-accessible way to recover data that has been accidentally deleted or corrupted within a recent time window, rather than having to retrieve the data from comparatively slow tape backups. They also help to span the time gap between full backups.

We provide snapshots on our Isilon, ZFS, VAST, and Qumulo filers to certain file systems. If you are ever unsure if a particular volume has snapshots enabled, please contact the Help Desk.

Snapshot Retention Policy

Our core file systems are on a 4 hour snapshot cycle.

Snapshot Name Retention Length When is it taken?
Hourly 24-32 hours Every day 12am, 4am, 8am, 12pm, 4pm
Daily 2 days Every day 8pm or 12am
Weekly 1 week Every Saturday 8pm or Sunday 12am

In other words, we retain up to either 6 or 8 hourly snapshots, 2 daily snapshots and 1 weekly snapshot. Hourly snapshots may be superseded by daily snapshots, and daily snapshots may be superseded by the weekly snapshot.

Snapshot Restoring

If you have deleted a file by mistake and you need to get it back, you can use the snapshots directory to recopy the file. It generally will not be visible, even when viewing hidden directories.

It will be either:

  • .snapshot for the Isilon, VAST, or Qumulo filers
  • .zfs/snapshot for the ZFS filer

The inside of one of these will look something like:

Isilon filesystem:

$ pwd
/nfshomes/username
$ cd .snapshot
$ ls
nfshomes_2024-09-14_00:00  nfshomes_2024-09-16_04:00                           
nfshomes_2024-09-15_00:00  nfshomes_2024-09-16_08:00                           
nfshomes_2024-09-15_16:00  nfshomes_2024-09-16_12:00                           
nfshomes_2024-09-15_20:00  Weekly_nfshomes_2024-09-08_00:00                    
nfshomes_2024-09-16_00:00  Weekly_nfshomes_2024-09-15_00:00

ZFS filesystem:

$ pwd
/nmhomes/username
$ cd .zfs/snapshot
$ ls
zfs-auto-snap_daily-2024-09-14-2000   zfs-auto-snap_hourly-2024-09-16-0000     
zfs-auto-snap_daily-2024-09-15-2000   zfs-auto-snap_hourly-2024-09-16-0400     
zfs-auto-snap_hourly-2024-09-15-0400  zfs-auto-snap_hourly-2024-09-16-0800     
zfs-auto-snap_hourly-2024-09-15-0800  zfs-auto-snap_hourly-2024-09-16-1200     
zfs-auto-snap_hourly-2024-09-15-1200  zfs-auto-snap_weekly-2024-09-14-2000     
zfs-auto-snap_hourly-2024-09-15-1600

For an example of file restoration, please see this page.