Snapshots: Difference between revisions
Jump to navigation
Jump to search
Moskalenko (talk | contribs) m Text replacement - "/ufrc" to "/blue" |
|||
(5 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 | 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 /snapshot | * 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. | ||
* Copy file(s) as needed back to | * 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 [https://mediasite.video.ufl.edu/Mediasite/Play/ad66a7d32b0a4a6e8c3427b187ee979d1d video demo] of the process of restoring from a snapshot. | |||
==Example== | ==Example== | ||
* Username: | * 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. | |||
<pre> | <pre> | ||
[ | [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 | ||
[ | [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 | 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 | important.txt also_important.txt not_so_important.txt | ||
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