restic 备份工具

  yum install bash-completion -y
  restic generate --bash-completion /etc/bash_completion.d/restic
请运行以下命令并输入相同的密码两次
restic -r sftp:192.168.0.31:/srv/restic-repo init
运行以下命令,然后再次输入您在上方选择的存储库密码
restic -r sftp:192.168.0.31:/srv/restic-repo backup /opt/work
restic -r sftp:192.168.0.31:/srv/restic-repo snapshots
需要还原的快照id和还原位置
restic -r sftp:192.168.0.31:/srv/restic-repo restore id --target /tmp/h
export RESTIC_REPOSITORY=sftp:192.168.0.31:/srv/restic-repo
export RESTIC_PASSWORD=123123