Difference between revisions of "Snapshots"

From UFRC
Jump to navigation Jump to search
(Created page with "Category:Storage =Purpose= Describe how home area snapshots can be used to recover lost files =Affected Storage= Only data stored in /home/$USERNAME are managed with snaps...")
 
m (Text replacement - "/ufrc" to "/blue")
 
(6 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
Describe how home area snapshots can be used to recover lost files
 
Describe how home area snapshots can be used to recover lost files
 
=Affected Storage=
 
=Affected Storage=
Only data stored in /home/$USERNAME are managed with snapshots. If a file is lost in this filesystem, it can be recovered over the next week. If the file is on a different filesystem, that file cannot be recovered unless backups are being performed for that directory.
+
Only data stored in /home/$USERNAME are managed with snapshots. If a file is lost in this filesystem, it can be recovered from daily intervals over the past week. It can be recovered on a weekly basis for the past 30 days. If the file is on a different filesystem (e.g. /blue or /orange), that file cannot be recovered unless backups are being performed for that directory.
 
=Method=
 
=Method=
 
==Basics==
 
==Basics==
* Change directory to /snapvol/$USERNAME_DAYOFWEEK/$USERNAME
+
* Change directory to /home/$USERNAME/.snapshot where $USERNAME is your username
** $USERNAME is your username
+
* You will see at least seven directories, each with a day of the week in the name. If the current day is Friday, the directory labeled ##_friday_home will be the snapshot from 5:00am today.
** DAYOFWEEK is the day of the week that you want to recover from. This is the written day of the week in lowercase, i.e. wednesday, thursday, etc.
+
* You may also see a couple ##_weekly_home directories. These are taken every Monday morning at 3:00am and kept for 30 days.
* Copy file(s) as needed back to the main home directory.
+
* Change directory to the snapshot you wish to restore from and navigate to your missing file.
 +
* Copy the file(s) as needed back to your main home directory.
 +
 
 +
==Video demo==
 +
Here is a [https://mediasite.video.ufl.edu/Mediasite/Play/ad66a7d32b0a4a6e8c3427b187ee979d1d video demo] of the process of restoring from a snapshot.
 +
 
 
==Example==
 
==Example==
* Username: billybob
+
* Username: it-rc-test
* Date: Wednesday
+
* Day: Wednesday
Let us say that that you have accidentally deleted a file in your home area called ''/home/billybob/bobFiles/important.txt''. You know that file was on there yesterday, so you should be able to recover it.
+
Suppose you have accidentally deleted a file in your home area called ''/home/it-rc-test/test/important.txt''. You know that file was on there yesterday, so you should be able to recover it.
 
<pre>
 
<pre>
[billybob@login1 ~]$ cd /home/billybob/bobFiles
+
[it-rc-test@login1 ~]$ ls /home/it-rc-test/test
 +
important.txt    also_important.txt    not_so_important.txt
 +
[it-rc-test@login1 ~]$ rm -rf important.txt
 +
[it-rc-test@login1 ~]$ ls /home/it-rc-test/test
 
also_important.txt    not_so_important.txt
 
also_important.txt    not_so_important.txt
[billybob@login1 ~]$ ls
+
[it-rc-test@login1 ~]$ cd /home/it-rc-test/test
important.txt    also_important.txt    not_so_important.txt
+
[it-rc-test@login1 ~/test]$ ls .snapshot
[billybob@login1 ~]$ cd /snapvol/billybob_tuesday/billybob/bobFiles
+
56_sunday_home  57_monday_home  58_tuesday_home  59_wednesday_home  60_thursday_home  61_friday_home
[billybob@login1 ~]$ ls
+
[it-rc-test@login1 ~/test]$ cd .snapshot/58_tuesday_home
 +
[it-rc-test@login1 ~/test/.snapshot/58_tuesday_home]$ ls
 
important.txt    also_important.txt    not_so_important.txt
 
important.txt    also_important.txt    not_so_important.txt
[billybob@login1 ~]$ cp important.txt /home/billybob/bobFiles/important.txt
+
[it-rc-test@login1 ~/test/.snapshot/58_tuesday_home]$ cp important.txt /home/it-rc-test/test/important.txt
[billybob@login1 ~]$ cd /home/billybob/bobFiles
+
[it-rc-test@login1 ~/test/.snapshot/58_tuesday_home]$ cd /home/it-rc-test/test
[billybob@login1 ~]$ ls
+
[it-rc-test@login1 ~/test]$ ls
 
important.txt    also_important.txt    not_so_important.txt
 
important.txt    also_important.txt    not_so_important.txt
</pre>
 

Latest revision as of 19:22, 11 February 2021

Purpose

Describe how home area snapshots can be used to recover lost files

Affected Storage

Only data stored in /home/$USERNAME are managed with snapshots. If a file is lost in this filesystem, it can be recovered from daily intervals over the past week. It can be recovered on a weekly basis for the past 30 days. If the file is on a different filesystem (e.g. /blue or /orange), that file cannot be recovered unless backups are being performed for that directory.

Method

Basics

  • Change directory to /home/$USERNAME/.snapshot where $USERNAME is your username
  • You will see at least seven directories, each with a day of the week in the name. If the current day is Friday, the directory labeled ##_friday_home will be the snapshot from 5:00am today.
  • You may also see a couple ##_weekly_home directories. These are taken every Monday morning at 3:00am and kept for 30 days.
  • Change directory to the snapshot you wish to restore from and navigate to your missing file.
  • Copy the file(s) as needed back to your main home directory.

Video demo

Here is a video demo of the process of restoring from a snapshot.

Example

  • Username: it-rc-test
  • Day: Wednesday

Suppose you have accidentally deleted a file in your home area called /home/it-rc-test/test/important.txt. You know that file was on there yesterday, so you should be able to recover it.

[it-rc-test@login1 ~]$ ls /home/it-rc-test/test
important.txt     also_important.txt    not_so_important.txt
[it-rc-test@login1 ~]$ rm -rf important.txt
[it-rc-test@login1 ~]$ ls /home/it-rc-test/test
also_important.txt    not_so_important.txt
[it-rc-test@login1 ~]$ cd /home/it-rc-test/test
[it-rc-test@login1 ~/test]$ ls .snapshot
56_sunday_home  57_monday_home  58_tuesday_home  59_wednesday_home  60_thursday_home  61_friday_home
[it-rc-test@login1 ~/test]$ cd .snapshot/58_tuesday_home
[it-rc-test@login1 ~/test/.snapshot/58_tuesday_home]$ ls
important.txt     also_important.txt    not_so_important.txt
[it-rc-test@login1 ~/test/.snapshot/58_tuesday_home]$ cp important.txt /home/it-rc-test/test/important.txt
[it-rc-test@login1 ~/test/.snapshot/58_tuesday_home]$ cd /home/it-rc-test/test
[it-rc-test@login1 ~/test]$ ls
important.txt     also_important.txt    not_so_important.txt