I have a PostgreSQL version 10 and a PostGIS extension. In this old version of PostgreSQL, the PostGIS has also support for raster. But in the newer versions of PostGIS, the raster support in a separate extension called: postgis_raster.
Thus, we wont have this line in our dumpall file:
CREATE EXTENSION postgis_raster;
And when I restore it it tells me it does not recognize the raster type!
My file is very big if I do not zip it before storing it on the disk. If I zip it, I wont be able to change the lines in the file to add this extension to the dump file manually.
I was thinking to do a pgdumpall with --global-only flag. Then, later dump each DB one by one using pgdump.
However, I was afraid that I may miss a detail from my DB cluster.
Is there a way to ask the pgdumpall to consider that postgis_raster is a separate extension and should be added to the dump file?
How can I safely dump and restore my cluster?
--global-only
does something very different. It doesn't backup anything from a database, only the globals from your cluster.