I have done these steps:
postgresql.conf
Set these parameters:
wal_level = archive
archive_mode =on
archive_command = ''copy %p \\\\192.168.1.10\\Archive\\wals\\%f''
Where 192.168.1.10 is my PC IP address and Archive is a shared folder in D drive.
When I restart postgres service I found the archived files in Archive folder.
That's what I want to do.
But now I want to store the archived files in another PC having the IP address "192.168.1.41" for that I did these steps:
archive_command = ''copy %p \\\\192.168.1.41\\Archive\\wals\\%f''
in my PCNow when I restart the postgres service no archived files are received in remote PC "192.168.1.41".
When I open the pg_log
folder to see the log file I found the error somthing like:
The failed archive command was:
copy pg_xlog\000000010000000000000009 \\192.168.1.41\PGArchivewals\000000010000000000000009
The referenced account is currently locked out and may not be logged on to.
Set the firewall on on both the PC(master and slave) and check the permission for the account by which you are accessing the postgres database