Checking for missing files on local disk

Looking for a little advice on the best way of handling this…

I may or may not (I don’t know) have accidentally deleted some important files.

I have good backups and can restore, but given it’s a large amount of data, didn’t know if there was an easy way to compare the local directory against the last backup and show anything that is in the backup that isn’t present now.

There haven’t been many (if any) on purpose changes since the last backup, so if there are differences, I’ll know what I need to recover.

Only thing I’ve really thought of so far is running another snapshot and doing a diff between them.

Any other good ideas?

Thanks!

2 Likes

And just as an update, I tried the “new snapshot and diff” and it seemed to work well… so maybe that’s the right answer.

Same problem here, fortunately, there’s a GitHub thread on adding checksums.

I just posted a comment to articulate this use-case clearly:

@nett I don’t know, but restic restore -–dry-run -–delete -–overwrite if-changed may produce the result you are looking for (maybe need to add some -v to get a more verbose output)

Besides this, you can use rustic to do a diff SNAP:/my/path /local/path until this functionality gets added to restic.

1 Like

Thank you Alex!

I like the idea, but unfortunately, that doesn’t work:
restic restore -–dry-run -–delete -–overwrite if-changed -vv
Just lists all files as restored

I will check rustic soon! The comparison page looks promising, although I’m a bit unhappy with the test coverage, and it doesn’t support --files-from

I don’t use it directly in restic, I created a shell script that defines a new environment variable: RESTIC_FILES_FROM_FILE=$HOME/.config/restic/paths.list

About --files-from see my post Backup family photos and videos - #6 by alexweiss.
My personal advise is to backup paths using includes/excludes instead - at least in most cases. IMO, --files-from is only relevant for edge cases.

1 Like

I double-checked your post Backup family photos and videos - #6 by alexweiss and restic documentation Backing up — restic 0.18.1 documentation

It looks like a primary mean for including filesystem paths in restic, for example: I want to back up some files from home, but I don’t want to include the home, as there are sensitive keys in configs, and I don’t want to exclude the keys manually, I would rather include files from a text file, and provide the list with –-files-from. Could you advise, did I miss something?

Thanks!