Depois de fazer todo o processo de configuração dos parametros necessarios para usar os archives e fiz o select start_backup em seguida fiz a cópia base (cp opt/postgres/9.0/data/* /home/arquivos/data.old/) parei o backup com select stop_backup... em seguida deletei a pasta data ( rm -f /opt/postgres/9.0/data/*) depois movi o diretório data antiga ( mv /home/arquivos/data.old/* opt/postgres/9.0/data/) deletei todos arquivos do diretório pg_xlog, copiei os logs trasacionais gerados para a pasta pg_xlog (mv /home/archive/* /opt/postgres/9.0/data/pg_xlog/) configurei o recovery.conf com uma única linha: restore_command = 'cp /home/postgres/replicacao/archive/%f %p' bem o problema agora e quando tendo iniciar o banco ele não inicia da os seguintes erros:
pg_ctl start -D /opt/postgres/9.0/data -l /opt/postgres/9.0/data/log pg_ctl: another server might be running; trying to start server anyway pg_ctl: could not start server Examine the log output. erro gravado em: /opt/postgres/9.0/data/log FATAL: data directory "/opt/postgres/9.0/data" has group or world access DETAIL: Permissions should be u=rwx (0700). olha só as permissões do diretório data: drwxr-x--- 14 postgres postgres 4096 Set 27 08:49 . drwxr-xr-x 9 postgres postgres 4096 Set 26 14:23 .. -rwxr-x--- 1 postgres postgres 145 Set 26 14:24 backup_label drwxr-x--- 5 postgres postgres 4096 Set 26 14:24 base drwxr-x--- 2 postgres postgres 4096 Set 26 14:24 global -rwxr-x--- 1 postgres postgres 595 Set 27 08:30 log drwxr-x--- 2 postgres postgres 4096 Set 26 14:24 pg_clog -rwxr-x--- 1 postgres postgres 3760 Set 26 14:24 pg_hba.conf -rwxr-x--- 1 postgres postgres 1636 Set 26 14:24 pg_ident.conf drwxr-x--- 2 postgres postgres 4096 Set 26 17:50 pg_log drwxr-x--- 4 postgres postgres 4096 Set 26 14:24 pg_multixact drwxr-x--- 2 postgres postgres 4096 Set 26 14:24 pg_notify drwxr-x--- 2 postgres postgres 4096 Set 26 14:24 pg_stat_tmp drwxr-x--- 2 postgres postgres 4096 Set 26 14:24 pg_subtrans drwxr-x--- 2 postgres postgres 4096 Set 26 14:24 pg_tblspc drwxr-x--- 2 postgres postgres 4096 Set 26 14:24 pg_twophase -rwxr-x--- 1 postgres postgres 4 Set 26 14:24 PG_VERSION drwxr-x--- 3 postgres postgres 4096 Set 26 14:39 pg_xlog drwxr-x--- 3 postgres postgres 4096 Set 26 14:24 pg_xlog.bkp -rwxr-x--- 1 postgres postgres 18011 Set 26 14:24 postgresql.conf -rwxr-x--- 1 postgres postgres 61 Set 26 14:24 postmaster.opts -rwxr-x--- 1 postgres postgres 49 Set 26 14:24 postmaster.pid -rwxr-x--- 1 postgres postgres 63 Set 26 14:49 recovery.conf aqui meus logs archives: postgres root 4096 Set 26 14:21 . drwxr-xr-x 4 507 506 4096 Set 26 13:10 .. -rw------- 1 postgres postgres 16777216 Set 26 13:02 000000010000000000000001 -rw------- 1 postgres postgres 16777216 Set 26 13:02 000000010000000000000002 -rw------- 1 postgres postgres 241 Set 26 13:02 000000010000000000000002.00000020.backup -rw------- 1 postgres postgres 16777216 Set 26 13:08 000000010000000000000003 -rw------- 1 postgres postgres 16777216 Set 26 13:15 000000010000000000000004 -rw------- 1 postgres postgres 241 Set 26 13:15 000000010000000000000004.00000020.backup -rw------- 1 postgres postgres 16777216 Set 26 13:35 000000010000000000000005 -rw------- 1 postgres postgres 16777216 Set 26 13:36 000000010000000000000006 -rw------- 1 postgres postgres 16777216 Set 26 13:36 000000010000000000000007 -rw------- 1 postgres postgres 16777216 Set 26 13:36 000000010000000000000008 -rw------- 1 postgres postgres 16777216 Set 26 13:36 000000010000000000000009 -rw------- 1 postgres postgres 16777216 Set 26 13:36 00000001000000000000000A -rw------- 1 postgres postgres 16777216 Set 26 13:36 00000001000000000000000B -rw------- 1 postgres postgres 16777216 Set 26 13:36 00000001000000000000000C -rw------- 1 postgres postgres 16777216 Set 26 13:36 00000001000000000000000D -rw------- 1 postgres postgres 16777216 Set 26 13:56 00000001000000000000000E -rw------- 1 postgres postgres 16777216 Set 26 13:57 00000001000000000000000F -rw------- 1 postgres postgres 241 Set 26 13:57 00000001000000000000000F.00000020.backup -rw------- 1 postgres postgres 16777216 Set 26 14:11 000000010000000000000010 -rw------- 1 postgres postgres 244 Set 26 14:11 000000010000000000000010.00000020.backup -rw------- 1 postgres postgres 16777216 Set 26 14:16 000000010000000000000011 -rw------- 1 postgres postgres 16777216 Set 26 14:16 000000010000000000000012 -rw------- 1 postgres postgres 16777216 Set 26 14:17 000000010000000000000013 -rw------- 1 postgres postgres 16777216 Set 26 14:17 000000010000000000000014 -rw------- 1 postgres postgres 16777216 Set 26 14:17 000000010000000000000015 -rw------- 1 postgres postgres 16777216 Set 26 14:17 000000010000000000000016 -rw------- 1 postgres postgres 16777216 Set 26 14:17 000000010000000000000017 -rw------- 1 postgres postgres 16777216 Set 26 14:17 000000010000000000000018 -rw------- 1 postgres postgres 16777216 Set 26 14:17 000000010000000000000019 -rw------- 1 postgres postgres 16777216 Set 26 14:21 00000001000000000000001A o que vcs cahammm? alguem pode me ajudar....Obrigado mais uma vez... 2011/9/23 Euler Taveira de Oliveira <eu...@timbira.com> > On 23-09-2011 09:27, Hélio José wrote: > > 2011-09-23 11:54:53 GMT [18333]: [1-1] user=,db=FATAL: lock file > > "postmaster.pid" already exists > > > Quando você fizer a cópia do $PGDATA do servidor principal é bom excluir os > seguintes arquivos do servidor em espera: > > pg_xlog/* > pg_log/* > postmaster.pid > > Este arquivo existe no servidor principal para impedir que outro servidor > inicie utilizando o mesmo $PGDATA. > > > -- > Euler Taveira de Oliveira - Timbira http://www.timbira.com.br/ > PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento > _______________________________________________ > pgbr-geral mailing list > pgbr-geral@listas.postgresql.org.br > https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral > -- -- Hélio José (61) 99840139
_______________________________________________ pgbr-geral mailing list pgbr-geral@listas.postgresql.org.br https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral