Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty dump file #83

Open
kiddrew opened this issue Feb 11, 2016 · 2 comments
Open

Empty dump file #83

kiddrew opened this issue Feb 11, 2016 · 2 comments

Comments

@kiddrew
Copy link

kiddrew commented Feb 11, 2016

My db:pull seems to be completing correctly, but the dump file is empty. Trace below:

INFO [2c0b7433] Running /usr/bin/env mkdir -p /var/www/ilf-cms/rvm1scripts/ as deploy@ilf-web1
INFO [2c0b7433] Finished in 0.241 seconds with exit status 0 (successful).
INFO Uploading /Users/andrew/.rvm/gems/ruby-2.3.0/gems/rvm1-capistrano3-1.4.0/script/rvm-auto.sh 100.0%
INFO [ec8db92c] Running /usr/bin/env chmod +x /var/www/ilf-cms/rvm1scripts/rvm-auto.sh as deploy@ilf-web1
INFO [ec8db92c] Finished in 0.224 seconds with exit status 0 (successful).
local {"adapter"=>"postgresql", "encoding"=>"unicode", "host"=>"localhost", "username"=>"andrew", "pool"=>5, "timeout"=>5000, "port"=>5432, "database"=>"ilfcms_development"}
Local database: ilfcms_development
Please enter answer (Are you sure you want to erase your local database with server database (y)es, (n)o  ? ): y
local {"adapter"=>"postgresql", "encoding"=>"unicode", "host"=>"localhost", "username"=>"andrew", "pool"=>5, "timeout"=>5000, "port"=>5432, "database"=>"ilfcms_development"}
INFO [61b37d37] Running /usr/bin/env cd /var/www/ilf-cms/current &&  pg_dump --no-acl --no-owner   | bzip2 - - > db/_2016-02-11-100826.sql.bz2 as deploy@ilf-web1
INFO [61b37d37] Finished in 0.242 seconds with exit status 0 (successful).
INFO Downloading db/_2016-02-11-100826.sql.bz2 100.0%
INFO leaving /var/www/ilf-cms/current/db/_2016-02-11-100826.sql.bz2 on the server (add "set :db_remote_clean, true" to deploy.rb to remove)
INFO executing local: bunzip2 -f db/_2016-02-11-100826.sql.bz2 &&  psql -c "SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE pg_stat_activity.datname = 'ilfcms_development' AND pid <> pg_backend_pid();;"  -U andrew  -h localhost  -p 5432 ;  dropdb  -U andrew  -h localhost  -p 5432  ilfcms_development;  createdb  -U andrew  -h localhost  -p 5432  ilfcms_development;  psql  -U andrew  -h localhost  -p 5432  -d ilfcms_development < db/_2016-02-11-100826.sql
 pg_terminate_backend
----------------------
(0 rows)

INFO leaving db/_2016-02-11-100826.sql (specify :db_local_clean in deploy.rb to remove)
INFO Completed database import
@FUT
Copy link

FUT commented May 7, 2016

@kiddrew You can try to ssh to the server and run pg_dump ... command there. This way you will get the errors. In my case I have:

pg_dump: server version: 9.5.2; pg_dump version: 9.2.15
pg_dump: aborting because of server version mismatch

@abuhtoyarov
Copy link

I was helped by the update of the pg_dump utility. The version of the database server and pg_dump must match.

In my case, I had to execute the following command.

sudo ln -s /usr/pgsql-10/bin/pg_dump /usr/bin/pg_dump --force

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants