Difference between revisions of "Snapshots"

From UMIACS
Jump to navigation Jump to search
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 full backups.
  
We provide [[Snapshots]] on our [[SnapshotsNexenta | Nexenta]] and [[Snapshots:FluidFS | FluidFS]] filers to certain file systems. If you are ever unsure if a particular volume has Snapshots enabled, please contact the [[HelpDesk | Help Desk]].
+
We provide [[Snapshots]] on our ZFS and [[Snapshots:FluidFS | FluidFS]] filers to certain file systems. If you are ever unsure if a particular volume has Snapshots enabled, please contact the [[HelpDesk | Help Desk]].
  
 
==Snapshot Policy==
 
==Snapshot Policy==
Line 20: Line 20:
 
==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. 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 either:
+
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 either''':
  
 
* .snapshots for the [[Snapshots:FluidFS | FluidFS]] filer
 
* .snapshots for the [[Snapshots:FluidFS | FluidFS]] filer
* .zfs/snapshots for the [[SnapshotsNexenta | Nexenta]] / [[Snapshots:ZFS | ZFS]] filers
+
* .zfs/snapshot for the ZFS filer
 
 
The inside of one of these will look something like:
 
  
[[File:Screen shot.png]]
+
The inside of one of these will look something like this on a FluidFS filesystem:
 +
<pre>
 +
sattwood@zaphod:~$ pwd
 +
/nfshomes/sattwood
 +
sattwood@zaphod:~$ cd .snapshots
 +
sattwood@zaphod:~/.snapshots$ ls
 +
daily_2018_06_13__00_00  hourly_2018_06_14__04_00  hourly_2018_06_14__16_00  hourly_2018_06_15__08_00
 +
daily_2018_06_14__00_00  hourly_2018_06_14__08_00  hourly_2018_06_14__20_00  hourly_2018_06_15__12_00
 +
daily_2018_06_15__00_00  hourly_2018_06_14__12_00  hourly_2018_06_15__04_00  weekly_2018_06_09__00_00
 +
</pre>
 +
Or this, on a ZFS filesystem:
 +
<pre>
 +
sattwood@swirl:~$ pwd
 +
/nmhomes/sattwood
 +
sattwood@swirl:~$ cd .zfs/snapshot
 +
sattwood@swirl:~/.zfs/snapshot$ ls
 +
zfs-auto-snap_daily-2018-06-13-01h00  zfs-auto-snap_hourly-2018-05-28-00h00
 +
zfs-auto-snap_daily-2018-06-14-01h00  zfs-auto-snap_hourly-2018-05-29-00h00
 +
zfs-auto-snap_daily-2018-06-15-01h00  zfs-auto-snap_hourly-2018-06-03-16h00
 +
zfs-auto-snap_hourly-2018-05-24-00h00  zfs-auto-snap_hourly-2018-06-10-08h00
 +
zfs-auto-snap_hourly-2018-05-25-00h00  zfs-auto-snap_hourly-2018-06-15-12h00
 +
zfs-auto-snap_hourly-2018-05-26-00h00  zfs-auto-snap_weekly-2018-06-09-03h00
 +
</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]].

Revision as of 18:08, 15 June 2018

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 ZFS and FluidFS filers to certain file systems. If you are ever unsure if a particular volume has Snapshots enabled, please contact the Help Desk.

Snapshot Policy

Our core file systems in the department are on a 4 hour snapshot cycle. Snapshots are taken at,

12am 4am 8am 12pm 4pm 8pm

We retain up to 8 hourly snapshots, 2 daily snapshots and 1 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.

This directory can typically be found in your home directory. It will be either:

  • .snapshots for the FluidFS filer
  • .zfs/snapshot for the ZFS filer

The inside of one of these will look something like this on a FluidFS filesystem:

sattwood@zaphod:~$ pwd
/nfshomes/sattwood
sattwood@zaphod:~$ cd .snapshots
sattwood@zaphod:~/.snapshots$ ls
daily_2018_06_13__00_00  hourly_2018_06_14__04_00  hourly_2018_06_14__16_00  hourly_2018_06_15__08_00
daily_2018_06_14__00_00  hourly_2018_06_14__08_00  hourly_2018_06_14__20_00  hourly_2018_06_15__12_00
daily_2018_06_15__00_00  hourly_2018_06_14__12_00  hourly_2018_06_15__04_00  weekly_2018_06_09__00_00

Or this, on a ZFS filesystem:

sattwood@swirl:~$ pwd
/nmhomes/sattwood
sattwood@swirl:~$ cd .zfs/snapshot
sattwood@swirl:~/.zfs/snapshot$ ls
zfs-auto-snap_daily-2018-06-13-01h00   zfs-auto-snap_hourly-2018-05-28-00h00
zfs-auto-snap_daily-2018-06-14-01h00   zfs-auto-snap_hourly-2018-05-29-00h00
zfs-auto-snap_daily-2018-06-15-01h00   zfs-auto-snap_hourly-2018-06-03-16h00
zfs-auto-snap_hourly-2018-05-24-00h00  zfs-auto-snap_hourly-2018-06-10-08h00
zfs-auto-snap_hourly-2018-05-25-00h00  zfs-auto-snap_hourly-2018-06-15-12h00
zfs-auto-snap_hourly-2018-05-26-00h00  zfs-auto-snap_weekly-2018-06-09-03h00

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