-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restoring a file dies with this message #10
Comments
looking into this further it looks like calling via a python module does not honor the glacier vault (hence the error about finding the file). Here is what I have in the upload script and (I just checked none of them are uploaded to the vault but instead are uploaded to "None") vaultname = "backups-east" aws_conf = {"access_key":ACCESS_KEY_ID, "secret_key":SECRET_ACCESS_KEY, "bucket": "", "vault": vaultname, "password":encpassword} for each in os.listdir(bakfolder): |
First, I totally agree with the dot before the date, I'll make the change quickly, About your fist issue, the error says: Invalid vault name, I think you shouldn't have a dash in your vault name (backups-east), it's a boto/AWS related issue I think. Now about the bakthat module call, I use bakthat in Python scripts to make daily backups to glacier on few servers, and I never had any issue:
Can you try without the conf (if you have a ~/.bakthat.conf) and promp argument, and show me the logs output, to check bakthat logs when using a Python script, just add these line at the top of your file: import logging
log = logging.getLogger()
log.setLevel(logging.INFO) Also, I'll rewrite the doc for both command line and python module usage, with backups scripts example. Keep me updated, thanks for your feedback ! |
I made the change on github to add a dot betwen the backup name and the date component, I have not pushed the change on pypi yet. |
Okay let me play around with it later today. I know that when I backup and restore from the command line (taking the configuration from .bakthat.cfg file) it works fine with the dash in the glacier name. But let me try a couple of things and see if I can pinpoint the breakdown some more. |
Okay when I call it via python module as shown above it doesnt work it errors out with the same error seen above. But when I do it via the commandline it correctly uploads it to the vault backups-east. So there might be something with the dash in the name when called via the module. Thats my current guess anyway. I'll look more into it. |
Tested it a few more times. It does look like its not properly uploading to a vault with a dash in it when using the module. But seems to work on the commandline. |
Any thoughts on this? I have been moving so havent been able to look at the code. |
It seems to be a boto related issue, so I will investigate more when bakthat 0.4.0 will be released and post an issue on boto repository if needed, I will keep you updated. I making big changes on bakthat right now (not updated on pypi yet) with version 0.4.0 release coming soon and I would love to hear your feedback. |
FYI Similar issue vsespb/mt-aws-glacier#32 https://forums.aws.amazon.com/thread.jspa?threadID=123076&tstart=0 Also I was unable to receive error message "Invalid vault name" in the wild - message is not thrown when vault name is really not valid. Instead:
|
FYI it turns out that |
Thanks for the follow up, I'll try to update bakthat accordingly ! |
Hey again,
Went to test the restore of a tar.gz file,now using a long name without the double tar.gz. Can you actually add a period back after the last part of the filename that way the date code doesnt get jumbled together.
Here is what I get:
2013-02-26 16:33:13,182 INFO: Restoring gridlock.XXXX.org.23420130221100557.tgz.enc <*_**-- note the 234 is the last part of the file name and would like that separate from the date
Password:
2013-02-26 16:33:43,045 INFO: Downloading...
Traceback (most recent call last):
File "/usr/local/bin/bakthat", line 9, in
load_entry_point('bakthat==0.3.7', 'console_scripts', 'bakthat')()
File "/usr/local/bin/bakthat.py", line 598, in main
app.run()
File "/usr/local/lib/python2.6/dist-packages/aaargh.py", line 157, in run
return func(__kwargs)
File "/usr/local/bin/bakthat.py", line 506, in restore
out = storage_backend.download(key_name, *_download_kwargs)
File "/usr/local/bin/bakthat.py", line 267, in download
job = self.vault.retrieve_archive(archive_id)
File "/usr/local/lib/python2.6/dist-packages/boto/glacier/vault.py", line 293, in retrieve_archive
response = self.layer1.initiate_job(self.name, job_data)
File "/usr/local/lib/python2.6/dist-packages/boto/glacier/layer1.py", line 351, in initiate_job
response_headers=response_headers)
File "/usr/local/lib/python2.6/dist-packages/boto/glacier/layer1.py", line 84, in make_request
raise UnexpectedHTTPResponseError(ok_responses, response)
boto.glacier.exceptions.UnexpectedHTTPResponseError: Expected 202, got (400, code=InvalidParameterValueException, message=Invalid vault name: arn:aws:glacier:us-east-1:917509789911:vaults/backups-east)
The text was updated successfully, but these errors were encountered: