June 19, 2012 by Arvind Das
Amazon S3 bucket are containers for objects (the files you store on s3). I would explain how to make back up of your files from EC2 machine to amazon s3 bucket.
- Create a S3 account. If you already have an account ,move to step two. Else click here
- Download your aws access key and aws secret access key.
- You can download them from your security credentials menu.
- Now download and install s3fs. You can Download
- Install these prerequisites before installing.
yum install gcc yum install libstdc++-devel yum install gcc-c++ yum install fuse yum install fuse-devel yum install curl-devel yum install libxml2-devel yum install openssl-devel yum install mailcap
- Unzip the downloaded s3fs-1.61.tar.gz and follow steps further
tar xvzf s3fs-1.61.tar.gz cd s3fs-1.61/ ./configure --prefix=/usr make make install (as root)
- Change its mode as “chmod 600 ~/.passwd-s3fs “ so that no other group has access to it.
- save and exit
- To mount your S3 bucket run
s3fs -o allow_other bucket_name /mnt/your_directory_name
rsync -av /you_directory_path_to_files /mnt/your_directory_name
- Download Latest Fuse
tar xvzf fuse-2.8.6.tar.gz cd fuse-2.8.6 ./configure –prefix=/usr make make install
If it runs clean, OK
Else it may show an error
FATAL: Could not load /lib/modules/126.96.36.199-xenU/modules.dep: No such file or directory
tar xvf ec2-modules-188.8.131.52-xenU-x86_64.tgz cd lib/modules cp -r * /lib/modules/