Backup Minio to local filesystem with periodic backups and rotate backups.
600
Backup Minio to local filesystem with periodic backups and rotate backups.
It can backup multiple buckets by setting all bucket names in MINIO_BUCKET separated by comas or spaces.
Docker:
$ docker run \
-v /mnt/data:/data \
-v /mnt/backups:/backups \
-e MINIO_DIR=/data \
-e MINIO_BUCKET=bucketname \
leikir/minio-backup-local
Docker Compose:
version: '2'
services:
minio:
image: minio/minio
restart: always
command: server /data
volumes:
- /mnt/data:/data
minio-backup:
image: leikir/minio-backup-local
restart: always
volumes:
- /mnt/data:/data
- /mnt/backups:/backups
depends_on:
- minio
environment:
- MINIO_DIR=/data
- MINIO_BUCKET=bucketname
- SCHEDULE=@daily
- BACKUP_KEEP_DAYS=7
- BACKUP_KEEP_WEEKS=4
- BACKUP_KEEP_MONTHS=6
- HEALTHCHECK_PORT=80
By default it makes daily backups but you can start a manual one by running the command /backup.sh.
Example running only manual backup on Docker:
$ docker run \
-v /mnt/data:/data \
-v /mnt/backups:/backups \
-e MINIO_DIR=/data \
-e MINIO_BUCKET=bucketname \
leikir/minio-backup-local /backup.sh
You can change the SCHEDULE environment variable like -e SCHEDULE="@daily" to change its default frequency, by default is daily.
More information about the scheduling can be found here.
Folders daily, weekly and monthly are created and populated using hard links to save disk space.
Content type
Image
Digest
Size
28.4 MB
Last updated
over 7 years ago
docker pull leikir/minio-backup-local:RELEASE.2019-01-16T21-44-08Z