This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
how_to:restore_a_database_backup [2013/09/23 13:35] – [Restore a database backup] paul | how_to:restore_a_database_backup [2023/09/06 10:09] (current) – paul | ||
---|---|---|---|
Line 16: | Line 16: | ||
- Run pgsql\bin\pg_restore -U postgres -C -v -d postgres < | - Run pgsql\bin\pg_restore -U postgres -C -v -d postgres < | ||
+ | |||
+ | =====Keeping the old database===== | ||
+ | Sometimes you may want to keep the old database as well (if you have sufficient disk space), for example to be able to recover messages from it that have arrived since the last good backup. | ||
+ | |||
+ | In that case, run | ||
+ | |||
+ | pgsql\bin\psql -U postgres -p 5433 | ||
+ | | ||
+ | (default password is ' | ||
+ | |||
+ | Then | ||
+ | alter database vpop3 rename to vpop3_old; | ||
+ | | ||
+ | Then, after restoring the new database, you can restore messages from it using the ' | ||
+ | |||
+ | Then, after restoring all the messages from the old database, you can delete it to free up space, by running | ||
+ | pgsql\bin\dropdb -U postgres vpop3_old | ||
+ | | ||
+ | (default password is ' | ||
+ | |