Difference between revisions of "Snapshots"
Jump to navigation
Jump to search
(→Basics) |
|||
Line 17: | Line 17: | ||
[billybob@login1 ~]$ cd /home/billybob/bobFiles | [billybob@login1 ~]$ cd /home/billybob/bobFiles | ||
also_important.txt not_so_important.txt | also_important.txt not_so_important.txt | ||
− | [billybob@login1 ~]$ ls | + | [billybob@login1 ~/bobFiles]$ ls |
important.txt also_important.txt not_so_important.txt | important.txt also_important.txt not_so_important.txt | ||
− | [billybob@login1 ~]$ cd / | + | [billybob@login1 ~/bobFiles]$ cd /snapshot/tuesday/bobFiles |
− | [billybob@login1 | + | [billybob@login1 /snapshot/tuesday/bobFiles]$ ls |
important.txt also_important.txt not_so_important.txt | important.txt also_important.txt not_so_important.txt | ||
− | [billybob@login1 | + | [billybob@login1 /snapshot/tuesday/bobFiles]$ cp important.txt /home/billybob/bobFiles/important.txt |
− | [billybob@login1 | + | [billybob@login1 /snapshot/tuesday/bobFiles]$ cd /home/billybob/bobFiles |
− | [billybob@login1 ~]$ ls | + | [billybob@login1 ~/bobFiles]$ ls |
important.txt also_important.txt not_so_important.txt | important.txt also_important.txt not_so_important.txt | ||
</pre> | </pre> |
Revision as of 13:38, 11 May 2018
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 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.
Method
Basics
- Change directory to /snapshot/$DAYOFWEEK
- 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.
- Copy file(s) as needed back to the main home directory.
Example
- Username: billybob
- Date: 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.
[billybob@login1 ~]$ cd /home/billybob/bobFiles also_important.txt not_so_important.txt [billybob@login1 ~/bobFiles]$ ls important.txt also_important.txt not_so_important.txt [billybob@login1 ~/bobFiles]$ cd /snapshot/tuesday/bobFiles [billybob@login1 /snapshot/tuesday/bobFiles]$ ls important.txt also_important.txt not_so_important.txt [billybob@login1 /snapshot/tuesday/bobFiles]$ cp important.txt /home/billybob/bobFiles/important.txt [billybob@login1 /snapshot/tuesday/bobFiles]$ cd /home/billybob/bobFiles [billybob@login1 ~/bobFiles]$ ls important.txt also_important.txt not_so_important.txt