On 10/29/2015 10:54 AM, Melvin Davidson wrote:
>Probably not a good idea to put your data in the postgres database. This is one of the system databases created by >initdb and is meant to be used as a default database to connect to, not really as one to store data in. Just did a test >with pg_dumpall and it is not dumped when you backup the entire cluster. This statement is not entirely accurate. Although I agree it is a good idea to have a separate named database for each "application"pg_dumpall does not add a "CREATE DATABASE postgres;" to the dump file because pg_restore expects that the postgres database already exists. However, all objects in the postgres database are dumped and will be restored. This can be verified because you can do a "grep 'connect postgres' <your_pg_dump_file" and it will be found, as are any object in the postgres database..
You are correct. I did not dig deep enough into the dump file.
On Wed, Oct 28, 2015 at 7:57 PM, Yves Dorfsman <yves@xxxxxxxxx <mailto:yves@xxxxxxxxx>> wrote: On 2015-10-28 14:09, anj patnaik wrote: > > Also, I want to know if anyone has found any handy cron scripts for automated > backups to run on a daily/weekly basis? i found some on google, but interested > to know if there are better ones. It does a lot more but: https://github.com/wal-e/wal-e -- http://yves.zioup.com gpg: 4096R/32B0F416 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx <mailto:pgsql-general@xxxxxxxxxxxxxx>) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.
-- Adrian Klaver adrian.klaver@xxxxxxxxxxx -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general