Re: Data duplication when moving datafiles from one server to another.

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Data duplication when moving datafiles from one server to another.
Дата
Msg-id 4D10948002000025000388C3@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: Data duplication when moving datafiles from one server to another.  (Iñigo Martinez Lasala <imartinez@vectorsf.com>)
Список pgsql-admin
IñigoMartinez Lasala <imartinez@vectorsf.com> wrote:

> Data duplication happened on source server (that is, on production
> environment). This data duplication affected only on some tables,
> with some duplicated PKs and altered sequences (sequences value
> didn't match "select max()" and we had to fix it manually).

We rsync from production servers all the time, and have never seen
such problems.  Maybe someone else has ideas beyond my long shots
(below).

> Postgres version is 8.2.7 64bit on Ubuntu Server 8.04 LTS

There have been 12 bug fix releases for the 8.2 major release since
8.2.7.  It's not impossible that you somehow hit a bug which has
been fixed in the last 33 months.

http://www.postgresql.org/support/versioning

http://www.postgresql.org/docs/8.2/static/release.html

> Rsync command was:
> rsync -avt -lHpogDtx /srv/postgresql/8.2/main/
> root@destination_server:/srv/postgresql/8.2/main/

Did it run successfully on the first try, or might there have been
an attempt where the target was mis-specified?  A space instead of a
colon between the target server and path might have caused the kind
of corruption you're seeing.

Also -- I would avoid using root for such things.  We have remote
root login disabled entirely on our machines, and limit the use of
that login to situations where there is no reasonable alternative.

> and was launched from source server.

I find it's harder to accidentally damage the remote copy, so I run
rsync from the target where possible.

-Kevin

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

Предыдущее
От: "Zoran muljevski"
Дата:
Сообщение: size of the database
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: size of the database