Hello,

I’ve been lately thinking about my backup strategy as I’m finalising building my NAS. I want to use ZFS and my idea was to have two drives in mirror (RAID-1) configuration and just execute periodical snapshots on such dataset. I want to the same thing in a second location, so in the end my files would be on 4 different drives in 2 different locations and protected by snapshots from deletion or any other unwanted modification.

Would be possible with this setup to just swap one of the drives in one location and have ZFS automatically rebuild data on the new drive and then I take the drive to second location and do the same so all drives would be exactly the same, instead of copying data manually? Though I believe all of the drives would need to be exactly the same size, is that right?

Is it a good idea in general or should I ditch it, or maybe just ditch the part with ZFS rebuilding and use instead some kind of software for that?

Thank you for your help in advance!

  • unsaid0415@szmer.info
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    1 year ago

    I’m not sure if I understood your question correctly, but perhaps it’d be more comfortable to use the native ZFS sync mechanism over the network. It’s “just snapshots”, but in the process the whole initial dataset gets synced as well

    A very simple ZFS to (Raspi+ZFS) setup is shown here, it relies on cron: https://blog.beardhatcode.be/2021/05/raspberry-pi-zfs-replication.html

    If you have two e.g. TrueNAS servers thta run ZFS you can skip sanoid/syncoid and just use zfs send from one server to another directly, using the network address

    • biscuits@lemmy.sdfeu.orgOP
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      1 year ago

      Yeah, I guess it may be risky to remove drives from pool, so maybe it would be better to build to just move the whole secondary pool as the other commenter pointed out (at least for the first time, smaller increments should be easier to handle). But do you think my strategy with snapshots as backup is good overall or should I use something else?