How would or do you backup your home server? I don’t have enough physical storage (for now) at home to store some backups, so I want to upload it to the cloud. Of course I want the backup to be encrypted, but I don’t want to enter the password every time by server does a backup. I am currently using borg on my PC and do it manually. How do I create a encrypted backup without entering the key manually? Do I hardcode it somewhere? Don’t really like that. I am also fine with trying other backup software.

  • chameleon@fedia.io
    link
    fedilink
    arrow-up
    17
    ·
    7 days ago

    Borg or the like with ‘hardcoded’ plaintext/regularly full-disk-encrypted key is acceptable. Someone that has your unencrypted private key sitting on your server has almost certainly already obtained access to the entire set of data you’re backing up, with the backup key itself only meaningfully guarding access to older backups.

    The more important thing is to securely keep extra copies in case the server fails. I keep mine in a group in my password manager, one per repo.

  • dan@upvote.au
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    7 days ago

    I use Borgbackup, with borgmatic to configure and periodically run it. I have two storage VPSes “in the cloud”, and back up to both of them. My main storage VPS is a HostHatch one with 10TB space for $10/month. I got it during Black Friday sales in 2021.

    If you do back up to multiple destinations, Borgbackup’s devs recommend configuring two separate backups, rather than doing a backup to one server then syncing it to the second one. This is to handle the case where one of the backups becomes corrupted.

    Hetzner have decent deals on their “storage boxes”. You don’t get root access, but they support Borgbackup, restic and rclone in addition to the regular protocols (SFTP, FTPS, WebDAV, SMB).

    Make sure you configure the SSH key to only allow it to run borgbackup in “append only” mode, so that malware/ransomware on the client system can’t delete the backups. This is a common issue with other backup solutions like rsync - the client has full access to the server, so a malicious user/code could delete the whole backup.

  • conrad82@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    7 days ago

    I run proxmox, and proxmox backup server in a vm. PBS backup is encrypted locally, and I upload the backup to backblaze b2 using rclone in a cron job. I store the decryption key elsewhere

    It has worked ok for me. I also upload a heartbeat file, it is just a empty file with todays date (touch heartbeat), so that I can easily check when the last upload happened

  • Nick@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 days ago

    For servers autorestic just worked. It’s a wrapper for restic. I sent data to backlaze B2 and StorJ. Now that I have a couple proxmox hosts in a colo, I have an off-site PBS running in ZFS.rent.

    First VMs back up to local PBS , then nightly that’s synced to ZFS.rent. I have PVE set to do encrypted backups to PBS so it’s all encrypted.

  • CaptainPedantic@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 days ago

    I use Kopia to backup to Backblaze B2. I also use the Kopia UI since I can’t be bothered to figure out the cli for it. I have it running constantly in the background so it automatically takes care of everything.

  • 0x0@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 days ago

    I use a cryptomator mount and sync that to whichever cloud i want, but the un/mounting is manual.
    If you need full disk encryption look at ZFS and snapshots.
    Do you need to backup everything on the disk?

  • PetteriPano@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    7 days ago

    I have a storagebox at hetzner. My script does:

    • Mount the storagebox over sshfs with public key file
    • Mount a gocryptfs folder, with supplied key on local file
    • Rsync my stuff to the encrypted folder
    • Unmounts in reverse order

    I can access the storagebox by password, too. So this is my disaster recovery in case my house burns down with all my devices. I’ll just buy another laptop the next day, and me and the Mrs can admire all my code and our wedding videos within a few hours.

  • sznowicki@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 days ago

    Check Borg documentation. Somewhere there there’s a way to pass the password as an environmental variable.

  • geography082@lemm.ee
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    6 days ago

    Duplicati, has many cloud providers as destination. Encryption. Basic backup tools functionalities. I use Onedrive family plan which has a total of 6 TB for my backups. Other solid option is rclone , it does the same even more, but is more focused on sync than backup. Also many cloud providers supported. Both are Foss

    • soisoy@lemm.ee
      link
      fedilink
      English
      arrow-up
      4
      ·
      6 days ago

      I had constant problems with duplicati and switched to kopia with backblaze and it has been problem free, so I would tread very carefully with it. The database would work for a while and then get into a state that required a reset and would not have permitted a successful backup to be restored.

      • geography082@lemm.ee
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        2 days ago

        I had constant problems with duplicati

        Yes i know, i had them too, and serious ones. It needs to always have an eye on it. I choose it because the large amount of cloud storage supported natively, and not have to configure and deal with rclone or even + restic to do a backup in home products like Onedrive. For me that’s more noise and issues.

    • MangoPenguin@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 days ago

      Backrest (restic) is what I use after constant duplicati problems. Kopia is also a good option.

      Duplicati is ok with tiny backup sets, but give it multiple TB of data and it chokes and constantly has errors requiring expensive rebuilds.

  • just_another_person@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    7 days ago

    It’ll cost you more storing it in cloud than just buying more drives. If you’re already in a spot where that’s a problem, this is not a solution for you.

    • Linsensuppe@feddit.orgOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      7 days ago

      Yes, but I use the cloud for other purposes too and have enough storage for a backup, also even if I were to buy another drive, I would like to store one copy offsite without having to buy two drives

      • just_another_person@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        7 days ago

        I’d calculate your total cost then, and figure out ingress and egress costs depending on the provider. Cloudflare with R2 is the only “cloud” storage service I’m aware of that doesn’t charge for either right now. They may in the future so check out your costs.

        • dan@upvote.au
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          7 days ago

          is the only “cloud” storage service I’m aware of that doesn’t charge for either right now

          Hetzner doesn’t either for their storage boxes. They support Borgbackup, restic, rclone, SFTP, FTPS, WebDAV and SMB.

          Most storage VPSes will include a decent amount of traffic per month.

      • doodledup@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        7 days ago

        If you want I can hit you up with a couple TB S3 compatible block storage against a small compensation covering electricity. I’ve got about 30TB available of my 64TB that are just doing nothing right now, it’s a shame really. I’m running a TrueNAS homelab in a RaidZ2 with battery backup and proper Firewall and IDS/IPS protection (but I’m not a professional). If that’s fine DM me.