this post was submitted on 29 Jan 2024
21 points (100.0% liked)

Selfhosted

40219 readers
1003 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 1 year ago
MODERATORS
 

I currently have two computers, one that has a big zfs raidz pool that I currently back everything up to. Right now, on my local computer I use rsnapshot to do snapshot backups via rsync to the remote zfs pool. I know I'm wasting a ton of space because I have snapshotting in the rsync backup, and then the zfs pool is snapshotted every day.

Does it make sense to just do a regular rsync into a backup directory on the zfs pool and then just rely on the zfs pool snapshotting for snapshotting?

Maybe eventually I will put the local machine on zfs and then just send the local zfs snapshots over, but that will take some time. Thanks!

you are viewing a single comment's thread
view the rest of the comments
[–] avidamoeba@lemmy.ca 7 points 9 months ago* (last edited 9 months ago) (3 children)

Using plain rsync sounds sane.

Sending local ZFS snapshots to the remote ZFS might be problematic. Consider accidentally deleting important data locally and nuking all of your local snapshots, then sending that to the remote ZFS. You lost all of your snapshots and there's no way to recover the deleted data. Instead do what I do - keep the two ZFS systems separate and use a non-ZFS mechanism to transfer data - rsync, Syncthing, etc. That way even if you delete everything locally, nuke all local snapshots and send the deletions via rsync remotely, you could still recover your data by restoring the remote ZFS to a snapshot prior to the deletions. For reference I have two ZFS machines doing frequent snapshots and Syncthing replicating data between them on immediate basis.

!selfhosted, please do critique if you find some fundamental issues with this.

[–] BCsven@lemmy.ca 3 points 9 months ago (1 children)

Zfs send / receive might be what you want

[–] avidamoeba@lemmy.ca 2 points 9 months ago (1 children)

Wouldn't send/receive also sync snapshots across ZFS instances?

[–] BCsven@lemmy.ca 1 points 9 months ago (1 children)

Docs say this , so yeah. "send streams can either be “full”, containing all data in a given snapshot, or “incremental”, containing only the differences between two snapshots. ZFS receive reads these send streams and uses them to re-create identical snapshots on a receiving system. "

[–] avidamoeba@lemmy.ca 1 points 9 months ago* (last edited 9 months ago) (1 children)

Hm, so send doesn't "create the same state, bits and snapshots" on the other side. Instead it "adds net new snapshots" on the other side. 🤔

Perhaps I could use send instead of Syncthing after all. But then again I'm typically syncing net new data so the optimization would be minimal.

[–] BCsven@lemmy.ca 1 points 9 months ago

I believe there is a method to do a 1-1 build copy, but my expertise ends at this point

[–] ryannathans@aussie.zone 2 points 9 months ago

You don't sync the deletion of snapshots, you use expiry on the remote

[–] abies_exarchia@lemm.ee 2 points 9 months ago (1 children)

This is fantastically helpful, thank you. I will do this.

I don’t know why I thought sending zfs snapshots was the better option

[–] avidamoeba@lemmy.ca 2 points 9 months ago* (last edited 9 months ago)

Cause it makes sense at a glance and it's efficient. Not for backup purposes though.