Giter Site home page Giter Site logo

Comments (11)

tk422 avatar tk422 commented on June 20, 2024

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):
for files in os.listdir(os.path.join(bakfolder,each)):
if files[-3:] != ".gz":
pass
else:
bakthat.backup(os.path.join(bakfolder,each,files), conf=aws_conf, destination="glacier", password=encpassword, prompt="no")

from bakthat.

tsileo avatar tsileo commented on June 20, 2024

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:

  • first, the prompt argument is useless when calling bakthat from Python (either password="" to disable password, either a valid password)
  • next, if you already have a configuration file, you don't have to pass the conf argument, and when passing it, I suggest you to set a S3 bucket just to backup your local inventory glacier (if something goes wrong you don't have to wait 4-5 hours just to retrieve your inventory.)

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 !

from bakthat.

tsileo avatar tsileo commented on June 20, 2024

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.

from bakthat.

tk422 avatar tk422 commented on June 20, 2024

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.

from bakthat.

tk422 avatar tk422 commented on June 20, 2024

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.

from bakthat.

tk422 avatar tk422 commented on June 20, 2024

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.

from bakthat.

tk422 avatar tk422 commented on June 20, 2024

Any thoughts on this? I have been moving so havent been able to look at the code.

from bakthat.

tsileo avatar tsileo commented on June 20, 2024

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.

from bakthat.

vsespb avatar vsespb commented on June 20, 2024

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:

  1. When not found:
{"code":"ResourceNotFoundException","message":"Vault not found for ARN: arn:aws:glacier:us-east-1:XXXXXXXX:vaults/test1zz","type":"Client"}
  1. When name contains invalid characters:
{"code":"ResourceNotFoundException","message":"Vault not found for ARN: testz:z","type":"Client"}
  1. When permission problem: AccessDeniedException

from bakthat.

vsespb avatar vsespb commented on June 20, 2024

FYI it turns out that Invalid vault name means that this archive_id belongs to different vault https://forums.aws.amazon.com/thread.jspa?threadID=123076&tstart=0

from bakthat.

tsileo avatar tsileo commented on June 20, 2024

Thanks for the follow up, I'll try to update bakthat accordingly !

from bakthat.

Related Issues (20)

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.