

Type the following command, and then press ENTER. If you have physical access to the computer, you can open a DOS or terminal window to access the command line.

You can use the pg_dump command line program, or you can use phpPgAdmin to backup a PostgreSQL database to a file.Īccess the command line on the computer where the database is stored. pg_dump does not block other users accessing the database (readers or writers). It makes consistent backups even if the database is being used concurrently. Pg_dump is a utility for backing up a PostgreSQL database. Test your strategy by restoring a set of backups and then recovering your database. A well-planned backup and restore strategy helps protect databases against data loss. To minimize the risk of data loss, you need to back up your databases to preserve modifications to your data on a regular basis. The PostgreSQL server backup and restore component provide an essential safeguard for protecting critical data stored in server databases. User errors, for example, dropping a table by mistake.Hardware failures, for example, a damaged disk drive.Media failure : A media failure is the failure of a read or write of a disk file required to run the database, due to a physical problem with the disk such as a head crash.With valid backups of a database, you can recover your data from many failures, such as : Every physical backup is a copy of files storing database information to some other location, whether on disk or some offline storage such as tape. Backups are backups of the physical files used in storing and recovering your databases, such as datafiles, control files, and others.

A backup is a copy of data from your database that can be used to reconstruct that data.
