This question may be asked many times. We are trying to move a postgres db from windows (psql 9.3) to ubuntu runing postgres 9.3. Here is what we did:
- In windows, create backup for db cis with pgadmin. The backup file name is cis.backup
- Copy the cis.backup to ubuntu and save it under /home/myname
- Log in to psql with:
sudo -u postgres psql postgres
- Create db cis_new on ubuntu with
#CREATE DATABASE cis_new WITH OWNER postgres ENCODING 'UTF8';
- Restore
#pg_restore --dbname cis_new --verbose /home/myname/cis.backup
The last pg_restore creates nothing and there was no restore at all. Is anything we missed here? Thanks.