Backup with Duplicati and Minio
30 Aug 2017With Crashplan’s announced deprecation of Home services, I set up Minio on my various endpoints, exposed the port to relevant subnets, and set up peer-to-peer backup.
My requirements:
- Low cost.
- Scalable storage options, ability to add more drives as needed.
- Peer-to-peer backup across various sites.
- Snapshot capabilities.
- On-premise encryption.
- Cross-platform backup client.
Software:
- Client: Duplicati snapshots data and is free.
- Storage for backups: Minio Server exposes an s3-compatible storage endpoint which runs on a variety of OSes.
- Storage TLS certificate: Concert can be used to get a letsencrypt certificate for your s3-compatible endpoint. You should probably compile from source instead of using the binaries.
Server Configuration (example):
- Minio supports erasure coding/checksums to be resilient against bitrot and drive failures. So directly expose disks (without RAID) on a Windows server. Minimum 4 disks, even numbers, and up to 12 disks are currently supported.
- Configure 4 storage drives as E:, F:, G: and H:. (You may wish to mount the disks in directory-mountpoints, but that’s left as an exercise to the reader.)
- Download Minio, and NSSM to run Minio as a service on a Windows server. In the example below, drop these binaries in c:\minio\ then execute:
nssm install minio-backup-storage c:\minio\minio.exe nssm set minio-backup-storage AppDirectory c:\minio nssm set minio-backup-storage AppParameters server --config-dir c:\minio\config e:\minio-storage f:\minio-storage g:\minio-storage h:\minio-storage
- Forward port 443 to port 9000 on this server (NAT).
- Open config.json in c:\minio and note the accessKey and secretKey.
- Confirm that you can log in at http://serverip:9000/ with the accessKey and secretKey.
Enable TLS encryption with Let’s Encrypt (example 1):
- Point s3.yourdomain.com to the machine running minio.
- Grab Concert and drop this binary in the same location.
- Set concert to run as a service as well:
nssm install minio-cert c:\minio\concert_windows_amd64.exe nssm set minio-cert AppDirectory c:\minio nssm set minio-cert AppParameters server --dir "c:\minio\config\certs" myemailaddress@domain.com "s3.yourdomain.com"
- Forward tcp 80 to this server to allow it to renew certificates.
Client Configuration:
- Install Duplicati.
- Add the backup, select s3-compatible. Using the web interface, click Advanced and select “s3-ext-forcepathstyle” while configuring the location 2.
- #profit.
-
https://docs.minio.io/docs/generate-let-s-encypt-certificate-using-concert-for-minio ↩
-
https://forum.duplicati.com/t/connecting-to-minio-via-custom-url/245/6 ↩