Web hosting company - CHAPTER 26 POSTGRESQL ADMINISTRATION the next few

CHAPTER 26 POSTGRESQL ADMINISTRATION the next few PostgreSQL releases. However, the advantages it offers in ease of administration are very compelling, and thus you are encouraged to read more about it in the 8.1 documentation and use it when you can. Backup and Recovery Although not strictly needed for good performance, backing up your database should be a natural part of any production system. These tasks are not difficult to perform in PostgreSQL, but it is important to fully understand exactly what you are getting with your backups before a failure occurs. There is nothing worse than having a hard drive go out and then realizing you weren t doing proper backups. There are three commands that cover database backups and restores, covered next. pg_dump Because the database is the backbone of many enterprise systems, and those systems are expected to run 24 hours a day, 7 days a week, it is imperative that you have a way to take online backups without the need to bring the system down. In PostgreSQL, this is accomplished with the pg_dump command: pg_dump [option] [dbname] The options for pg_dump are listed in Table 26-4. Table 26-4. pg_dump 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 Outputs data only from the database, not from the schema. Used in plain-text dumps. b, –blobs Includes large objects in the dump. Used in nontext dumps. On by default in 8.1. c, –clean Outputs SQL to drop objects before creating them. Used in plain-text dumps. C, –create Includes a command to create the database itself. Used in plain-text dumps.
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.

Leave a Reply