Put an archive, directory or file on S3 using s3bck and s3cmd
- Create an Amazon S3 account
- Install and configure s3cmd
- Download s3bck
- Make the file executable
1. Create an Amazon S3 account Amazon S3
Go to Amazon S3 homepage, click on the "Sign up for web service" button in the right column and work through the registration. You will have to supply your Credit Card details in order to allow Amazon charge you for S3 usage. At the end you should posses your Access and Secret Keys.
Install s3cmd on your server
$ apt-get install s3cmd
And configure it
$ s3cmd --configure
$ cd /usr/local/bin
$ wget https://raw.github.com/Akiletour/s3bck/master/s3cmd
$ sudo chmod +x /usr/local/bin/s3bck
Example : I want to backup /var/www/inrage and put it on Amazon S3 in my bucket "inrage/backup"
$ s3bck /var/www/inrage
- Compress the file (Y/n) ? y
- Archive name ([ARCHIVE-NAME]_201311091923.tar.gz): inrage
COMPRESSING FILE TO TAR
- Target S3 (BUCKET/DIRECTORY): inrage/backup
inrage_201311091923.tar.gz -> s3://inrage/backup/inrage_201311091923.tar.gz [1 of 1]
128378 of 128378 100% in 1s 80.27 kB/s done
REMOVING THE TEMPORARY FILE
SUCCESS: inrage_201311091923.tar.gz to s3://inrage/backup/inrage_201311091923.tar.gz
s3bck is a inRage initiative. Created by Pascal GAULT.
Issues and feature requests are tracked in the Github issue tracker.