Comments (11)
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.
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.
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.
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.
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.
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.
Any thoughts on this? I have been moving so havent been able to look at the code.
from bakthat.
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.
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:
- When not found:
{"code":"ResourceNotFoundException","message":"Vault not found for ARN: arn:aws:glacier:us-east-1:XXXXXXXX:vaults/test1zz","type":"Client"}
- When name contains invalid characters:
{"code":"ResourceNotFoundException","message":"Vault not found for ARN: testz:z","type":"Client"}
- When permission problem: AccessDeniedException
from bakthat.
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.
Thanks for the follow up, I'll try to update bakthat accordingly !
from bakthat.
Related Issues (20)
- store archive contents in sqlite HOT 1
- No distributions matching the version for byteformat HOT 1
- requirement.txt specify the version for each package HOT 1
- Problem in rotate_backups function
- Support for DreamObjects
- Missing support for Tenant Name in Swift HOT 5
- GlusterFS backend HOT 1
- Problems with api
- IOError on backup
- sh dependency, can't install on Windows
- Trying backup a file to glacier HOT 7
- Boto glacier exception
- Connection reset by peer HOT 1
- I have lost bakthat.sqlite. Can I still restore my backups from untouched backup server(s3)? HOT 1
- Would like option for local destination
- Support for IAM roles / environment variables
- 'ascii' codec can't decode byte 0x8b in position 1: ordinal not in range(128) HOT 1
- ..
- Python 3 compatibility
- Proposing a PR to fix a few small typos
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bakthat.