pg-restore

How to upgrade the pg_restore in docker postgres image 10.3 to 10.5

五迷三道 提交于 2020-07-22 03:17:51
问题 I use tableplus for my general admin. Currently using the docker postgres image at 10.3 for both production and localhost development. Because tableplus upgraded their postgres 10 drivers to 10.5, I can no longer use pg_restore to restore the backup files which are dumped using 10.5 --format=custom See image for how I backup using tableplus. And how it uses 10.5 driver The error message I get is pg_restore: [archiver] unsupported version (1.14) in file header What i tried I tried in localhost

How to upgrade the pg_restore in docker postgres image 10.3 to 10.5

别等时光非礼了梦想. 提交于 2020-07-22 03:17:05
问题 I use tableplus for my general admin. Currently using the docker postgres image at 10.3 for both production and localhost development. Because tableplus upgraded their postgres 10 drivers to 10.5, I can no longer use pg_restore to restore the backup files which are dumped using 10.5 --format=custom See image for how I backup using tableplus. And how it uses 10.5 driver The error message I get is pg_restore: [archiver] unsupported version (1.14) in file header What i tried I tried in localhost

pg_restore could not execute query: ERROR: invalid locale name: “en_US.UTF-8”

时光怂恿深爱的人放手 提交于 2020-06-27 13:57:30
问题 I use pg_restore on Windows 10 with a dump file made on Linux. I search on the web but I don't find answer. [NEW] : I install Ubuntu on my computer to use pg_restore but when I send pg_restore -d mydatabase /home/user/Documents/dumpfile.dump the command line is blocked. Someone has this issue ? 回答1: You will need to do some research on locales. The place to start is the documentation. Postgres relies on the operating system for locale information. The names differ between Posix and Windows.

pg_restore: [archiver] unsupported version (1.13) in file header

心不动则不痛 提交于 2020-06-13 00:10:23
问题 C:\Program Files (x86)\pgAdmin III\1.22\pg_restore.exe --host localhost --port 5432 --username "postgres" --dbname "randd" --role "postgres" --no-password --verbose "C:\Users\ranjeet\Desktop\RandDbackup19-3final.backup" pg_restore: [archiver] unsupported version (1.13) in file header 回答1: This error means that you are using an old and outdated version of pg_restore (and hence PostgreSQL) on the client side. The dump was created by a more recent release of PostgreSQL that the one installed, so

Unable to restore psql database from pg_dump with a different username

廉价感情. 提交于 2020-01-21 11:49:10
问题 I need to dump a postgres database from computer1 with postgres username1 and then restore it on computer2 with postgres username2. I keep running into the error that looks like the backup file wants to use username1: When I run this on computer2: psql dbname < backupname.pgsql I get this error: ERROR: role "username1" does not exist I have tried: // Dumping from computer1: pg_dump dbname > backupname.sql pg_dump dbname > backupname.pgsql pg_dump -U username1 dbname -N topology -T spacial_ref

Unable to restore psql database from pg_dump with a different username

橙三吉。 提交于 2020-01-21 11:49:09
问题 I need to dump a postgres database from computer1 with postgres username1 and then restore it on computer2 with postgres username2. I keep running into the error that looks like the backup file wants to use username1: When I run this on computer2: psql dbname < backupname.pgsql I get this error: ERROR: role "username1" does not exist I have tried: // Dumping from computer1: pg_dump dbname > backupname.sql pg_dump dbname > backupname.pgsql pg_dump -U username1 dbname -N topology -T spacial_ref

PostgreSQL dump and restore in different timezone

只谈情不闲聊 提交于 2020-01-14 09:20:29
问题 I have two databases running on different servers in different timezones. There is a couple of tables which contains timestamp with timezone . I need to dump data from one database and to import it to another with correct timestamp and correct timezone. I use following command to dump data: pg_dump -a DB_NAME > dump.sql I see data are in old timestamp and timezone format: 2013-11-29 14:30:00+02 Then I use command to another server to restore dump: psql -d DB_NAME -f dump.sql And I see that