s3fs

Tags: aws, backup, s3,

Added: 2024-07-03T00:00

s3fs

For essentially unlimited backup space, Amazon S3 is fast and cheap. To store 10 GB for one month will cost you $0.04 in the Glacier Instant Retrieval tier.

A nice way of interfacing with S3 is by using s3fs. This lets you mount a bucket as part of your Linux filesystem. Then you can copy files to and from S3 as if they were local except more slowly (unless your network connection is faster than your local filesystem!)

Your Linux distribution should have a package already made.
You can mount a bucket using the following

s3fs BUCKETNAME /path/to/mount/s3fs/ -o passwd_file=${HOME}/.passwd-s3fs -o url=https://s3.REGION.amazonaws.com/ -o dbglevel=info -f -o curldbg

(For some reason, I need the -o url= option, although I don't think I should. Anyway, it works well.)
Once that is working, you can remove the debug options.

.passwd-s3fs is just a 600 file containing YourAccessKeyId:YourSecretAccessKey.

It's probably wise to create a dedicated IAM user and only grant it access to that specific bucket. I have created a simple script to automate it all.

When you create your bucket, you can also specify things like versioning, KMS keys, object lock, ACLs/making it public, etc
Posted by Calum on 2024-07-03T00:00 under: aws, backup, s3,
Add a comment

Your IP:
Please enter 8943779 here: