I just started getting into self hosting using docker compose and I wonder about possible backup solutions. I only have to safe my docker config so far, but I want host files as well. What software and hardware are you using for backup?

  • RxBrad@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    Rsnapshot to an external USB drive.

    Probably not the best, but it works for my little 6TB OpenMediaVault server with some Docker thrown in.

  • Sam@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    raid1 + data duplication

    Photos, videos, music, documents, etc… are available on multiple devices using SyncThing.

        • tables@kbin.social
          link
          fedilink
          arrow-up
          0
          ·
          1 year ago

          It’s not pedantry, it’s just that RAID and instant data duplication or synchronization aren’t meant to protect you from many of the situations in which you would need a backup. If a drive fails, you can restore the information from wherever you duplicated the data to. If, however, your data is corrupted somehow, the corruption is just duplicated over and you have no way to restore the data to a state before the corruption happened. If you accidentally delete files you didn’t want to delete, the deletion is replicated over and, again, no way to restore them. RAID wasn’t built to solve the problems a backup tries to solve.

        • lynny@lemmy.world
          link
          fedilink
          English
          arrow-up
          0
          ·
          1 year ago

          If a program screws up and crashes while writing data to your drive, it can take out more than just the data it was dealing with. RAID will simply destroy data on both your drives at the same time, making any data recovery impossible.

  • thejevans@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    Thanks! I just started setting up NixOS on my laptop and I’m planning to use it for servers next. Saving this for later!

  • jakoma02@czech-lemmy.eu
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    So far I have had good experience with kopia. But it is definitly less battle-tested than the other alternatives and I do not use it for too critical stuff yet.

    • neardeaf@lemm.ee
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      Seconding this. On my unRAID host, I run a docker container called “Vorta” that uses Borg as its backend mechanism to backup to my SynologyNAS over NFS. Then on my Syno, run two backup jobs using HyperBackup, one goes to my cousin’s NAS connected via a Site-to-Site OpenVPN connection on our edge devices (Ubiquity Unifi Security Gateway Pro <-> UDM Pro), the other goes to Backblaze B2 Cloud Storage.

      OP, let me know if you need any assistance setting something like this up. Gotta share the knowledge over here on Lemmy that we’re still used to searching evil Reddit for.

        • neardeaf@lemm.ee
          link
          fedilink
          English
          arrow-up
          0
          ·
          1 year ago

          Niiiice, quick question, are both of y’all running the latest UniFi Controller version & using the new WebUI view layout?

          • PlutoniumAcid@lemmy.world
            link
            fedilink
            English
            arrow-up
            0
            ·
            1 year ago

            His gear is v7 (Unifi and also Synology DSM) and I am still on v6 because I didn’t have a good reason to upgrade. If it works, don’t fix it, you know? Feature-wise there the same anyway just different UI. But sure, give me a good reason to upgrade, and I will :)

  • hitagi@ani.social
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    A lot of services have some kind of way to create backup files. I have cronjobs doing that daily then uploading it to some cloud storage with rclone.

  • WxFisch@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    Backblaze B2. Any software that is S3 compatible can use B2 as the target and it’s reasonably priced for the service. I backup all the PCs and services to a Synology NAS and then backup that to B2 (everything except my Plex media, that would be pricy and it’s easy enough to re-rip from disc if needed).

  • stown@sedd.it
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    I host everything on Proxmox VM’s so I just take daily snapshots to my NAS

  • thisbenzingring@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    veeam is pretty simple and powerful, the community version is free if you are only using it for a small environment (CPU cores is what it counts)

    I havn’t used it for docker but it says it is supported

    • vairfoley@reddthat.com
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      I use Veeam to backup shares on my NAS to rotated external drives. I also backup a Linux server.

  • DataDreadnought@lemmy.one
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    I doubt your using NixOS so this config might seem useless but at its core it is a simple systemd timer service and bash scripting.

    To convert this to another OS you will use cron to call the script at the time you want. Copy the part between script=“” and then change out variables like the location of where docker-compose is stored since its different on NixOS.

    Let me explain the script. We start out by defining the backupDate variable, this will be the name of the zip file. As of now that variable would be 2023-07-12. We then go to each folder with a docker-compose.yml file and take it down. You could also replace down with stop if you don’t plan on updating each night like I do. I use rclone to connect to Dropbox but rclone supports many providers so check it out and see if it has the one you need. Lastly I use rclone to connect to my Dropbox and delete anything older than 7 days in the backup folder. If you end up going my route and get stuck let me know and I can help out. Good luck.

    systemd = {
          timers.docker-backup = {
            wantedBy = [ "timers.target" ];
            partOf = [ "docker-backup.service" ];
            timerConfig.OnCalendar= "*-*-* 3:30:00";
          };
          services.docker-backup = {
            serviceConfig.Type = "oneshot";
            serviceConfig.User = "root";
            script = ''
            backupDate=$(date  +'%F')
            cd /docker/apps/rss
            ${pkgs.docker-compose}/bin/docker-compose down
    
            cd /docker/apps/paaster
            ${pkgs.docker-compose}/bin/docker-compose down
    
            cd /docker/no-backup-apps/nextcloud
            ${pkgs.docker-compose}/bin/docker-compose down
    
            cd /docker/apps/nginx-proxy-manager
            ${pkgs.docker-compose}/bin/docker-compose down
    
            cd /docker/backups/
            ${pkgs.zip}/bin/zip -r server-backup-$backupDate.zip /docker/apps
    
            cd /docker/apps/nginx-proxy-manager
            ${pkgs.docker-compose}/bin/docker-compose pull
            ${pkgs.docker-compose}/bin/docker-compose up -d
    
            cd /docker/apps/paaster
            ${pkgs.docker-compose}/bin/docker-compose pull
            ${pkgs.docker-compose}/bin/docker-compose up -d
    
            cd /docker/apps/rss
            ${pkgs.docker-compose}/bin/docker-compose pull
            ${pkgs.docker-compose}/bin/docker-compose up -d
    
            cd /docker/no-backup-apps/nextcloud
            ${pkgs.docker-compose}/bin/docker-compose pull
            ${pkgs.docker-compose}/bin/docker-compose up -d
    
            cd /docker/backups/
            ${pkgs.rclone}/bin/rclone copy server-backup-$backupDate.zip Dropbox:Server-Backup/
            rm server-backup-$backupDate.zip
            ${pkgs.rclone}/bin/rclone delete --min-age 7d Dropbox:Server-Backup/
            '';
          };
        };
    
    
    • thejevans@lemmy.ml
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      Thanks! I just started setting up NixOS on my laptop and I’m planning to use it for servers next. Saving this for later!

  • Rosco@pawb.social
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    On Proxmox, I use the built-in system + storing it to my Synology NAS (RS1221+). I use Active Backup for business (filesync) to back up the Proxmox config files, and also backup the husband’s PC and my work PC.