Separating data/ and repository metadata

Hello dear restic community,

I am using restic to back up many of my projects. I am using classic cloud storage on OVH, and everything is working smoothly so far.

As I tend to have a lot of heavy files in my projects, my backups keep growing larger. The monthly bill is starting to become significant, so I’ve been looking for cheaper alternatives.

I started researching other storage solutions and found that OVH offers a “cloud-archive” option. Essentially, the price is five times lower compared to classic cloud storage, but the trade-off is that data is “frozen” and needs to be “unfrozen” before it becomes accessible. The unfreezing process can take several hours.

I don’t really mind waiting hours on the rare occasion I lose my computer or damage my hard drive, but it’s frustrating to wait for hours after every request to back up my data. Indeed, since restic needs to check my keys and consult all the metadata associated with my repository before uploading any changes, using this service requires first sending an unfreezing request, waiting several hours, and then performing the backup.

To address this issue, I was considering a hybrid solution: I could host the data/ directory in cold storage, while keeping the repository metadata in a hot cloud that is accessible within minutes. This would allow restic to quickly check and update the repository contents, and then upload the new chunks to the data/ folder in cold storage. Since the external repository files are relatively lightweight compared to the actual data, it achieves my primary goal of relocating my heavy files on a cheaper storage solution.

Here’s my question: Is it possible with restic to save the data/ directory in a different location from the rest of the repository? If so, how can I achieve this?

I’ve included the explanation of my problem to provide context around my main question. Please feel free to critique my approach or suggest better ideas :slight_smile:

Thank you for your help!

With restic I doubt you can do this easily (if at all) as for now.

But have a look at rustic - it does support cold storage. And is restic compatible.

Have a read:

It is about using AWS Glacier but should be the same in principle for any other cold storage provider.

Thank you for your suggestion. Never heard of rustic before, I’ll have a look. Is it mature enough for production backups? Reliability is still the first priority when talking about backup tools.

You have to decide yourself. Like with any FOSS. I have been using both restic and rustic for long and all works for me.

rustic author here.
@RSLLES I personally have the same setting and use OVH cloud archive for cold backup data - in fact that was the motivation to add support for cold storage to rustic.

Note that rustic stores a complete repository into the cold storage and the metadata part as copies into the hot storage. So you can anytime easily copy/convert this back to a standard restic/rustic repository.

See rustic/config/services/rclone_ovh-hot-cold.toml at main · rustic-rs/rustic · GitHub for the config I am using.
If you want to migrate an existing repository into a hot/cold one, you might want to wait for feat: Add init --hot-only option by aawsome · Pull Request #1224 · rustic-rs/rustic · GitHub which will be coming in the next weeks…

I just spent some time looking at the rustic documentation, it looks like you have built an awesome tool @alexweiss! And great to see I am not the only one looking for a hybrid setting.

I will check your configuration and see how I can adapt it to my own needs. And maybe I will contribute to rustic in the future if it fits my setup. Thanks :slight_smile:

1 Like