I want to move a database from one machine to another but I get an error. The source has a slightly older version of Postgres. I started out using PGAdmin (because I thought that what I wanted to do was as common as breathing) and dropped back to using command line because "Failed (exit code:1)" that PGAdmin 4 was giving me was not helpful.
So from the source computer:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Program Files\PostgreSQL\10\bin>pg_dump --version
pg_dump (PostgreSQL) 10.7
C:\Program Files (x86)\pgAdmin 4\v4\runtime\pg_dump.exe --file "C:\\PGData\\WellData.tar" --host "localhost" --port "5432" --username "postgres" --no-password --verbose --format=t --blobs "WellData"
And on the destination computer
C:\Program Files\PostgreSQL\10\bin>pg_restore.exe --host "localhost" --port "5432" --username "postgres" --no-password --dbname "WellData" --section=data --verbose "E:\\PGData\\WellData.tar"
pg_restore: [archiver] unsupported version (1.14) in file header
C:\Program Files\PostgreSQL\10\bin>pg_restore --version
pg_restore (PostgreSQL) 10.8
I would rather understand the problem and fix it than work around it, but I did try backing up the data as SQL. When I found that running the restore SQL statement would not work because it did not like the \N values that were used to indicate null values I gave up. (the backup uses notation that the restore cannot handle? That doesn't seem right)