this post was submitted on 08 Apr 2025
30 points (100.0% liked)

Selfhosted

45569 readers
1523 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

Sorry for adding to the massive pile of backup-related question, but I could not figure out how to manage backups from existing answers..

I want to backup my VPS setup (think container-defining files, its volumes, and etc configs), but am unsure where to put it. Does keeping these in the VPS itself make sense? If so, how do I create and manage the backup?

Also, I would need a remote copy - what is the good location for this? I wish I could copy to my laptop, but obviously I cannot do that automatically. Should I pay money for a backup? I want to avoid paying lots of money just for backups. Thanks in advance!

all 17 comments
sorted by: hot top controversial new old
[–] marauding_gibberish142@lemmy.dbzer0.com 12 points 10 hours ago (3 children)
  1. Create git repo
  2. Put all config in git repo
  3. Create repo on codeberg
  4. Clone git repo to both VPS and laptop

No extra money needed

[–] someacnt@sh.itjust.works 2 points 1 hour ago

Codeberg sounds like a good way! I was concerned about server config being stored on self-hosted forgejo (which is configured by the very server config), turns out that need not be the case.

[–] tofu@lemmy.nocturnal.garden 3 points 3 hours ago (1 children)

Make sure to not check in secrets in plaintext. git crypt is one way to encrypt secrets before checking them in.

I suggest SOPS

[–] rumba@lemmy.zip 8 points 11 hours ago (1 children)

Ansible if you want to do it the right way.

Or keep all of your configs in one tree and use syncthing on it If you want to phone it in. Turn on versioning call it a night.

[–] someacnt@sh.itjust.works 1 points 36 minutes ago

Thanks! I gotta get my hands on Ansible, was reluctant as I've heard it can be complicated. Should see myself!

[–] just_another_person@lemmy.world 5 points 12 hours ago

I'd get familiar with deploying these with some infrastructure-as-code tools, and keep a git repo. Ansible is pretty easy to get started with.

[–] johntash@eviltoast.org 2 points 9 hours ago

Look at tools like kopia and restic. Depending on how much data you have, it should be relatively cheap to back up to backblaze b2.

[–] pageflight@lemmy.world 3 points 12 hours ago

If you haven't played with Pulumi (for configuring cloud services) and Ansible (for local services, shell commands, apt installs etc) you may enjoy them as a way to capture / re-apply configuration.

[–] jeena@piefed.jeena.net 1 points 12 hours ago

Most of the time the VPS provider offers some backup solution. It's not only about your configuration files which can easily be recreated, but about all the user data like pictures databases, etc. Which once lost can't be recovered.

Best practice is a 3-2-1 backup: https://www.backblaze.com/blog/the-3-2-1-backup-strategy/

But you could back up your stuff on your laptop if you want, it's not such a bad idea actually. For that you trigger the backup script from your laptop, you can do it automatically there too. This makes sure that the laptop is on while you're doing the backup.

The easiest way is a crown job and a bash file which runs a couple of rsync commands to get specific files and directories from the server via ssh.

A more involved way would be a backup system like restic, which does a lot of things for you but is a bit more involved to set up.