Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Amazon S3 backup for OS6
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2015-04-02
06:57 PM
2015-04-02
06:57 PM
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:
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:
The content needs to be the credentials provided by Amazon (don't disclose this to anyone!). It is of the form:
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:
To test:
For example:
You can also optionally add a line in /etc/fstab to mount your bucket:
NOTE THE ABOVE WILL ACCESS S3 USING INSECURE HTTP.
If you want to access your S3 storage using HTTPS, use:
(manual mount):
(auto mount):
You can unmount the Amazon S3 bucket using:
And for backup using rsync from the command line (for example, of my subversion repository):
Backup using frontview is, at present, a step too far.
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
Labels:
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2015-04-30
05:02 AM