Restoring PostgreSQL 9.1.9 backup with 9.3.0 results in error How can I resolve the following errors in 9.3.0:

psql mydb &lt; ~/mydb_2013-10-25.backup.tar


results in

...
ALTER TABLE
ALTER TABLE
ALTER TABLE
ERROR:  could not open file "$$PATH$$/2309.dat" for reading: No such file or directory
 setval
--------
      1
(1 row)
...


I see the file 2309.dat in the tar, so I am slightly confused what can be the reason. I run 9.3.0 on OS X and made backup with 9.1.9 on Ubuntu.

Edit: I managed to restore data with pgAdmin3-1.18.1.
Update 10/28

Using pg_dump it is possible to backup a database as a tar archive

pg_dump -v -o -c -Ft -f test_backup.tar testdb

Here are the contents of the test_backup.tar file

-bash-4.1$ tar -tvf test_backup.tar 
-rw------- 2048/1024      1605 2013-10-28 14:50 toc.dat
-rw------- 2048/1024         5 2013-10-28 14:50 1769.dat
-rw------- 2048/1024      1654 2013-10-28 14:50 restore.sql


To restore the backup.tar file, I used this command

pg_restore -c -Ft test_backup.tar -d testdb

-c is to drop objects being restored from the database

-Ft is to use the tar archive format

-d is the name of the database

-v is for verbose 

So in conclusion, psql can't be used to restore or create files in the tar format. You must use pg_dump to create them using the -Ft option and then again with pg_restore to restore using the same file.

Craig