Basically title. I’m in the process of setting up a proper backup for my configured containers on Unraid and I’m wondering how often I should run my backup script. Right now, I have a cron job set to run on Monday and Friday nights, is this too frequent? Whats your schedule and do you strictly backup your appdata (container configs), or is there other data you include in your backups?

    • tal@lemmy.today
      link
      fedilink
      English
      arrow-up
      3
      ·
      3 days ago

      You’re correct and probably the person you’re responding to is treating one as an alternative as another.

      However, theoretically filesystem snapshotting can be used to enable backups, because they permit for an instantaneous, consistent view of a filesystem. I don’t know if there are backup systems that do this with btrfs today, but this would involve taking a snapshot and then having the backup system backing up the snapshot rather than the live view of the filesystem.

      Otherwise, stuff like drive images and database files that are being written to while being backed up can just have a corrupted, inconsistent file in the backup.

      • QuizzaciousOtter@lemm.ee
        link
        fedilink
        English
        arrow-up
        2
        ·
        3 days ago

        Absolutely, my backup solution is actually based on BTRFS snapshots. I use btrbk (already mentioned in another reply) to take the snapshots and copy them to another drive. Then a nightly restic job backs up the latest snapshot to B2.

      • vividspecter@lemm.ee
        link
        fedilink
        English
        arrow-up
        3
        ·
        3 days ago

        btrbk works that way essentially. Takes read-only snapshots on a schedule, and uses btrfs send/receive to create backups.

        There’s also snapraid-btrfs which uses snapshots to help minimise write hole issues with snapraid, by creating parity data from snapshots, rather than the raw filesystem.

        • tal@lemmy.today
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          3 days ago

          and uses btrfs send/receive to create backups.

          I’m not familiar with that, but if it permits for faster identification of modified data since a given time than scanning a filesystem for modified files, which a filesystem could potentially do, that could also be a useful backup enabler, since now your scan-for-changes time doesn’t need to be linear in the number of files in the filesystem. If you don’t do that, your next best bet on Linux – and this way would be filesystem-agnostic – is gonna require something like having a daemon that runs and uses inotify to build some kind of on-disk index of modifications since the last backup, and a backup system that can understand that.

          looks at btrfs-send(1) man page

          Ah, yeah, it does do that. Well, the man page doesn’t say what time it runs in, but I assume that it’s better than linear in file count on the filesystem.

      • QuizzaciousOtter@lemm.ee
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 days ago

        That’s good. You can also check out btrbk - it’s a tool which can take snapshots for you, like Timeshift, but also back them up to somewhere.