× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Amazon S3 backup for OS6

quickly_now
Apprentice

Amazon S3 backup for OS6

A long time ago, I got S3 backup working on a Duo, and then later an NVX.

This all worked using the S3FS package and the FUSE filesystem.

So I want the same on my new RN314 running OS6.2.2.

This seems to have the FUSE filesystem support already there, so here is what I have done.

(As a side note: S3FS on google code was moved to github in 2013. The google code stuff is still there. The newer code in github seems to have moved on so much that it uses autogen, and has some stack of dependancies such that I've given up trying to use it until a later time. So this is all based on the now-quite-old code at googlecode.com).

First an acknowledgement: much of this comes from here: http://www.glaurent.com/fr/howto/readynas#s3. However did fond those instructions to be a little incomplete.

Specifically, packages pkg-config and libcrypto are not installed, but are needed. (Libcrypto is supplied in package libssl-dev. Go figure.)

So:


cd /usr/local/src
mkdir s3fs
cd s3fs
apt-get install build-essential libfuse-dev fuse-utils libcurl4-openssl-dev libxml2-dev mime-support pkh-config libssl-dev
wget http://s3fs.googlecode.com/files/s3fs-1.74.tar.gz
tar xvzf s3fs-1.74.tar.gz
cd s3fs-1.74
./configure --prefix=/usr
make
make install


Optionally (for non root users) edit the file /etc/fuse.conf, and uncomment #user_allow_other, by removing the leading # only.

Create a new file to store your Amazon S3 credential:

vi /etc/passwd-s3fs
chmod 640 /etc/passwd-s3fs


The content needs to be the credentials provided by Amazon (don't disclose this to anyone!). It is of the form:

# Access Key ID:Secret Access Key ID
xxx:xxx


Create the directory to mount the bucket. I prefer to use /s3 (rather than the suggested /mnt/s3) because sometimes other things or applications will use /mnt as a mount point, and then either that would fail or your mount point /mnt/s3 would become invisible. So:

mkdir /s3


To test:

s3fs <your bucket name> <mountpoint>


For example:

s3fs fred_bloggs /s3


You can also optionally add a line in /etc/fstab to mount your bucket:

s3fs#<your bucket name> /s3 fuse 0 0


NOTE THE ABOVE WILL ACCESS S3 USING INSECURE HTTP.

If you want to access your S3 storage using HTTPS, use:

(manual mount):
s3fs fred_bloggs /s3 url=https://s2.amazonaws.com


(auto mount):
s3fs#<your bucket name> /s3 fuse url=https://s2.amazonaws.com 0 0


You can unmount the Amazon S3 bucket using:

umount /s3


And for backup using rsync from the command line (for example, of my subversion repository):

rsync -a --delete -v -m /data/.svn /s3


Backup using frontview is, at present, a step too far.
Message 1 of 2
bartw
Aspirant

Re: Amazon S3 backup for OS6

Nice one, thanks !
Message 2 of 2
Top Contributors
Discussion stats
  • 1 reply
  • 5195 views
  • 1 kudo
  • 2 in conversation
Announcements