• Stars
    star
    375
  • Rank 114,096 (Top 3 %)
  • Language
    Python
  • Created over 11 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Remove all archives stored inside an Amazon Glacier vault, even if you have a huge number of them.

glacier-vault-remove

This tool can help you remove an Amazon Glacier vault, even if it's not empty.

It will remove all archives contained inside the vault, and then remove the vault itself.

It is intended to work well with vaults containing a lot of archives. I developed it because my vault contained more than 500'000 archives, and all other softwares crashed when I tried to remove all of them.

Install

Docker

If you have docker installed, you can easily run the script using the leeroyb/glacier-vault-remove image available on Docker Hub:

docker run -v /ABSOLUTE_LOCAL_PATH_TO/credentials.json:/app/credentials.json -d leeroyb/glacier-vault-remove <region-name> [<vault-name>|LIST] [DEBUG] [NUM_PROCESSES] [<job_id>|LIST|NEW|LATEST]

Make sure you use the full absolute path to credentials.json (see below), relative paths do not work here.

Without Docker

You can clone or download this repository and install the dependencies (boto3) by calling the install script :

python setup.py install

Configure

Then create a credentials.json file in the same directory as removeVault.py (or anywhere on your filesystem if using Docker) :

{
	"AWSAccessKeyId": "YOURACCESSKEY",
	"AWSSecretKey":   "YOURSECRETKEY"
}

Use

You can then use the script like this :

python removeVault.py <region-name> [<vault-name>|LIST] [DEBUG] [NUM_PROCESSES] [<job_id>|LIST|NEW|LATEST]

Example :

python removeVault.py eu-west-1 my_vault

Multiple processes

If you want to perform the removal using multiple processes (4 processes here) :

python removeVault.py <region-name> <vault-name> 4

List vaults

If you don't know the vault name, you can generate a list like this:

python removeVault.py <region-name> LIST

Inventory retrieval jobs

A vault inventory is necessary to remove all the archives inside of it. By default, we will look for an existing inventory and use it. If there is none, we will initiate a new one.

You can change this behavior using the job_id argument, with the following values:

  • LATEST (default): use the latest inventory available, or initiate a new one if there is none
  • NEW: force initiating a new inventory retrieval job
  • LIST: list the inventory retrieval jobs availables
  • <job_id>: give a specific job ID to use

For example to force a new inventory:

python removeVault.py <region-name> <vault-name> NEW

If you want to use 4 processes to remove the archives AND force a new inventory:

python removeVault.py <region-name> <vault-name> 4 NEW

Debug

By default, only the INFO messages will be printed to console. You can add a third argument "DEBUG" to the removeVault.py script if you want to show all messages.

Example :

python removeVault.py <region-name> <vault-name> DEBUG

Building the Docker image

If for whatever reason you don't want to use the leeroyb/glacier-vault-remove image on Docker Hub, you can also build the image yourself from this repository.

  1. Make sure you have docker installed
  2. Clone or download this repository
  3. Build the image:
docker build -t glacier-vault-remove .
  1. Create a credentials.json as described above

  2. Run the tool in the docker container:

docker run -v /path/to/credentials.json:/app/credentials.json glacier-vault-remove <region> <vault|LIST> [DEBUG] [NUM_PROCESSES] [<job_id>|LIST|NEW|LATEST]

Make sure you use the full absolute path to credentials.json, relative paths do not work here.

Licence

(The MIT License)

Copyright (C) 2013 Leeroy Brun, www.leeroy.me

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

node-mt-files-downloader

Simple module letting you download a file from the web, compute stats, retry in case of error, etc
JavaScript
84
star
2

socketio-express-sessions

Demonstrate how to use Express 4 sessions in Socket.IO 1 for authentification.
JavaScript
29
star
3

chrome-shazify

Chrome extension used to sync your Shazam tags to a Spotify playlist
JavaScript
28
star
4

webtorrent-transcode

Attempt to transcode and stream torrents downloaded with WebTorrent using FFmpeg
JavaScript
27
star
5

node-allocine-api

Node.js module used to access the Allocine API
JavaScript
26
star
6

sails-util-mvcsloader

Load the models, controllers, services from your Sails hooks into the main app
JavaScript
26
star
7

node-fibaro-api

Interact with Fibaro Home Center API
JavaScript
17
star
8

node-express-https

Example of using Express & Node.js with HTTPS.
JavaScript
17
star
9

torrents-search

Node module used for searching torrents on private trackers websites.
JavaScript
15
star
10

node-utorrent-api

Interact with the uTorrent Web API
JavaScript
14
star
11

Bin2PNG

Convert a binary file to a PNG image and then back to binary.
C
14
star
12

node-delayed-request

Simple module wrapping the request module to add some delay between requests.
JavaScript
8
star
13

architect-init

CLI tool to help you start a new Architect app by creating all the structure and main files.
JavaScript
6
star
14

myfont-downloader

Download MyFont fonts
JavaScript
3
star
15

users-support

Simple c# app that let you view your AD computers, users connected to each ones and use TightVNC to remotely connect to one of them.
C#
2
star
16

cross-npm-spawn

Cross-platform NPM spawn
JavaScript
2
star
17

pyFTD

FrenchTorrentDB python class
Python
1
star
18

iOS-Custom-TabBar-Height

Objective-C
1
star
19

node-terminal-status

Simple module to update a status in terminal for the running program.
JavaScript
1
star
20

pictures-analyser

Analyse pictures and adjustments made to them
JavaScript
1
star
21

leanpub-scraper

Scrape the LeanPub website for ebooks
JavaScript
1
star
22

website-downloader

Node script to download an entire website for local viewing
JavaScript
1
star
23

chrome-magento-connect-ddl

Add direct download buttons to Magento Connect extension pages
JavaScript
1
star
24

iphone6-availability-checker

Node.js command line app to check for availability of iPhone 6 in Apple Stores
JavaScript
1
star