this post was submitted on 04 Jul 2023
143 points (98.0% liked)

Selfhosted

40403 readers
416 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
 

I have a home server that I’m using and hosting files on it. I’m worried about it breaking and loosing access to the files. So what method do you use to backup everything?

you are viewing a single comment's thread
view the rest of the comments
[–] wgs@lemmy.sdf.org 3 points 1 year ago* (last edited 1 year ago)

For config files, I use tarsnap. Each server has its own private key, and a /etc/tarsnap.list file which list the files/directories to backup on it. Then a cronjob runs every week to run tarsnap on them. It's very simple to backup and restore, as your backups are simply tar archives. The only caveat is that you cannot "browse" them without restoring them somewhere, but for config files it's pretty quick and cheap.

For actual data, I use a combination of rclone and dedup (because I was involved in the project at some point, but it's similar to Borg). I sync it to backblaze because that's the cheapest storage I could find. I use dedup to encrypt the backup before sending it to backblaze though. Restoration is very similar to tarsnap:

dup-unpack -k keyfile snapshot-yyyymmdd | tar -C / -x [files..] .

Most importantly, I keep a note on how to backup/restore: Backup 101