mdxp / knife-backup

knife plugin to help backup and restore a chef server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FATAL: Cannot find sub command for: 'backup export -D ./backup'

opened this issue · comments

I know there is already an issue similar to this one; but it's closed and sort of different.

So I'm running into this issue when I try to run: knife backup export -D ./backup

I'm using Ubuntu 14.04.4 LTS.

I'm using rvm; here is all the info I can think of:

$ rvm current
ruby-2.2.1
$ gem list | grep knife
knife-backup (0.0.12)
knife-ec2 (0.11.0.rc.0)
knife-rackspace (0.10.2)
knife-santoku (0.1.6)
knife-softlayer (0.4.0)
knife-spec (1.0.0)
knife-spork (1.5.1)
knife-vagrant (0.0.7)
knife-windows (0.8.5)
$ gem list | grep chef
chef (12.8.1, 11.18.12)
chef-config (12.8.1)
chef-zero (4.5.0, 2.2.1)

knife works without issue; it's just when I try to use knife backup where I have issues.

If I change out of the chef-repo it'll give me this:

$ knife backup
FATAL: Cannot find subcommand for: 'backup'
Available backup subcommands: (for details, knife SUB-COMMAND --help)

** BACKUP COMMANDS **
knife backup export [COMPONENT [COMPONENT ...]] [-D DIR] (options)
knife backup restore [COMPONENT [COMPONENT ...]] [-D DIR] (options)

So, I've thought maybe the knife or ruby versions are different from directories; but, they're both the same.

Any ideas?

@jersten - I think the issue occurs only when " knife backup" is executes w/o either export or restore. It's not great it should handle this case more gracefully, but it should work.

That's what I thought but it still does this:

$ knife backup export -D ./backups
 -laFATAL: Cannot find sub command for: 'backup export -D ./backups'
Available subcommands: (for details, knife SUB-COMMAND --help)

Issue was that the chef-repo Gemfile did not have:

gem 'knife-backup'

in the Gemfile.