Skip to content
Remove all archives stored inside an Amazon Glacier vault, even if you have a huge number of them.
Branch: master
Clone or download
Latest commit cad3286 Apr 3, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Added .gitignore from Github Nov 27, 2015
Dockerfile Install boto3 via py-pip Feb 15, 2017
README.md Update README.md Apr 3, 2018
removeVault.py Merge pull request #35 from dhermyt/spawn-thread Nov 20, 2017
setup.py Fix dependency Feb 2, 2017

README.md

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

You can 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 :

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

Use

You can then use the script like this :

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

Example :

python removeVault.py eu-west-1 my_vault

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

python removeVault.py eu-west-1 my_vault 4

List

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

python removeVault.py eu-west-1 LIST

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 eu-west-1 my_vault DEBUG

Running the Docker container

If you don't want to install all dependencies locally you can also build and use the Docker container supplied with this package.

Step 1) make sure you have docker installed and run

docker build -t glacier-vault-remove .

Step 2) Create a credentials.json as described above

Step 3) 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]

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.

You can’t perform that action at this time.