Giter VIP home page Giter VIP logo

sync-glacier.py's Introduction

sync-glacier.py

This is a fork of https://github.com/bitsofpancake/sync-glacier.py which didn't work with PDF files

In addition, it will update a Mysql database with Glacier archive details (see below for schema)

A Python script to easily sync a directory with a vault on Amazon Glacier. This makes it easy to upload a directory of backups, for example, into a vault. This script requires boto (see their instructions on how to install it) and PyMSQL

pip install pymysql

To use sync-glacier.py, first edit sync-glacier.py and put in your Amazon Web Services credentials:

access_key_id = ""
secret_key = ""

Then, create a configuration file (see sample.job) with the vault name, region, and directories you want to sync, separated with |.

Run the script and pass in the config file with the command:

sync-glacier.py job_file.job

On the first run, it will download an inventory of the vault. This takes about four hours, after which you'll need to run the script again. The script will upload the files in the given directory that don't already appear in the vault (or that have been updated since your last upload). Once that's done, every time you want to sync changes to your vault, simply run the script again. It'll detect what's been updated and only upload those files.


CREATE TABLE `tblDocs` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `archiveid` varchar(200) DEFAULT NULL,
  `archivevault` varchar(100) DEFAULT NULL,
  `archivedate` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
) ENGINE=InnoDB AUTO_INCREMENT=13437 DEFAULT CHARSET=latin1;

sync-glacier.py's People

Contributors

etataurov avatar caseychu avatar luxor99 avatar

Watchers

 avatar James Cloos avatar

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.