Page tree
Skip to end of metadata
Go to start of metadata

/home is the only filesystem mounted on Gadi that provides backups. If you accidentally deleted any data in your home folder and want to recover it please follow the example below to copy from the right snapshot.

Every home folder has a hidden directory `.snapshot` in it, even though it won't show up when you list the contents. The folder contains various snapshots of the state of your home directory. 

$ ls ~/.snapshot
daily.2020-07-03_0010  daily.2020-07-16_0010   hourly.2020-07-16_0205
daily.2020-07-04_0010  hourly.2020-07-15_1405  hourly.2020-07-16_0305
daily.2020-07-05_0010  hourly.2020-07-15_1505  hourly.2020-07-16_0405
daily.2020-07-06_0010  hourly.2020-07-15_1605  hourly.2020-07-16_0505
daily.2020-07-07_0010  hourly.2020-07-15_1705  hourly.2020-07-16_0605
daily.2020-07-08_0010  hourly.2020-07-15_1805  hourly.2020-07-16_0705
daily.2020-07-09_0010  hourly.2020-07-15_1905  hourly.2020-07-16_0805
daily.2020-07-10_0010  hourly.2020-07-15_2005  hourly.2020-07-16_0905
daily.2020-07-11_0010  hourly.2020-07-15_2105  hourly.2020-07-16_1005
daily.2020-07-12_0010  hourly.2020-07-15_2205  hourly.2020-07-16_1105
daily.2020-07-13_0010  hourly.2020-07-15_2305  hourly.2020-07-16_1205
daily.2020-07-14_0010  hourly.2020-07-16_0005  snapmirror.a4b52a78-1197-11ea-9960-00a098f3f6ee_2158894107.2020-07-16_120500
daily.2020-07-15_0010  hourly.2020-07-16_0105

Each folder above is a snapshot of your entire $HOME folder at the time shown in the timestamp suffix of the folder name. Choose the closest one to the time you lost the data and copy it back. For example, to copy the lost_folder back to $HOME/recovered_folder, run

$ cp -r ~/.snapshot/hourly.2020-07-16_0805/lost_folder ~/recovered_folder

It is recommended not to overwrite your existing data in your $HOME folder but please be aware of the disk usage before copying back from the snapshot. The snapshots are not debited to your 10GiB home disk quota but the recovered data is.

To look up the disk usage, run `du`. For example, to look up the usage of the home folder and the folder `lost_folder` in the hourly snapshot captured at 8:05am 16 July 2020, the user abc111 would run

$ cd ~/.snapshot/hourly.2020-07-16_0805/
$ du -sh lost_folder
306M	lost_folder
$ du -sh $HOME
3.1G	/home/111/abc111
  • No labels