Borg vs restic for a single VPS, am I overthinking this?

FrostyBear

New Member
Messages
67
Reaction score
0
Location
Brisbane, AU

So I've been doing the lazy thing for like a year now. rsync script that dumps everything to a $5 storage box every night. Works fine until it doesn't, right?

Had a close call last week where I almost rm -rf'd my nginx config folder (don't ask). Made me realize my backups aren't versioned at all. One bad sync and the good copy is gone too.

Been reading about borg and restic. Everyone seems to love one or the other. I've got one small VPS, maybe 40GB of actual data, mostly docker volumes and a few sites. Not running a whole fleet here.

Is restic easier for a beginner? I keep seeing people say borg is faster but the docs make my head spin. Also, do you guys run these to a remote or just a second local disk? My provider gives me 100GB block storage for cheap but it's in the same datacenter, which feels kinda pointless if the whole rack goes down.

What's your setup? Not looking for a perfect enterprise answer, just something that won't bite me in six months.

xNova_

New Member
Messages
57
Reaction score
0
Location
Toronto, ON

restic, hands down, if you value your sanity. borg is great and yeah it's faster on the initial backup but the docs read like they were written by someone who resents you. restic you just restic init and point it at a repo and it works. no weird repo mode stuff to remember.

That said, restic has its own footgun: forget/prune. If you don't set up retention properly you'll either keep every snapshot forever and blow through your storage, or you'll run a prune with the wrong flags and nuke stuff you wanted. Learn restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune and put it in a cron and don't think about it again. Also the cache dir grows like a weed, mine hit 20GB before I noticed. Set RESTIC_CACHE_DIR somewhere you actually watch.

On the same-datacenter thing: yeah you're right that a rack failure takes both out. But honestly for a single small VPS the realistic threats are (a) you fat-fingering rm again, (b) a bad deploy corrupting data, (c) the VPS provider suspending your account for some dumb reason. Same-DC block storage handles all three. Full DC loss is a real threat but it's way down the list. Do the local block storage as your primary target, then rclone/borg to a cheap offsite once a week if you want to sleep better. 40GB is nothing, you could push that to Backblaze B2 for like pennies.

Wait, what's your storage box provider actually? Some of them block the API calls restic needs or throttle hard on the initial seed. That bit me once with a cheap one, took 3 days to seed 60GB.

zer0cool99

New Member
Messages
67
Reaction score
0
Location
Seattle, WA

the account suspension angle is exactly why same-DC storage is a trap though. if your provider locks you out they lock you out of the block storage too, same billing account, same login. had a host freeze everything over a payment that "hadn't cleared" (it had) and I couldn't touch a single file for 4 days. now I run a second repo at a completely different company, 250GB box for like 3 euro a month. local block storage is the fast restore, offsite is the one that saves you when the relationship goes bad.

on restic vs borg, yeah restic is the easier one but xNova_ undersold the cache. mine hit 12GB before I noticed and I'm only pushing maybe 60GB total. also run restic check --read-data every few months, not just the default check. found a corrupted pack once that the quick check was perfectly happy with. nobody talks about that.

one thing nobody's mentioned, if those docker volumes have a postgres or mysql in them, backing up the raw data files while the container is up gets you a garbage snapshot half the time. dump to sql first then back up the dump. learned that one the hard way and lost about two weeks of a side project's data, which was a pokies RTP tracking sheet of all things lol. of course the gambling spreadsheet is the thing that dies.

nightowl87

New Member
Messages
60
Reaction score
0
Location
Portland, OR

The postgres dump thing just saved me from a future disaster, so thanks zer0cool99. I've got a nextcloud container and a small postgres for a hobby app and I was absolutely going to just rsync the volume folder and call it a day. Is it just docker exec a pg_dump to a file and then let restic grab that? Or do you stop the container first?

Also nightowl87 here, same rsync-to-a-cheap-box setup as OP, so this thread is basically my to-do list now. The prune flags xNova_ posted, do those go in a script or do you just type them in manually every time? I'd definitely forget the syntax by week two.

You must log in or register to reply here.