Opened 7 years ago

Closed 7 years ago

#3788 closed enhancement (fixed)

allow postgis_restore.pl to work on directory-style backups (-Fd)

Reported by: wrog Owned by: strk
Priority: medium Milestone:
Component: postgis Version: 2.3.x
Keywords: Cc:

Description

This allows doing hard-restore/upgrade from a directory-style (-Fd) backups as well as the usual postgres-custom backup (-Fc). (You have -f which unnecessarily restricts backup to being an ordinary file but pg_restore deals just fine with directories. Also, you really do want to test -r)

This is literally a one-character change (though you could also fix $manifest 4 lines earlier to remove trailing slashes from $dumpfile).

--- /usr/share/postgresql/9.6/contrib/postgis-2.3/postgis_restore.pl
+++ -
@@ -90,3 +90,3 @@
 die "$me:\tUnable to find 'pg_restore' on the path.\n" if ! `pg_restore --version`;
-die "$me:\tUnable to open dump file '$dumpfile'.\n" if ! -f $dumpfile;
+die "$me:\tUnable to open dump file '$dumpfile'.\n" if ! -r $dumpfile;

Change History (2)

comment:1 by robe, 7 years ago

Owner: changed from pramsey to strk

comment:2 by strk, 7 years ago

Resolution: fixed
Status: newclosed

In 15488:

Allow postgis_restore.pl to work on directory-style (-Fd) dumps

Patch by Roger Crew
Closes #3788

Note: See TracTickets for help on using tickets.