Restic + Mega + Rclone serve epiphany

I’ve been using Restic + Rclone for a long time, and it has always worked great. A month ago, I switched from Hetzner to Mega (nothing wrong with Hetzner, but I got 50% off with Mega for a year). While Restic + Rclone works with Mega, starting any operation was extremely slow, it usually took more than a minute just to open the repo (I had to set --option=rclone.timeout to make it work!). This is probably due to the number of files I have there: 6 TB of Restic backups, that’s a lot of files, and Rclone likely has to download some metadata when it connects.

I was using it like this:

restic -r rclone:mega:/path/to/backup

Today, I experimented with rclone serve like this:

rclone serve rest mega:

and then:

restic -r rest:http://localhost:8080/path/to/backup

This opens the repo almost instantaneously! I don’t know if this is obvious to others, so I thought I’d share. I love this!

2 Likes

That behavior is rather unexpected. The restic rclone backend internally also calls rclone serve rest mega:<path> maybe having <path> in there makes a difference? Or rclone serve starts to collect the metadata automatically on startup?

There’s a typo, it should be rclone serve restic mega:.

Looking at the time it takes for rclone serve to be ready, and the network traffic at the same time, I think that’s exactly what’s happening.

(sorry about the typo)