I am using rsync to mirror postgres from one Solaris server to other Solaris server.
The problem is after I run the script the data is not updated only after I restart the data.
I think because the rsync is copy the postmaster.pid too from the first server.
This is my 1ST script:
echo $\n\n >> $LOGFILE
rsync -e ssh -avz --delete-after $SOURCEPATH $DESTUSER@$DESTHOST:$DESTPATH 2>&1 >> $LOGFILE
echo "Completed at: `/bin/date`" >> $LOGFILE
After that I add onethr line to the script : --exclude postmaster.pid
Now i got an error: rsync: link_stat "/SOURCEPATH" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1040) [sender=3.0.5]
What I am doing wrong?
Guys do you know how i can copy with out postmaster.pid