This project is deprecated and is no longer being maintained.
Please check out my current project Convox for all of your deployment needs!
Transfer Heroku Postgres databases
This project is deprecated and is no longer being maintained.
Please check out my current project Convox for all of your deployment needs!
I have no password on my local database so I put in:
heroku pg:transfer --to "postgres://username@localhost/project-development"
and I get
Error: undefined method url' for #<Array:0x007fdd2a8e06c0> (NoMethodError) Backtrace: /Users//.heroku/plugins/heroku-pg-transfer/init.rb:88:in
transfer_resolve'
/Users//.heroku/plugins/heroku-pg-transfer/init.rb:24:in transfer' /Users//.rvm/gems/ruby-1.9.3-p448/gems/heroku-2.28.12/lib/heroku/command.rb:178:in
run'
/Users//.rvm/gems/ruby-1.9.3-p448/gems/heroku-2.28.12/lib/heroku/cli.rb:25:in start' /Users//.rvm/gems/ruby-1.9.3-p448/gems/heroku-2.28.12/bin/heroku:16:in
<top (required)>'
/Users//.rvm/gems/ruby-1.9.3-p448/bin/heroku:23:in load' /Users//.rvm/gems/ruby-1.9.3-p448/bin/heroku:23:in
eval' /Users//.rvm/gems/ruby-1.9.3-p448/bin/ruby_noexec_wrapper:14:in
'
Command: heroku pg:transfer --to postgres://bmb@localhost/bmb-development
Version: heroku-gem/2.28.12 (x86_64-darwin11.4.2) ruby/1.9.3
The current way I do this is:
$APP=myapp
heroku pgbackups:restore DATABASE `heroku pgbackups:url --app $APP` --app $APP-staging --confirm $APP-staging
It would be nice to have a simple command, e.g.,
heroku pg:transfer --from-app $APP --to-app $APP-staging
I'm getting these errors :
pg_dump: version du serveur : 9.1.5 ; pg_dump version : 8.4.14
pg_dump: annulation à cause de la différence des versions
pg_dump: *** interrompu du fait d'erreurs
pg_restore: [archiveur] le fichier en entrée est trop petit (0 lus, 5 attendus)
Which translates loosely to :
pg_dump: server version : 9.1.5 ; pg_dump version : 8.4.14
pg_dump: cancelling due to version divergence
pg_dump: *** stopped due to errors
pg_restore: [archiver] the entry file is too small (0 read, 5 expected)
A little more informations : my system is an Ubuntu 12.10 and I'm using rbenv to keep my rubies in line.
env DATABASE_URL=postgres://localhost/myappname_development heroku pg:transfer
! 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: undefined method `last' for #<Heroku::Helpers::HerokuPostgresql::Attachment:0x100a9d368> (NoMethodError)
Backtrace: /Users/michael/.heroku/plugins/heroku-pg-transfer/init.rb:86:in `transfer_resolve'
/Users/michael/.heroku/plugins/heroku-pg-transfer/init.rb:22:in `transfer'
/Users/michael/.heroku/client/lib/heroku/command.rb:206:in `send'
/Users/michael/.heroku/client/lib/heroku/command.rb:206:in `run'
/Users/michael/.heroku/client/lib/heroku/cli.rb:28:in `start'
/usr/bin/heroku:25
Command: heroku pg:transfer
Plugins: heroku-accounts
heroku-pg-transfer
Version: heroku-toolbelt/2.31.3 (universal-darwin12.0) ruby/1.8.7
Recently had issues with taps so picked up pg:transfer. I noticed use of 'env' cmd, is that compatible with windows? Receiving several errors about 'env' when attempting to run from win7 cmd line.
heroku pg:transfer or pg:transfer -f -t
" 'env' is not recognized as an internal or external command "
" Error: No such file or directory - .env (Errno::ENOENT) "
Rails 3.2.2
i set up a clean rails database (running postgres 9.1.4, installed with homebrew).
here's what i tried:
rake db:drop:all
rake db:create:all
rake db:migrate
heroku pg:transfer --from white
Here's the trace i got:
Source database: HEROKU_POSTGRESQL_WHITE on myapp.herokuapp.com
Target database: myapp_development on localhost:5432
! WARNING: Destructive Action
! This command will affect the app: myapp
! To proceed, type "myapp" or re-run this command with --confirm myapp
> myapp
pg_dump: reading schemas
pg_dump: reading user-defined tables
pg_dump: reading extensions
pg_dump: reading user-defined functions
pg_dump: reading user-defined types
pg_dump: reading procedural languages
pg_dump: reading user-defined aggregate functions
pg_dump: reading user-defined operators
pg_dump: reading user-defined operator classes
pg_dump: reading user-defined operator families
pg_dump: reading user-defined text search parsers
pg_dump: reading user-defined text search templates
pg_dump: reading user-defined text search dictionaries
pg_dump: reading user-defined text search configurations
pg_dump: reading user-defined foreign-data wrappers
pg_dump: reading user-defined foreign servers
pg_dump: reading default privileges
pg_dump: reading user-defined collations
pg_dump: reading user-defined conversions
pg_dump: reading type casts
pg_dump: reading table inheritance information
pg_dump: reading rewrite rules
pg_dump: finding extension members
pg_dump: finding inheritance relationships
pg_dump: reading column info for interesting tables
pg_dump: flagging inherited columns in subtables
pg_dump: reading indexes
pg_dump: reading constraints
pg_dump: reading triggers
pg_dump: reading large objects
pg_dump: reading dependency data
pg_dump: saving encoding = UTF8
pg_dump: saving standard_conforming_strings = off
pg_dump: saving database definition
pg_restore: connecting to database for restore
pg_restore: dropping COMMENT EXTENSION plpgsql
pg_restore: dropping EXTENSION plpgsql
pg_restore: dropping COMMENT SCHEMA public
pg_restore: dropping SCHEMA public
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 6; 2615 2200 SCHEMA public vyhguhrsemgkst
pg_restore: [archiver (db)] could not execute query: ERROR: cannot drop schema public because other objects depend on it
DETAIL: table schema_migrations depends on schema public
table posts depends on schema public
table users depends on schema public
table fans depends on schema public
HINT: Use DROP ... CASCADE to drop the dependent objects too.
Command was: DROP SCHEMA public;
pg_restore: creating SCHEMA public
pg_restore: [archiver (db)] could not execute query: ERROR: schema "public" already exists
Command was: CREATE SCHEMA public;
pg_restore: creating COMMENT SCHEMA public
pg_restore: creating EXTENSION plpgsql
pg_restore: creating COMMENT EXTENSION plpgsql
pg_restore: setting owner and privileges for SCHEMA public
pg_restore: setting owner and privileges for COMMENT SCHEMA public
pg_restore: setting owner and privileges for EXTENSION plpgsql
pg_restore: setting owner and privileges for COMMENT EXTENSION plpgsql
WARNING: errors ignored on restore: 2
heroku --version
heroku-toolbelt/2.40.1 (x86_64-darwin10.8.0) ruby/1.9.3
env DATABASE_URL=postgres://localhost:5432/temp_development heroku pg:transfer
! #hpg_resolve is deprecated. Update your plugins.
! from: /Users/riddhimasejpal/.heroku/plugins/heroku-pg-transfer/init.rb:88:in `transfer_resolve'
! Multiple apps in folder and no app specified.
! Specify app with --app APP.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.