I want a server running nextcloud, immich and others.

I have a N100 mini server with a 2TB external HDD. I want to secure the system against data loss. Hence, I want a backup and redundancy.

  1. Most important question: How do I build everything? Is this a NAS? My naive approach is to buy 3 external HDDs and connect them to the N100 with a USB hub. I assume this is not “the right way” but to use/build a NAS. Do I have to build a separate NAS computer? When I lookup NAS buying, it is a computer with a case for 4 drives, excluding the drives and costs 400 bucks. I am confused because this is incredibly expensive compared to what I already have. What is the additional benefit compared to my setup? Am I cheap?

  2. Regarding redundancy, is RAID still the way to go? At 2 TB, using RAID 5 with 3 drives sounds good. I’d have 4 TB of usable space, much more than I intend to use in the next years, and adding a drive increases the storage by 2 TB, effectively increasing space by 50%.

  3. I have 4 TB usable space, but I won’t reach 2 TB in the next one or two years. I’d use a 2 TB HDD for a local backup via borg. Once my hot storage needs to increase, I replace the backup drive with a larger one and use it to increase the RAID storage. Is one backup sufficient? Or should I keeping multiple versions of the data. Daily, weekly, monthly backups? What is your experience with it?

  4. Another 2 TB HDD for an offsite backup, LUKS encrypted, backed up once a year (that’s the goal for now).

Does that sound good?

  • selfmate@lemmy.zipOP
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 days ago

    is that your only expansion option on the system you have?

    For now, yes, that’s the only option. I’ll look into internal drives the next time.

    thanks for the info about RAID 1 and BTRFS in raid1c2

    I’ll look into kopia as well since I only knew about borg.

    I am using mergerfs for years, it’s really neat.

    thanks for sharing all of that!

    • MentalEdge@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      7 days ago

      The main advantages of Kopia, are speed and destination flexibility.

      The off-site storage does not need to have Kopia installed. It can be a mounted network location, an FTP server. Whatever. A generic cloud storage bucket like Backblaze B2.

      That’s why just a router with and external drive hooked up is able to suffice.

      For all of these, you can connect multiple Kopia instances to that same destination, and each client can browse backups, restore from them, and backup their own files to the destination. It even performs file deduplication across different source device. All while that destination device or service, has no access to your encrypted files.

      With borg, you need something like a Pi that can have borg installed. (You can also do this with Kopia, in which case the Kopia instance on the destination device is also able to manage the backups).

      Kopia also beats borg and restic in speed. My daily backups typically complete within a minute or two. I used to use Duplicati, with which it was common for it to take up to an hour. When it started regularly taking more than an hour, I switched to Kopia.

      Kopia is not the fastest for initial backup. The speed of this varies depending on destination type. It does not compress by default, but you can enable almost any type of compression you want. No, what it is fastest at is updating backups. If there is nothing to update, it does not take forever for it to figure that out. Kopia does it in seconds.

      • selfmate@lemmy.zipOP
        link
        fedilink
        English
        arrow-up
        2
        ·
        7 days ago

        thanks! I installed it and created my first backup. I’ll test it and see how it goes. It looks good. Thank you!

      • selfmate@lemmy.zipOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        7 days ago

        I can’t find anything related to systemd or cron. Does it have its own scheduler? I already set policies. I’m just wondering if I forgot something to setup.

        • MentalEdge@sopuli.xyz
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          7 days ago

          Depends. If you are running it as a service that starts with the system (sudo sysemctl enable kopia should work with most install methods, as kopia comes with a systemd service you only need to enable) then yes, it will use its own scheduler.

          If you want to use your own scheduling, you’d use anything that can execute a command on a schedule.

          • selfmate@lemmy.zipOP
            link
            fedilink
            English
            arrow-up
            1
            ·
            6 days ago

            I couldn’t find a systemd unit or service.

            Kopia will then automatically begin taking the snapshot following the settings you set for the policy. link

            I’m not yet sure about that

            • MentalEdge@sopuli.xyz
              link
              fedilink
              English
              arrow-up
              1
              ·
              edit-2
              6 days ago

              How did you install kopia? What system are you on?

              I’m not yet sure about that

              It needs to be running, if it is, it will follow the policy. Systemd can start it with the system, but you can also start it some other way. Or you can execute snapshots without it constantly running, via cron/script. It’s up to you.

              • selfmate@lemmy.zipOP
                link
                fedilink
                English
                arrow-up
                1
                ·
                4 hours ago

                It’s a fedora server.

                according to kopia’s repo, there is no official systemd service https://github.com/kopia/kopia/issues/2685 and there is none on my system.

                in the past week, it did not backup anything. Hence, there is no scheduler built into kopia automagically as described/ hinted in the docs.

                I just wrote a systemd service and timer and I’ll see if it works. I’m not the best in using systemd. I dislike it, I like cron for it’s simplicity.

                Even if it works then, I wouldn’t recommend it to anyone because info about the scheduler is rare and the docs do not even cover the topic.

                • MentalEdge@sopuli.xyz
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  edit-2
                  3 hours ago

                  Sorry, I must’ve misremembered about systemd. It’s how my installs start up, and the unit file is not in the usual location for systemd units I’ve created myself, so my assumption was it came with Kopia. There is no systemd timer though, and one isn’t needed.

                  Edit: Just confirmed no systemd file came with kopia on my system either, my mistake.

                  in the past week, it did not backup anything. Hence, there is no scheduler built into kopia automagically as described/ hinted in the docs.

                  Was Kopia running during that time?

                  If you run a Kopia command, then it will perform the instructed task, and then exit. It will obviously not do anything after completing whatever command was given, as the process will have exited, leaving no kopia process running on the system. This is for when you use it in cron or your own scripts.

                  The other way of doing things is to run it in server mode kopia server start, which will set it running as a background daemon. When running, it allows you to log into the web interface or configure it via cli to do whatever you like. And as long as the process starts along with the host system, that’s all there is to it.

                  How the daemon is set up to start, doesn’t really matter.