Synology HyperBackup to self-hosted Minio S3 on Raspberry Pi
Synology HyperBackup is a great tool to backup your NAS Apps and data to various destinations. One of them is Amazon S3, that includes to a compatible S3 storage like Minio, with a free Community license that you could use to backup your NAS at home.
Why we need to backup the Synology?
Synology is not just a NAS to store files. It also runs Apps like Photos, Chat, Contacts and even a Mail server. Just backup the files on Shared Folders are not enough to restore your Synology Apps. If your Synology box goes down or got corrupted database, you will need to use HyperBackup to keep point-in-time copies of your Apps. For my home setup, I use it to backup:
Pre-requisites
Nginx Proxy Manager
It helps managing the free Let's Encrypt SSL cert for your domain and redirect the traffic to a specific port on your internal Minio instance on Docker. The setup will look like below. Note that translated Scheme is http, meaning that you do not need to handle SSL certs on your Minio.
Docker / Portainer / Minio on Raspberry Pi4B
In Portainer -> Stack -> New Stack. Give it a name and paste the code into the Web editor, then click Deploy the Stack at bottom of screen. After the stack deployed, you should see the container running and have the 5001:9001 mapping link to the login screen.
version: '2'
services:
minio:
image: quay.io/minio/minio:latest
ports:
- '5000:9000'
- '5001:9001'
environment:
- "MINIO_ROOT_USER=your_user_name"
- "MINIO_ROOT_PASSWORD=your_password"
volumes:
- '/mnt/usb240g:/data'
command: server /data --console-address ":9001"
Once you have login Minio, you will need to create a bucket and a user for HyperBackup. On creating the bucket, just give a name and save, advanced features are not available on a stand-alone Minio setup. Versioning is handled by Hyperbackup, so you don't need storage level versioning.
To create a user, mostly important thing is assgining readwrite policy to the user that allows it to read/write to your buckets.
Synology HyperBackup Settings
After setting up bucket and user in Minio, you can start to setup HyperBackup. The key step is Backup Desintation Settings, if you Browse the Bucket name and it gives you a list, meaning the minio and nginx proxy manager settings work! Choose the bucket you want to use and HyperBackup will propose a directory name for you.
Apart from Synology Apps, you may select Shared Folders to backup also. On Application backup, select the Apps running on your Synology to setup.
On Rotation Settings, it is recommended to enable backup rotation, as it keeps backup versions for you with very small increment of backup storage because Hyperback only backup the differences.
You may check the backup statistics after the backup is done. You can even setup alerts if there is excessive growth on backup storage.
On comparing Destination and Source disk usage, you can see 5.33GB turns into backup of 3.83GB. The space saving is resulted from the built-in compression feature of Hyperbackup.
Backup Explorer button enables restore ANY file or Apps at any point-in-time your backup carried out.
Amazing for a backup feature comes in FREE with a Synology box, right? Even an entry level model like DS220j can also run Hyperbackup. Check out the official compatibility list.