Re: Re-sync slave server
От | Adrian Klaver |
---|---|
Тема | Re: Re-sync slave server |
Дата | |
Msg-id | 0c2aaff0-eb48-e052-cf38-5092f702254b@aklaver.com обсуждение исходный текст |
Ответ на | Re: Re-sync slave server (Patrick B <patrickbakerbr@gmail.com>) |
Список | pgsql-general |
On 06/08/2016 01:47 PM, Patrick B wrote: > > > 2016-06-08 11:03 GMT+12:00 Adrian Klaver <adrian.klaver@aklaver.com > <mailto:adrian.klaver@aklaver.com>>: > > On 06/07/2016 03:22 PM, Patrick B wrote: > > One more question guys... > > Does the pg_basebackup re-write the data? or do I have to have > free space? > > Like.. the DB is 2 TB.. do I have to have more 2TB? or it will > use those > 2TB that already are there? > > > I would suggest taking a tour of: > > https://www.postgresql.org/docs/9.2/static/app-pgbasebackup.html > > > It does not say anything about that.. if it will use more space or if it > will replace the current data and the disk space will be the same https://www.postgresql.org/docs/9.2/static/app-pgbasebackup.html " -D directory --pgdata=directory Directory to write the output to. pg_basebackup will create the directory and any parent directories if necessary. The directory may already exist, but it is an error if the directory already exists and is not empty. When the backup is in tar mode, and the directory is specified as - (dash), the tar file will be written to stdout. This option is required. " So no it will not replace existing data. You will need to start with an empty $DATADIR. If you do not want to duplicate the space empty the existing $DATADIR. If you want to be double safe run the backup to another directory and then copy it over later. -- Adrian Klaver adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления: