basak / glacier-cli

Command-line interface to Amazon Glacier
Other
617 stars 55 forks source link

Need a way to access glacier ids in event of dupe archive or non-named archives #4

Closed jbekas closed 12 years ago

jbekas commented 12 years ago

Glacier allows the uploading of multiple archives with the same name (also archives with no name), so the only way to retrieve or delete the dupes is by id. Currently, glacier-cli provides no way to retrieve the ids from the database.

From the command line, we can access them from the local cache DB:

sqlite3 ~/.cache/glacier-cli/db "select name, id from archive"

From the code, the error condition can be reported when the sqlalchemy.orm.exc.MultipleResultsFound exception is thrown. For example, see http://pastebin.com/Y6WybtJH