26 points · by dawie · 17y ago · 29 comments
As a general rule important data should be backed up to (at least) two separate places, and in this scenario I'd consider S3 to be one place.
If you think the humans at Amazon are somehow above making mistakes or bad decisions, then there is no need to backup your data.
If you don't fully trust the humans at Amazon, and what to be able to have access to your data, on your terms, at any time, you should back it up...
There are already documented cases of Amazon losing data in S3.
The Amazon S3 SLA does not cover data loss at all, only service unavailable situations, which they will cover by crediting you.
http://www.datacenterknowledge.com/archives/2007/10/09/amazo...
And even if all this was not the case you have a responsibility to your customers you can not outsource that responsibility.
I have recommended to some customers that they back up S3 data to the S3 service running in another region. The new export service also provides a way to get physical copies of your data but, depending on how much data you have, it might not be practical.
http://developer.amazonwebservices.com/connect/thread.jspa?t...
Do you need more or do you think that is enough like that ?
We've been here before by the way:
Would love to see REAL documented cases of data loss on Amazon, and anything in the last year would be great too.
Not saying it's infallible, and you should always back up your data (Amazon can't prevent things like natural disasters - this is the point of backing up in general - you can't predict), but if you're going to act like you gave good examples, at least give good examples.
http://sourceforge.net/tracker/index.php?func=detail&aid...
(basically if you have similarly named images, they'll all get deleted with the "Delete AMI parts and deregister" feature)
#!/bin/sh
AWS_ACCESS_KEY_ID=<>
AWS_SECRET_ACCESS_KEY=<>
BUCKET=<>
DIR=<>
S3SYNC=/usr/bin/s3sync.rb
DAYS_TO_KEEP_BACKUPS=30
# colons in path confuse s3sync
DATE=$(date +%F_%H-%M-%S)
NEWEST=$(/bin/ls -r $DIR | grep -v current | head -1)
# copy the newest copy of files into a new directory, creating hardlinks instead of duplicate files
cp -al $DIR/$NEWEST/ $DIR/$DATE/
# sync the s3 bucket against the new directory
$S3SYNC --recursive --make-dirs --delete --no-md5 -v $BUCKET: $DIR/$DATE/ 2>&1 | grep -v 'Could not change owner'
# update the "current" symlink link
test -e $DIR/current && rm $DIR/current
ln -sf $DIR/$DATE $DIR/current
# remove snapshots older than DAYS_TO_KEEP_BACKUPS days
find $DIR -maxdepth 1 -type d -mtime +$DAYS_TO_KEEP_BACKUPS -print0 | xargs -0 --no-run-if-empty rm -rv
Very very important caveat, there. If you have three copies of the data, but all of them are in the same S3 account, a prankster who steals your S3 creds can delete all of them in about ten seconds.
Or, if you make a typing mistake, you can do that to yourself. Boy oh boy, will that be an unhappy day.
Diversify, diversify, diversify.
I lost 1TB of data several months ago due to some backend issues with EBS and S3. Fortunately for me, it was just a backup of a backup of a backup. ;-)
Ultimately, my EBS device become unusable by any operating system, and Amazon support stated that the data was lost due to several backend systems failing.
Would you put all of your eggs in a bookstore who just recently decided to become an egg storage vendor?