Second backup created from existing repo

So I have a local server in my home where I store my backups, and Restic is working great to backup to that server. But what I’d like is that server to backup only the latest version of each file to another remote server, so I still have my files if my house burns down. I only want the latest version on the remote machine, to save space, not every snapshot. I don’t even need Restic for this second backup, rsync would be fine, I just need to know how to get the latest version of all files in the Restic repo so I can copy them across.

Does that make sense?

Any help appreciated. Thanks!

Welcome to the community @b3n.

There’s no support for doing that type of cherry-picking out of the box in restic. What you can do is try one of the following methods:

  1. Try the copy command that @middelink made, reference here and short explanation here. That should allow you to copy a single snapshot and its contents from one repo to the other. You will still have to use restic forget with restic prune (or --prune to forget) to get rid of the old snapshot(s) on that second repo though.

  2. Simply back up to the second repository as well after you back up to the primary one, and use the same forget and prune strategy as mentioned above to keep only one single snapshot in that second repo.

  3. An alternative way of doing #2 is to use rsync or rclone to simply copy/sync your entire primary repository to the secondary one - it’s all just files in a filesystem.

Personally I keep two separate repos backed up to with restic. I don’t see a need to keep just one snapshot in the second one. What’s your use case for doing that instead of keeping a few of them?

Method 2 sounds like the best way to go, I don’t know why I didn’t think of that, I will give it a go, thank you! My use case is I can’t afford to spend money, and so I am limited to free hosting providers, which have limited storage capacity. This means I don’t want my remote backup to gradually grow in size over time because it’s keeping files that were deleted. Whereas locally I already have a big hard drive so I can let it contain multiple snapshots.

Thanks again, and for the great work on Restic!

Another idea would be to mount the restic repository and rsync the latest snapshot to your secondary location. The latest snapshot in the mount is always hosts/xyz/latest/!

In this case you might as well just rsync the stuff from the client directly to the second “repo”. This repo will not be encrypted though, as restic will have nothing to do with it, but that’s the same as with @nicnab’s suggestions (just quicker because you don’t have to go through a mounted repo).

That is, of course, correct but it means having to start two sessions from the client rather than only one. But now that I think about it: how would one go about mounting and most of all unmounting a repo by script?