Search Postgresql Archives

Re: WAL shipping question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



SHARMILA JOTHIRAJAH wrote:
Im trying to play a bit with log shipping between 2 servers primary
 and standby. These servers are running versions 8.3betat3. I had set up
 continuous archiving at the primary server. The manuals' example of
 archive_command is
archive_command = 'cp -i %p /mnt/server/archivedir/%f </dev/null'

This basically archives the data in the primary server
itself...right!!!
But how can I set up continuous archiving from primary to a directory
 (WAL archive directory)
on the stand-by server ?

a. Mount the remote directory via NFS/SMBFS/...
b. Use a remote copy, e.g. scp, FTP...


Thanks...
I tried this command to both copy in the primary server and scp to standby server.

archive_command = 'cp -i "%p" .../archivedir/"%f" &&
scp -B "%p".../archivedir/"%f" "%p" user@xxxxxxxxxxx:/....archivedir/"%f"'
cp works but scp doesnt work. Is it becoz scp generally asks for password. I can do scp or ssh without password authentication but Im not sure if it is safe to do that.

What is the alternative for getting this done?

You can generate a public/private key pair on the database server and store the public version in ~/.ssh/authorized_keys on the remote server. Google for details.

--
  Richard Huxton
  Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
      message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux