Re: How to restore to empty database

2020-01-31 Thread Adrian Klaver
On 1/30/20 10:21 PM, Andrus wrote: Hi! These days 37 GB is relatively small, so you maybe getting into the realm of premature optimization. Do the 24 databases represent an entire cluster you are trying to transfer? Basically yes. Cluster contains also  small test database which actually doe

Re: How to restore to empty database

2020-01-30 Thread Andrus
Hi! These days 37 GB is relatively small, so you maybe getting into the realm of premature optimization. Do the 24 databases represent an entire cluster you are trying to transfer? Basically yes. Cluster contains also small test database which actually does not need transferred but I can de

Re: How to restore to empty database

2020-01-30 Thread Adrian Klaver
On 1/30/20 3:08 PM, Andrus wrote: Hi! You need to connect to a database that exists with --dbname, for instance --dbname=postgres. Postgres will then use that connection to create the new database, in your case mydb. Thank you, this seems work. There are total 24 databases, .backup files tot

Re: How to restore to empty database

2020-01-30 Thread Andrus
Hi! You need to connect to a database that exists with --dbname, for instance --dbname=postgres. Postgres will then use that connection to create the new database, in your case mydb. Thank you, this seems work. There are total 24 databases, .backup files total size in 37GB , aprox 60 % from t

Re: How to restore to empty database

2020-01-30 Thread Adrian Klaver
On 1/30/20 2:23 PM, Andrus wrote: Hi! I want to restore to new empty database using pg_restore . pg_restore should create new empty database and restore into it. If database exists, pg_restore should clean all data from it or drop and create new empty database before restore. According to pg_

How to restore to empty database

2020-01-30 Thread Andrus
Hi! I want to restore to new empty database using pg_restore . pg_restore should create new empty database and restore into it. If database exists, pg_restore should clean all data from it or drop and create new empty database before restore. According to pg_restore doc, switches --clean --cre