Apologies if this is already somewhere in the forums- I searched a bit and couldn’t find anything.
I accidentally deleted a bunch of data and I want to restore from my latest snapshot. I don’t know what I deleted specifically but I know it’s in the backup.
I’ve tried mounting the repo but it seems to be pretty slow and I’m hoping restore is faster.
My backup command is restic backup /mnt/user/photos --tag photos
(with repo and such in env), and I just want to restore the missing files in place. Is this the correct command?:: restic restore --tag photos latest --target /mnt/user/photos
– ideally it will skip existing files and put the missing photos right back in the folders they belong.
So far restic only has limited support for restoring in place. If only a small amount of files has been deleted, then mounting the repository and using rsync
to copy missing files is probably the easiest way.
That’s unfortunate. I’ve mounted the folder and have an rclone job running (since it does parallel transfers nicely) and it’s running about 5mb/s - Only 1.5TB and 100k files to go!
Sorry for the silly question, if I understood correctly, even being able to solve it that way, the process is slow, right?
It could be my internet connection but from what I understand, restic restore
should be a lot faster than restic mount && rsync
OK thanks.
I know some people will dislike my comment, but I think it is fair to point out that rustic (A restic client written in rust) does implement the requested in-place restore which really only accesses the missing data blob from the repository. It additionally has a --delete
option to remove files not in the snapshot, a --dry-run
option to see what it would do and is reported to achieve higher throughput than restic while restoring.
I second that - just used it successfully to restore a diff of files onto my MergerFS share from a single disk, which would be in total 1.4M files ~ 1.1TiB - taking for a full restore something like 1-2 weeks but finished in 10 hours with rustic.
Just to be sure I did a restic mount
and then rclone copy --dry-run
there … → no diff
The option for a full restore is nice - but not if its a gigantic ton of files and data to restore which you shouldn’t need to restore all of it.
rsync
== single threaded
rclone sync
(can be destructive) && rclone copy
(can do shallow copy too, non-destructive) == multi-threaded which you can control via --transfers=N
flag (e.g. 32 threads)
I would love to see a flag like this and in-place restore in restic too!
If I understood correctly using rustic, could you access a repo created with restic and recover the information?
yep, they are interchangeable - repo was created and is managed mainly with restic but for restore I used rustic. same as you can do restic mount and rclone copy
I’ve actually since posting switched over to rustic. Over there it seems restore doesn’t replace files that already exist and match the backup. I also like that it saves more information in the snapshots, like files changed and size, etc.
Be careful thought because Restic and Rustic are only truly interchangeable in that they interact with the same kind of repo. The some commands from Restic don’t work in Rustic and vice-versa. Also some of the commands change like --tag
becomes --filter-tags
.
@thiscantbeserious Thanks!
OK thanks I will take a look to Rustic too.