Web site designers - 608 CHAPTER 26 POSTGRESQL ADMINISTRATION pg_restore The
608 CHAPTER 26 POSTGRESQL ADMINISTRATION pg_restore The pg_restore program is used to restore database dumps that have been created using either pg_dumps tar or custom archive formats. The basic syntax of pg_restoreis certainly straightforward: pg_restore [option] [file name] If the file name is omitted from the command, pg_restore takes its input from standard input. The options for pg_restore are listed in Table 26-5. Table 26-5. pg_restore Options Option Explanation Connection Options h, –host=host Specifies the host to connect to; defaults to PGHOST or local machine. p, –port=port Specifies the port to connect on; defaults to PGPORT or compiled port. U username Specifies the user to connect as; defaults to current system user. W Forces password prompt even if the connecting server does not require it. Backup Options a, –data-only Restores only the data contained in the archive. c, –clean Drops objects before creating them. C, –create Creates the database in the archive and restores into it. d, –dbname Connects to the named database and restores within that database. e, –exit-on-error Exits if an error is encountered; default is to continue and report errors. f, –file=file Specifies an output file for the generated script rather than standard out. F, –format=c|t Specifies the format of the archive; custom or tar-archive. i, –ignore-version Ignores version mismatch between the database and pg_restore. I, –index=index Restores only the named index. l, –list Lists the contents of the archive. L, –use-list=list-file Restores objects in list file in the order listed in the file. n, –schema Restores only the objects or data in the given namespace (i.e. schema). New in 8.1. O, –no-owner Does not execute command to set object ownership. P, –function=function(args) Restores only the specified function name and arguments.
From our experience, we can recommend PHP Web Hosting services, if you need affordable webhost to host and run your web application.