Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

391
Visualizações
Error when restoring 9.5 pgdump files on 9.6 postgres

We have been using 9.5 postgres.

And we use pgdump to get backup files from that database and then subsequently use it to restore on a 9.6 postgres.

We were unable to restore successfully. Usually the minor version upgrade does not mean backwards breaking.

I am wondering what's the issue causing us to be unable to successfully restore on a 9.6 database.

We need to do so just in case we need to restore from archived data backups.

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I was facing the same error when upgrading from 9.3 to 9.6. The restore failed every time I tried but the dump was successful.

My solution to this problem was not to use the custom format! Instead I used the plain format. So I tried plain format with file extension sql, with utf8 encoding as user postgres. And obviously don't forget to include pre-data, data and post-data because otherwise your restore won't be complete. This works perfectly.

If your dump is ok, also try a full vacuum before the dump. If the vacuum is not ok, this might be your problem.

over 4 years ago · Santiago Trujillo Relatório

0

To Take Dump

pg_dump --username=postgres --format=c --file=e:/testdbdump.sql testdb 

OR

pg_dump -U username databasename >>sqlfile.sql

To Restore

pg_restore --username=postgres --dbname=testdb<d:\sqlfile.sql

pg_restore --username=postgres --dbname=testdb <d:\sqlfile.sql



pg_restore --username=postgres --dbname=testdb <d:\testDBApr18.sql

pg_restore --username=postgres --dbname=testdb <c:\Backup\testdbDBApr18.sql

// PG DUMP & RESTORE THAT WORKS FOR ME

pg_dump -U postgres -h localhost --format=c testdb > db_dump_file.dump

pg_restore -U postgres -h localhost -v -d testdb db_dump_file.dump
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda