Setup a Backup Folder on Ubuntu using Amazon S3

Primary tabs

These instructions show you how to use s3fs to have a path on your Ubuntu server that keeps data on Amazons S3 solution. This can be used as a backup path, so any files added here are stored on a remote file system.

The first step is to create a bucket in your Amazon S3 account and get the security credentials. It is suggested to use IAM to create a user with limited access to Amazon Account features.

Download an install s3fs. This assumes the latest version is 1.64 - but you should check and change the version as required (here)

apt-get install build-essential libfuse-dev fuse-utils libcurl4-openssl-dev libxml2-dev mime-support
wget http
://s3fs.googlecode.com/files/s3fs-1.64.tar.gz
tar xvzf s3fs*.tar.gz
cd s3fs
-*
./
configure --prefix=/usr
make
&& make install

Create the following file

vim /etc/passwd-s3fs

and add the following contents (replace with your own values!)

bucketName:accessKeyId:secretAccessKey

Change the permissions

chmod 640 /etc/passwd-s3fs

Next, create the following file

vim /etc/init.d/s3backup

With these contents (replace the bucket name and destination with your own values). The Destination path is simply an empty folder anywhere in your file system - just like you would mount any drive.[

#! /bin/sh
# /etc/init.d/s3backup
|#
bucketName='YOURBUCKETNAME'
mountDestination='ABSOLUTE DESTINATION FOLDER'

case "$1" in
mount
)
     echo "mounting '$bucketName' to '$mountDestination'"
     /usr/bin/s3fs -o allow_other $bucketName $mountDestination
     
;;
unmount)
     echo "unmounting '$bucketName' from '$mountDestination'"
     umount s3fs
     
;;
*)
     echo "Usage: /etc/init.d/s3backup {mount|unmount}"
       exit 1 
    
echo "Usage: /etc/init.d/s3backup {mount|unmount}"
   ;;
esac

And run the following commands

chmod 755 /etc/init.d/s3backup
update
-rc.d -f s3backup defaults
This make it executable and makes it into a startup script respecively.

Your IP Info

IP Address Locator

Speed Test

Test how fast your Internet connection really is.

DropBox

Use this link to get DropBox http://db.tt/iQHWaaF