Skip to content

With this script you can easily backup your files to Amazon S3 paying only $3.70 per TB per month.

Notifications You must be signed in to change notification settings

m-radzikowski/aws-s3-personal-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Personal backup to Amazon S3

Script to easily backup personal files to Amazon S3 paying only $3.70 per TB per month.

See the blog post for the full context and explanation.

Usage

Attention! Usage will incur S3 usage charges.
With default parameters, used storage class is GLACIER, with objects billed for storage for 90 days minimum.

Requirements

Install with Homebrew:

brew install rclone parallel

Provision AWS resources

Deploy CloudFormation stack with the S3 bucket and IAM user:

aws cloudformation deploy --stack-name backupToS3 --template-file stack.yml --capabilities CAPABILITY_IAM

Get the bucket name and IAM user name from the CloudFormation Outputs in AWS Console.

Go to the IAM, open that user details, and create an access key in the "Security credentials" tab.

Setup rclone

Configure rclone by running rclone config or manually editing configuration file (~/.config/rclone/rclone.conf):

[backup]
type = s3
provider = aws
env_auth = false
access_key_id = xxxxxx
secret_access_key = xxxxxx
acl = private
region = eu-west-1

Provide generated IAM user credentials for access_key_id and secret_access_key.

Run script

To backup directory as a single archive:

./backup.sh --bucket backuptos3-backupbucket-xxxxxxxxxxxxx --name my_disk --path /mnt/disk0

To backup each subdirectory as a separate archive:

./backup.sh --bucket backuptos3-backupbucket-xxxxxxxxxxxxx --name my_disk --path /mnt/disk0 --split-depth 1

Use ./backup.sh --help for more info.

About

With this script you can easily backup your files to Amazon S3 paying only $3.70 per TB per month.

Topics

Resources

Stars

Watchers

Forks

Languages