Restic, Rest server, storage on three separate machines?

I have a Hetzner “storage box” to store my backups. It offers SFTP access (and some other protocols including Samba, Webdav and some others), but it’s not a VM; I can’t run anything on the server.

I’d like to use the rest server in append only mode to protect my backups from being deleted by a compromised machine that needs to perform backups.

It looks like the idea with rest server is that it handles local files. I was wondering how it would work out if I were to set it up like:

  1. SFTP “storage box”
  2. My backup server
    • has sshfs mount to (1) at /mnt/storage
    • runs restic server, with --path /mnt/storage
  3. Server(s) to be backed up
    • use restic with the rest server (2) as the repo.

I have about 200GB of data to backup. Does this sound realistic?

Maybe someone else knows if this works or not, I haven’t tried it. It depends on how well the SFTP mount presents a filesystem and I would guess it works fine.

Personally I use the cheapest Hetzner Cloud VPS, along with their block storage, and run rest-server on that VPS with the block storage mounted as a regular filesystem of course. It works great for several clients. You could check out how much that would cost you, if it’s not much more expensive it might be a much better solution.

@artfulrobot yes, it should work just fine that way. Rest-server does only very basic file operations, so it should work well even on a FUSE based file system.

Hetzner Cloud is an option, but almost an order of magnitude more expensive, IMHO not really cost effective for backup purposes (being SSD based).

Possibly the best solution for backup purposes (and what I personally have been using for years now) is a storage VPS, with rest-server installed on it. A referral link which will give you additional 15% discount for the first 6 months:

You might want to check Storage-250 and Storage-500 options, which should be enough for your needs, and quite cost effective, yet giving you a proper VPS to install rest-server or whatever else you need…

The cheapest VPS at Hetzner cloud, and this is what I pay, is €2.49 per month. To that I have a 300 GB volume which is €0.04/GB per month, so if you need e.g. 200 GB of data it’d be €8 per month. You’ll probably not need more than this for your repository, due to deduplication in restic.

In total €10.49 per month, for a really good VPS even if it’s the cheapest one, and really fast storage, a combination on which you can run additional software if you want.

FWIW, rest-server is much fast than running over SFTP, so I personally wouldn’t go for the SFTP variant :slight_smile:

Just an update: I set it up as planned and restic ran OK. I may yet move to a cloud storage-focussed VPS but I’d like to avoid that for now because of the pain and risks involved with partition resizing (as well as many providers, included, who don’t let you downsize).

That’s not a problem when you have the setup I’m using at Hetzner. If I wanted to downsize my volume from 300 GB to 100 GB or whatever, I just create a new volume, mount it in the VPS, copy over all data (it’s really fast so it won’t take long), then delete the old volume. Increasing volume size can of course be done without having to do it, just change the size and resize the filesystem.