Created
September 8, 2015 11:32
-
-
Save iamkingsleyf/58b8b462d225e13bfd91 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 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