Closed defunctknightsurfer closed 9 years ago
BTW, I did see a post here https://www.coveros.com/forklifting-chef-server/
He describes my problem but I haven't tested his fix yet.
Thanks for this. Let me know how it goes. I haven't had time to try knife backup against a chef12 server or client, but I plan to do that as soon as I find some time to setup one.
Looks like modification to the backup_restore.rb fixed the problem. If you would like I can submit a pull request but I feel a little bad since I didn't write the code, just coping it :)
@pkringle - I just ran into the same set of issues - thanks to Coveros for documenting the workaround!
Yes, it would have been best if they had submitted a PR. I just emailed info @ coveros as Glenn's article omitted a link back to code.
Personally I don't think there is any shame in doing a PR of anyone else's patch as long as you acknowledge it.
@pkringle - did the patch apply cleanly for you? I get:
$ cd ~/.chefdk/gem/ruby/2.1.0/gems/knife-backup-0.0.10/lib/chef/knife
$ patch <backup_restore.patch
patching file backup_restore.rb
patch: **** malformed patch at line 18: @@ -172,12 +175,15 @@
I can't remember for sure, but I think I had to manually modify the code though as I don't think the patch worked cleanly as you stated.
I am attempting a restore and it seems like everything worked correctly except when it restored the cookbooks. It looks like it is trying to restore each version, but only really restores the newest version of the cookbook. The below example happened with every cookbook.
I checked the metadata in the cookbooks to make sure they were correct.
I am using chef / knife version
And restoring to chef server version 11.1.6-1 on Ubuntu 14.04
Thoughts? Is it something I am doing?
Thanks.