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.
-
No low-effort posts. This is subjective and will largely be determined by the community member reports.
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
But the snapshots are only on the ZFS filesystem? or do you mean i should replace the borgbackup with the zfs snapshots?
If you are storing everything on the ZFS filesystem, taking a snapshot in ZFS will include all that data. So if you keep hourly snapshots for the past 24 hours, and daily snapshots for the past week, and then monthly for 3 months for example, you can often dip into those to do recovery when the issue is “oops I deleted something I didn’t want to” rather than going to your huge backup and restoring the entire system
Yes, but zfs snapshots are not an off-site backup which is more what i am looking for. Besides this, zfs snapshots are of course something i want to implement
If you use zfs for docker, dbs and vms you don't have to shut down anything. Just snapshot and send/recv to sync snapshots to another ZFS drive.
You can even mount and copy the latest snapshot to the cloud with rsync/rclone; probably also borg/restic/kopia. Each applications state will be internally consistent if the snapshot is performed for all data at the same time. If you're paranoid you can stop everything for a few mins to perform the snapshot, but it's not really necessary.
yes the ZFS snapshots are in the same disk, but the most common scenario when you need backups is to get a handful of files in which case the ZFS snapshots are super convenient and they use very little space. I use restic + (B2 | sftp) and zfs snapshots. I may literally go years without needing to restore from restic because most of the time I can get what I need from the zfs snapshots.
You did not mention if you are using a single disk or more. If you can afford it and the machine allows it, doing mirroring or RAID-Z1 (equivalent of RAID 5) is a good option
I have 4 HDDS drives running in RAID-Z1. But yeah, the zfs snapshots on the pool itself are a no brainer :) but good to hear that they work so well
If you wanted to get really in the weeds of ZFS, you can use ZFS send to send copies of your snapshots into a dataset that you store on your external.
You can enable encryption and compression on the external dataset as well.
This would use snapshots, give you the ability to make block-level incremental backups and allow encryption and compression using only ZFS tooling.
You'd have to script it though (it's possible someone has already done this in some other backup application).
You can use the
zfs sendcommand to copy snapshots from one dataset to another.Your backup could be a ZFS dataset stored on an external drive(s) which would contain the snapshots of your online dataset. You could then encrypt and compress (by setting the appropriate ZFS dataset properties) the backup dataset for size efficiency, and security.
To restore the backup you would use
zfs sendto move your backedup snapshots into a new dataset on your new un-disastered hardware.Since this is all done via CLI, you could write a bash script to create periodic snapshots, one to backup snapshots to the external dataset and another to delete old snapshots in your dataset. Toss 'em in your cron service of choice (or use systemd timers) and you've got a whole ZFS native backup system.
There may be backup software that'll do this for you. I've seen that Timeshift supports snapshot-based backups for btrfs so you can probably find a GUI app to handle the automation.