Can I backup/restore a database in a sql script?

Поиск
Список
Период
Сортировка
От Joost Kraaijeveld
Тема Can I backup/restore a database in a sql script?
Дата
Msg-id A3D1526C98B7C1409A687E0943EAC41060600F@obelix.askesis.nl
обсуждение исходный текст
Ответы Re: Can I backup/restore a database in a sql script?  (Achilleas Mantzios <achill@matrix.gatewaynet.com>)
Re: [GENERAL] Can I backup/restore a database in a sql script?  (Richard Huxton <dev@archonet.com>)
Список pgsql-admin
Hi,

I want to write a sql script in which I backup a database and restore a new (altered) version of that database. Is that
possible?If so , can anyone give me an example of how to do that?  

I can run it from any command prompt (psql -U postgres template1 < my_db.backup)    but I would like it to run from
psql(which should give me 1 script for all platforms I must do this: Windows, FreeBSD and Debian) 

TIA

Joost

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Jayakumar_Mukundaraju"
Дата:
Сообщение: Re: back up maintenance schedule
Следующее
От: Achilleas Mantzios
Дата:
Сообщение: Re: Can I backup/restore a database in a sql script?