Description
I'd like to show some functionality which has been introduced in rustic 0.8.0.
Sometimes you know about a file which is present in your repository and you want to know when this exactly given file has been changed. Basically you want to see the history of this file in the snapshots saved in your repository.
To do so, simply use the
--path
option ofrustic find
. This will find the givenpath
in all snapshots. However, by default identical results are shown as(+x)
(like in therustic snapshots
output). So, this gives you exactly the history of that file.Typically, you also know that you can filter out some snapshots by using the path(s) stored in the snapshots, so using a suitable
--filter-paths
will reduce the search by excluding snapshots which cannot contain that file.An example call:
$ rustic find --path /home/alex/.config/mc/ini --filter-paths /home [00:00:01] reading index... ████████████████████████████████████████ 451/451 searching in snapshots group (host [myhost], label [], paths [/home])... found in 03521ca4 from 2022-06-11 06:29:55 -rw-r--r-- alex alex 4036 28 Mar 07:22 "/home/alex/.config/mc/ini" found in 772fc402 from 2022-06-30 23:30:21 (+1) -rw-r--r-- alex alex 4036 13 Jun 08:19 "/home/alex/.config/mc/ini" found in dd4d75e2 from 2022-08-31 23:30:33 (+16) -rw-r--r-- alex alex 4036 12 Aug 12:55 "/home/alex/.config/mc/ini" found in b31f134e from 2023-10-29 23:30:20 (+230) -rw-r--r-- alex alex 4078 24 Oct 06:41 "/home/alex/.config/mc/ini" found in bfacf88a from 2024-01-29 09:30:27 (+256) -rw-r--r-- alex alex 4078 28 Jan 23:32 "/home/alex/.config/mc/ini" found in fef232e8 from 2024-04-23 23:30:52 (+432) -rw-r--r-- alex alex 4078 15 Apr 12:18 "/home/alex/.config/mc/ini"
This shows that the given file exists in quite some snapshots - we exactly get the snapshots where the file content changed.