pg_upgrade.1
上传用户:blenddy
上传日期:2007-01-07
资源大小:6495k
文件大小:1k
- ." This is -*-nroff-*-
- ." XXX standard disclaimer belongs here....
- ." $Header: /usr/local/cvsroot/pgsql/src/man/Attic/pg_upgrade.1,v 1.5 1998/10/25 02:47:38 momjian Exp $
- .TH pg_upgrade UNIX 1/20/96 PostgreSQL PostgreSQL
- .SH NAME
- pg_upgrade - allows upgrade from a previous release without reloading data
- .SH SYNOPSIS
- .BR pg_upgrade
- [-f input_file] old_data_dir
- .SH DESCRIPTION
- .IR "pg_upgrade"
- is a utility for upgrading from a previous PostgreSQL release
- without reloading all the data.
- First, to be safe, back up your data directory.
- Then, use:
- .nf
- pg_dumpall -s -z >db.out
- .fi
- to dump out your old database definitions without any data.
- Stop the postmaster and all backends.
- .PP
- Then rename (using
- .IR mv )
- your old pgsql /data directory to /data.old and do a
- .IR "make install"
- to install the new binaries.
- Run
- .IR initdb
- to create a new
- .IR template1
- database containing the system tables for the new release.
- Start the new postmaster,
- .IR cd
- to the pgsql main directory, and type:
- .nf
- pg_upgrade -f db.out data.old
- .fi
- The system will do some checking to make sure everything is properly
- configured, and run your
- .IR db.out
- script to create all the databases and tables you had, but with no data.
- It will then move the data files from /data.old into the proper
- .IR /data
- directory.
- You can then check out the data.
- You can delete the
- .IR /data.old
- directory when you are finished.
- .SH "SEE ALSO"
- pg_dumpall(1).