-
-
Save adinata-id/d90a664c0d30026fe0dc9b1ab08833fb to your computer and use it in GitHub Desktop.
A simple backup script written by https://levels.io/backup-linode-digital-ocean-vps-amazon-s3/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo 'Started' | |
date +'%a %b %e %H:%M:$S %Z %Y' | |
s3cmd sync --recursive --preserve /srv s3://nameofyours3bucket | |
s3cmd sync --recursive --preserve /etc s3://nameofyours3bucket | |
s3cmd sync --recursive --preserve /home s3://nameofyours3bucket | |
s3cmd sync --recursive --preserve /var s3://nameofyours3bucket | |
dpkg --get-selections > dpkg.list | |
s3cmd sync --recursive --preserve dpkg.list s3://nameofyours3bucket | |
date +'%a %b %e %H:%M:$S %Z %Y' | |
echo 'Finished' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment