Search This Blog

Thursday, August 23, 2012

How to mount an Amazon S3 bucket as virtual drive on CentOS 5.2 at A Waage Blog

How to mount an Amazon S3 bucket as virtual drive on CentOS 5.2 at A Waage Blog: "s3fs bucketname -o accessKeyId=XXXXXXXXXXXXXXXXXXXX -o secretAccessKey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX /mnt/s3drive That"


#Note: If you are using CentOS 4, it’s the same general process. You might have more difficulty finding the packages to install fuse and dependencies.
This is a simple guide on how to mount your S3 bucket as a “virtual drive”. This is great for backing up your data to S3, or downloading a bunch of files from S3.
#First, make sure you have the fuse package installed.
#On CentOS, fuse is available from RPMforge
#http://wiki.centos.org/AdditionalResources/Repositories/RPMForge
#Now install fuse
yum install fuse
modprobe fuse
#Download s3fs and make
cd /usr/local/src
wget http://s3fs.googlecode.com/files/s3fs-r191-source.tar.gz
cd s3fs
make
#Copy the binary to /usr/local/bin (or wherever you prefer)
cp s3fs /usr/local/bin
#Make a mount point
mkdir /mnt/s3drive
#Mount your bucket like this:
s3fs bucketname -o accessKeyId=XXXXXXXXXXXXXXXXXXXX -o secretAccessKey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX /mnt/s3drive
That’s it ! You can change directory to your virtual drive or start copying files !
Go ahead and use a visual client such as CyberDuck or S3Hub to verify with your own eyes that this actually worked. :)
Good luck!

No comments:

Post a Comment