IonelBoeriu
asked on
Rsync on Solaris 10
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:
#!/bin/bash
SOURCEPATH='/cluster'
DESTPATH='/'
DESTHOST='192.168.28.251'
DESTUSER=root
LOGFILE=rsync.log
echo $\n\n >> $LOGFILE
rsync -e ssh -avz --delete-after $SOURCEPATH $DESTUSER@$DESTHOST:$DESTP ATH 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
Thanks
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:
#!/bin/bash
SOURCEPATH='/cluster'
DESTPATH='/'
DESTHOST='192.168.28.251'
DESTUSER=root
LOGFILE=rsync.log
echo $\n\n >> $LOGFILE
rsync -e ssh -avz --delete-after $SOURCEPATH $DESTUSER@$DESTHOST:$DESTP
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
Thanks
do you really need to copy every thing? why don't you just copy the data files?
ASKER
Thanks for your replay
Why you mean data files?
I need to have same date on both server, to be mirroring. Wlill be copied the first time after that will be copied only the changes
Why you mean data files?
I need to have same date on both server, to be mirroring. Wlill be copied the first time after that will be copied only the changes
Are you running the two database servers on parallel?
what I mean is that other files are static in nature and only the database data files change, and these that you want to sync
what I mean is that other files are static in nature and only the database data files change, and these that you want to sync
ASKER
I want to have 2 database servers
Server A and server B.
I need to server A to send or from server B to pull data. On the final A and B to have the same date and to be syncronized every 5 min, let say.
Thanks for help
Server A and server B.
I need to server A to send or from server B to pull data. On the final A and B to have the same date and to be syncronized every 5 min, let say.
Thanks for help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.