mdxp / knife-backup

knife plugin to help backup and restore a chef server.
Apache License 2.0
110 stars 45 forks source link

Component backup fails if a single item cannot be accessed #23

Closed tas50 closed 9 years ago

tas50 commented 10 years ago

When backing up from Hosted chef if a single item has permissions that prevent you from reading the object the entire component backup fails.

Example with users:

ERROR: You authenticated successfully to https://api.opscode.com/organizations/org as your_username but you are not authorized for this action Response: You are not authorized to view user user_with_bad_perms

mdxp commented 10 years ago

Hmm.... Never used it with hosted chef, but only with various versions of the open source. Any idea what is the problem?

tas50 commented 10 years ago

It just can't read the object due to the permissions. It should just fail and keep going, but instead the whole process stops

On Thu, Feb 20, 2014 at 1:05 PM, Marius Ducea notifications@github.comwrote:

Hmm.... Never used it with hosted chef, but only with various versions of the open source. Any idea what is the problem?

Reply to this email directly or view it on GitHubhttps://github.com/mdxp/knife-backup/issues/23#issuecomment-35668727 .

jamescarniglia commented 10 years ago

I am also having the same issue with knife-backup and hosted chef. I tried to change the permissions for the backup user but this didn't seem to fix the issue. Are there permission requirements for the user that does the backup?

Skipping the errors on a run and completing the backup job would be great, but it would also be great if we knew why and how to fix this in regards to the backup user's permissions.

pmoosh commented 9 years ago

@jamescarniglia @tas50 fixed with https://github.com/mdxp/knife-backup/commit/862327716d8af831a92069873f6d5cc88679e81e

Still need to update the README.md