Recovering files from $HOME
On Sol, daily snapshots are taken of each users' $HOME directory. These snapshots are taken every day at 12:00 PM and persist for 4 weeks.
Seeing all the snapshots
On July 14, examining all my backed up files would look like this:
[wdizon@login01:~]$ cd ~/.snapshot
[wdizon@login01:~/.snapshot]$ ls
ScheduleName_duration_2023-06-16_12:00/ ScheduleName_duration_2023-06-30_12:00/
ScheduleName_duration_2023-06-17_12:00/ ScheduleName_duration_2023-07-01_12:00/
ScheduleName_duration_2023-06-18_12:00/ ScheduleName_duration_2023-07-02_12:00/
ScheduleName_duration_2023-06-19_12:00/ ScheduleName_duration_2023-07-03_12:00/
ScheduleName_duration_2023-06-20_12:00/ ScheduleName_duration_2023-07-04_12:00/
ScheduleName_duration_2023-06-21_12:00/ ScheduleName_duration_2023-07-05_12:00/
ScheduleName_duration_2023-06-22_12:00/ ScheduleName_duration_2023-07-06_12:00/
ScheduleName_duration_2023-06-23_12:00/ ScheduleName_duration_2023-07-07_12:00/
ScheduleName_duration_2023-06-24_12:00/ ScheduleName_duration_2023-07-08_12:00/
ScheduleName_duration_2023-06-25_12:00/ ScheduleName_duration_2023-07-09_12:00/
ScheduleName_duration_2023-06-26_12:00/ ScheduleName_duration_2023-07-10_12:00/
ScheduleName_duration_2023-06-27_12:00/ ScheduleName_duration_2023-07-11_12:00/
ScheduleName_duration_2023-06-28_12:00/ ScheduleName_duration_2023-07-12_12:00/
ScheduleName_duration_2023-06-29_12:00/ ScheduleName_duration_2023-07-13_12:00/
These steps, as presented, work both on Sol and on Agave. The only difference between the two is that on Sol, backups are kept for 4 weeks vs. on Agave, backups are kept for 2 weeks.
Seeing all the files
To recover a file that existed in my $HOME directory on July 7th at 2:00 PM, I can therefore see those files with these commands:
[wdizon@login01:~]$ cd ~/.snapshot/ScheduleName_duration_2023-07-07_12:00
[wdizon@login01:~/.snapshot/ScheduleName_duration_2023-07-07_12:00]$ ll
total 13329248
drwx------ 56 wdizon grp_rcadmins 4134 Jul 6 21:54 ./
dr-xr-xr-x 2 root root 0 Jul 13 12:00 ../
-rw-r----- 1 wdizon grp_rcadmins 18976 Jan 24 14:45 1654163.crash
drwx------ 3 wdizon grp_rcadmins 27 Jan 27 09:12 .agisoft/
-rwxr-x--- 1 wdizon grp_rcadmins 17712 Jun 28 15:09 a.out*
drwxr-x--- 7 wdizon grp_rcadmins 427 Jun 21 16:19 apache-log4j-1.2.17/
drwx------ 3 wdizon grp_rcadmins 23 Jun 22 2022 .apptainer/
-rw-r----- 1 wdizon grp_rcadmins 1332026 Apr 26 09:33 apr2
-rw------- 1 wdizon grp_rcadmins 20 Jun 22 2022 .ash_history
-rw------- 1 wdizon grp_rcadmins 163020 Jul 7 00:06 .bash_history
[rest omitted]
Note, the files will not all have July 7 as their date, because the date here indicates their last modification time, not the date of the snapshot. Anything in this directory, however, can be reliably seen as the exact state of your $HOME as of July 7, 12:00.
Recovering any of the files
While it is possible to interact with these files in their current location under .snapshot
, it is not recommended to do so. Instead, identify the files you wish to recover (using either command line tools like above, or SFTP/SCP tools like Filezilla or Cyberduck), to copy these files back to your $HOME in a new location.
[s:0] [wdizon@login01:~/.snapshot/ScheduleName_duration_2023-07-07_12:00]$ cp -v usage_compare ~/usage_compare.recovered
'usage_compare' -> '/home/wdizon/usage_compare.recovered'
Note, it takes the file from the filetree ~/.snapshot
and moves it into ~/
(/home/wdizon
). You now have the recovered file in your normal working space (copied out of snapshot space).