heroku / legacy-cli

Heroku CLI
https://cli.heroku.com
MIT License
1.37k stars 380 forks source link

`ArgumentError` when using `pgbackups:restore` #863

Open gaganawhad opened 11 years ago

gaganawhad commented 11 years ago

I am getting an ArgumentError when trying to restore my pg database from a url pointing to a dump while using pgbackups:restore as documented here: https://devcenter.heroku.com/articles/heroku-postgres-import-export

$heroku pgbackups:restore AQUA 'http://s3.amazon.com/...'
 !    Heroku client internal error.
 !    Search for help at: https://help.heroku.com
 !    Or report a bug at: https://github.com/heroku/heroku/issues/new

    Error:       wrong number of arguments (1 for 2) (ArgumentError)
    Backtrace:   /Users/gagan/.heroku/client/lib/heroku/command/pgbackups.rb:120:in `resolve'
                 /Users/gagan/.heroku/client/lib/heroku/command/pgbackups.rb:120:in `restore'
                 /Users/gagan/.heroku/client/lib/heroku/command.rb:206:in `send'
                 /Users/gagan/.heroku/client/lib/heroku/command.rb:206:in `run'
                 /Users/gagan/.heroku/client/lib/heroku/cli.rb:28:in `start'
                 /usr/local/heroku/bin/heroku:25

    Command:     heroku pgbackups:restore AQUA http://media2.desiringgod.org.s3.amazonaws.com/db-dumps/desiringgod_development.dump
    Plugins:     heroku-pg-extras
    Version:     heroku-toolbelt/2.40.0 (universal-darwin12.0) ruby/1.8.7
gadybadger commented 11 years ago

I'm getting this also... worked fine a few days ago.

ketzusaka commented 11 years ago

I'm also getting this.

tcollier commented 11 years ago

Same here.

waissbluth commented 11 years ago

Same here. Other Ruby version though.

$ heroku pgbackups:restore HEROKU_POSTGRESQL_RED_URL 'https://my.url.com/db.dump'

 !    Heroku client internal error.
 !    Search for help at: https://help.heroku.com
 !    Or report a bug at: https://github.com/heroku/heroku/issues/new

Error:       wrong number of arguments (1 for 2) (ArgumentError)
Backtrace:   /Users/nwr/.heroku/plugins/heroku-pg-extras/lib/heroku/command/pgbackups.rb:51:in `resolve'
             /Users/nwr/.heroku/client/lib/heroku/command/pgbackups.rb:120:in `restore'
             /Users/nwr/.heroku/client/lib/heroku/command.rb:206:in `run'
             /Users/nwr/.heroku/client/lib/heroku/cli.rb:28:in `start'
             /usr/bin/heroku:24:in `<main>'

Command:     heroku pgbackups:restore HEROKU_POSTGRESQL_RED_URL https://my.url.com/db.dump
Plugins:     heroku-pg-extras
             heroku-pg-transfer

Version:     heroku-toolbelt/2.40.0 (x86_64-darwin10.8.0) ruby/1.9.3
gadybadger commented 11 years ago

Heroku Support suggested updating the heroku-pg-extras plugin... after doing that I was able to run restore again. heroku plugins:update heroku-pg-extras

mwaugh commented 11 years ago

:+1: - seems to have worked for me

elsurudo commented 11 years ago

That did it for me, too. I don't remember seeing any message to upgrade that plugin, however. Thanks!

gaganawhad commented 11 years ago

Thanks for the update

drale2k commented 11 years ago

Updating heroku-pg-extrasplugin did it for me, thanks.

catsby commented 11 years ago

Closing this. Please update pg-extras if you run into this.

$ heroku plugins:update heroku-pg-extras

tirsen commented 10 years ago

I've started getting this again just now. Worked fine about 2 weeks ago.

Running heroku plugins:update heroku-pg-extras doesn't help because I believe pg-extras is no longer shipped as a plugin.

-> % heroku pgbackups:restore DATABASE https://s3.amazonaws.com/... --confirm triposo-www-staging --app triposo-www-staging
 !    Heroku client internal error.
 !    Search for help at: https://help.heroku.com
 !    Or report a bug at: https://github.com/heroku/heroku/issues/new

    Error:       wrong number of arguments (1 for 2) (ArgumentError)
    Backtrace:   /home/www/.heroku/plugins/heroku-pg-extras/lib/heroku/command/pgbackups.rb:51:in `resolve'
                 /usr/local/heroku/lib/heroku/command/pgbackups.rb:120:in `restore'
                 /usr/local/heroku/lib/heroku/command.rb:218:in `run'
                 /usr/local/heroku/lib/heroku/cli.rb:28:in `start'
                 /usr/bin/heroku:25:in `<main>'

    Command:     heroku pgbackups:restore DATABASE https://s3.amazonaws.com/... --confirm triposo-www-staging --app triposo-www-staging
    Plugins:     heroku-pg-extras
    Version:     heroku-toolbelt/3.3.0 (x86_64-linux) ruby/1.9.3
catsby commented 10 years ago

Running heroku plugins:update heroku-pg-extras doesn't help because I believe pg-extras is no longer shipped as a plugin.

It is still shipped as a plugin. Gradually some of the features are being moved into the main CLI as we see fit, but not all of them will. Please try running heroku plugins:update heroku-pg-extras and let us know; I can't reproduce this :/

tirsen commented 10 years ago

I've tried to put it doesn't work: -> % heroku plugins:update heroku-pg-extras Updating heroku-pg-extras... failed ! heroku-pg-extras plugin not found.

And: -> % heroku plugins You have no installed plugins.

I even tried installing the plugin: heroku plugins:install git://github.com/heroku/heroku-pg-extras.git

Still doesn't work.

I suspect something's terribly wrong with my system so I uninstalled heroku-toolbelt and ruby and installed again with apt-get. Still doesn't work. :-(

On Tue, Feb 4, 2014 at 1:47 PM, Clint notifications@github.com wrote:

Running heroku plugins:update heroku-pg-extras doesn't help because I believe pg-extras is no longer shipped as a plugin.

It is still shipped as a plugin. Gradually some of the features are being moved into the main CLI as we see fit, but not all of them will. Please try running heroku plugins:update heroku-pg-extras and let us know; I can't reproduce this :/

Reply to this email directly or view it on GitHubhttps://github.com/heroku/heroku/issues/863#issuecomment-34055820 .

catsby commented 10 years ago

Can you share the output you get when you install the standalone, and when you try installing the plugin?

tirsen commented 10 years ago

Sorry, this is incredibly stupid but I ran the heroku plugins:update command as a separate user (a user which can sudo) because I believed the plugins were installed system wide. When I run the update as the user doing the restore it all worked fine. Thanks for your time!

catsby commented 10 years ago

glad it got resolved! closing again