我希望使用双重性将我的 linux 服务器备份到 Amazon S3。
我在这里找到了一个很好的资源,它帮助我进行了设置,并且我正在使用为我列出的基本脚本,现在复制到这里:
#!/bin/sh
# Export some ENV variables so you don't have to type anything
export AWS_ACCESS_KEY_ID=[your-access-key-id]
export AWS_SECRET_ACCESS_KEY=[your-secret-access-key]
export PASSPHRASE=[your-gpg-passphrase]
GPG_KEY=[your-gpg-key]
# The source of your backup
SOURCE=/
# The destination
# Note that the bucket need not exist
# but does need to be unique amongst all
# Amazon S3 users. So, choose wisely.
DEST=s3+http://[your-bucket-name]/[backup-folder]
duplicity \
--encrypt-key=${GPG_KEY} \
--sign-key=${GPG_KEY} \
--include=/boot \
--include=/etc \
--include=/home \
--include=/root \
--include=/var/lib/mysql …Run Code Online (Sandbox Code Playgroud)