Selfhosted
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:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
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.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
view the rest of the comments
Simple file copying is easy and smart.
What do you do about databases? I'm guessing you are running some containers that have a database, like paperless and many others.
I'm not backing up any databases that are so intensively used that I can't live-copy them. Most of my databases (SQLite) sit idle until I explicitly do something to them. SQLite doesn't really care about it unless it's actively writing to the database.
This is why I switched everything to single disk ZFS. The ability to snapshot everything with zero downtime, including data in case I ever misconfig something, as well as replicate all of it to other ZFS drives offsite in the most efficient way possible — including encrypted data without transferring the keys — was a no brainier.
It isn't a full backup strategy, but it has features that no other backup software can do anywhere near as easily or efficiently.
I use a docker container that uses the MySQL/postgress dump command to create database dumps every hour with a retention policy. The dump is placed into docker data directory.
My docker data directories are in a parent directory on the host.
Borgbackup then runs the backup on this one directory. Like the other reply mentions, this is probably overkill since the database doesn't isn't being written too that intensivley but the resources needed to do this are minimal so its not a big deal once you know how to set it up.
https://github.com/Martlark/pg_dump
https://github.com/fradelg/docker-mysql-cron-backup
Container databases seem as simple as shutting down a container, running a backup and then starting the container again. Although my my experience is only from hosting a Lemmy/PieFed instance. I did make many backups and restores with no issues to the database. It all worked as I intended it to work.
I would imagine a similar process for non container databases. Stop, backup, restart. Although someone with more experience would be better to answer that.