restic 是基于golang 编写的快速,安全,可靠的数据备份工具,使用简单,同时支持多种后端存储
version: ‘3.7‘
services:
sidekick:
image: dalongrong/sidekick:v0.1.8
tty: true
ports:
- "80:80"
command: --health-path=/minio/health/ready --address :80 http://minio{1...4}:9000
gateway:
image: minio/minio:RELEASE.2020-04-04T05-39-31Z
command: gateway s3 http://sidekick
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
ports:
- "9000:9000"
minio1:
image: minio/minio:RELEASE.2020-04-04T05-39-31Z
volumes:
- data1-1:/data1
- data1-2:/data2
ports:
- "9001:9000"
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
MINIO_BROWSER: "off"
command: server http://minio{1...4}/data{1...2}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
minio2:
image: minio/minio:RELEASE.2020-04-04T05-39-31Z
volumes:
- data2-1:/data1
- data2-2:/data2
ports:
- "9002:9000"
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
MINIO_BROWSER: "off"
command: server http://minio{1...4}/data{1...2}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
minio3:
image: minio/minio:RELEASE.2020-04-04T05-39-31Z
volumes:
- data3-1:/data1
- data3-2:/data2
ports:
- "9003:9000"
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
MINIO_BROWSER: "off"
command: server http://minio{1...4}/data{1...2}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
minio4:
image: minio/minio:RELEASE.2020-04-04T05-39-31Z
volumes:
- data4-1:/data1
- data4-2:/data2
ports:
- "9004:9000"
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
MINIO_BROWSER: "off"
command: server http://minio{1...4}/data{1...2}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
volumes:
data1-1:
data1-2:
data2-1:
data2-2:
data3-1:
data3-2:
data4-1:
data4-2:
export AWS_ACCESS_KEY_ID=minio
export AWS_SECRET_ACCESS_KEY=minio123
restic -r s3:http://localhost/backup init
效果
restic -r s3:http://localhost/backup backup ./
效果
restic -r s3:http://localhost/backup snapshots
效果
restic -r s3:http://localhost/backup ls 875a2a32
效果
restic -r s3:http://localhost/backup restore 875a2a32 -t ./
效果
restic 是一个很不错的数据备份方案,rclone是一个不错的数据同步方案,以及minio作为数据存储,集成在一起真的很不错
https://restic.readthedocs.io/en/stable/
https://github.com/restic/restic
https://github.com/rongfengliang/minio-cluster-sidekick-learning
原文:https://www.cnblogs.com/rongfengliang/p/12639794.html