The migrate_postgresql_database helps with upgrade of PostgreSQL database from version 8 to 9. You usually need to run it only once per SLMS site after the upgrade of SLMS itself (see Section 2.2, Upgrade from SLMS 1.2). Both—the old and the new— versions of PostgreSQL servers must be already installed in the system.
The command understands the following options:
Prints useful information on the command's usage.
Specifies the path to a temporary dump file (/var/lib/slms/slms_db_export.sql.gz by default). If a file of the identical name exists, it is renamed before the new dump is created (time stamp suffix is added). Use together with --dump-only and --restore-only options.
Leaves the dump of the old-format database on the file system. By default, the dump file is removed after successful upgrade.
Leaves the old-format subdirectory tree on the file system. By default
old database files are removed after successful
clear commands to the database dump to clear
the old data when restoring a database (not used by default, a new
empty database is created at restore time, so this should not be
Forces the database migration even if the latest PostgreSQL database is already running.
Only performs a dump of the current database to a file specified with --file.
Only restores the database from a dump file (created with --dump-only) specified with --file.