In terms of backups, /home is the only filesystem on Gadi that provides any sort of failsafe in case of accidental deletion. Every/home folder has a hidden directory that doesn't show up in a contents listing. This directory, ~/.snapshot , contains various snapshots of your home directory. If you've accidentally deleted a file and want to revert back to a snapshot prior the this unfortunate event, you can run, Code Block |
---|
| $ ls ~/.snapshot |
to get a print out similar to this image on the right. Each of these folders is a snapshot of your entire /home folder at the time that is stamped in the suffix. from here you can choose the one that closest resembles the time you want to revert to and get your file back. Let's say you wanted to revert to the top most hourly backup, you would run, Code Block |
---|
| $ cp -r ~/.snapshot/hourly.2023-08-18_0105/lost_folder ~/recovered_folder |
These snapshots aren't included in your 10 GiB quota on /home , but the recovered file will be so you need to be aware of how much space the file will take up and how much room is left in your quota. To check this, you can run the command below, which gives you the size of the folder you are copying and storage left in /home . Code Block |
---|
| $ cd ~/.snapshot/hourly.2023-08-18_0105/
$ du -sh lost_folder
306M lost_folder
$ du -sh $HOME
3.1G /home/<111>/<aaa111> |
|