Giter Site home page Giter Site logo

glacier-cli's Introduction

glacier-cli

Simple and lightweight script, that provides command line interface for Amazon Glacier. Now supports creation and deletion of vaults, uploading and downloading folders, . Script creates .zip archive from folder and upload it to vault. ##Configuration First of all you should set parameters of vault and backup. Standart config file on first start looks like that:

AKIAIOSFODNN7EXAMPLE
wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
vault-name|eu-central-1
path_to_folder_for_backup1 | path_to_folder_for_backup2

First two lines are Amazon access key ID and secret key. Then write name of vault and region. Divide them by '|'. After that write paths to folders, that you want to backup. You can write as many paths, as you wish. Divide them by '|'. Next line stores inventory retrieval job id (if it was started).

Next data block is inventory block. After retrieving inventory it stores inventory size and all archives descriptions in format:

name | id | size

Next data block stores retrieveng jobs descriptions, if you initialize downloading from inventory. All subsequent lines are job descriptions in format:

retrieved archive name | job id

Сonfiguration file must always has name "config.f" ##Installation At first downlad all files to one folder. If you want to setup auto-backup every week, then run setup_backup.sh. This script requires boto, so setup_backup.sh will automatically install it, if it was not previously installed. Also it will write itself to cron. Then script will start for first time and create vault. Logs will be written to backup.log file.

##Usage

python sync-glacier.py [-h | -c | -dv | -b | -i | -g | -lv | -lj]
  • -h, --help - manual
  • -c, --create - Create new vault
  • -dv, --delete - Delete vault
  • -b, --backup - Immediately backup data
  • -i, --inventory - Initialize invertory retrieving job
  • -g, --get - Get all archives in vault
  • -lv, --list_vaults - List all vaults
  • -lj, --list_jobs - List all running jobs

Notice that you might have problems with downloading from vault, if you use "Free Tier" data retrieval policy

glacier-cli's People

Contributors

vladsydorenko avatar

Stargazers

 avatar

Watchers

 avatar

glacier-cli's Issues

First_start.py is missing

root@mobile-test:~# git clone https://github.com/Alidal/sync-glacier glacier-backups
Cloning into 'glacier-backups'...
remote: Counting objects: 16, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 16 (delta 5), reused 8 (delta 2), pack-reused 0
Unpacking objects: 100% (16/16), done.
root@mobile-test:~# cd glacier-backups/
root@mobile-test:~/glacier-backups# ls
README.md  config.f  setup_backup.sh  sync-glacier.py
root@mobile-test:~/glacier-backups# nano config.f <- Added config
root@mobile-test:~/glacier-backups# sh setup_backup.sh
setup_backup.sh: 15: setup_backup.sh: Bad substitution
rm: cannot remove `first_start.py': No such file or directory

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.