Giter VIP home page Giter VIP logo

aws-s3-personal-backup's Introduction

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.

aws-s3-personal-backup's People

Contributors

m-radzikowski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

aws-s3-personal-backup's Issues

Script fails on Windows machine

When running this script on a Windows machine, the use of GNU's parallel causes the script to fail.
./backup.sh: line 188: parallel: command not found

Enhance script with config password argument

When running the script with rclone configuration being password protected, this password is requested for each sub-directory upload. Allowing this to be passed in as a argument will solve this

Enhance script with filename excludes

Many filesystems will generate metadata filetypes that summarise content, provide thumbnails etc and this will cause a hash change and therefore a needless sync of the archive file. If there was the option of filtering out files by filename then these system files could be added. It might even be worth adding pre-configured lists for each major platform as that will prevent every user from having to build their own each time

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.