将数据备份至backblaze

开通B2C服务:

Account » My Settings » Enabled Products: B2 Cloud Storage (勾选)

获取账号的App Keys:

B2 Cloud Storage » App Keys » Generate New Master Application Key (你会获取到 keyID & Application Key)

新建bucket:

2.1 restic

restic是一个GO写的snapshot备份工具,支援Linux 、 Windows平台,下指令方式备份资料,也支持加密资料.

# install
sudo apt install restic -y
# keys
export B2_ACCOUNT_ID=58167cxxx
export B2_ACCOUNT_KEY=002859d8a3xxxxxxxxxxxx
# init
restic -r b2:mrco-archive:bak init
# backup
restic -r b2:mrco-archive:bak backup /bak/
# snapshot
restic -r b2:mrco-archive:bak snapshot
# restore
restic -r b2:mrco-archive:bak restore [snapshot-id|latest] --target=/bak

2.2 duplicity

备份:

duplicity ~ b2://[keyID]:[application key]@[B2 bucket name]

恢复:

duplicity restore --file-to-restore [folder name from backup] b2://[keyID]:[application key]@[B2 bucket name] [restore path]
  • linux/others/backblaze备份数据.txt
  • 最后更改: 2019/09/12 23:51
  • 由 mrco