Solved

Rsync on Solaris 10

Posted on 2009-03-31
6
1,371 Views
Last Modified: 2013-12-21
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:$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
Thanks
0
Comment
Question by:IonelBoeriu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 40

Expert Comment

by:omarfarid
ID: 24033034
do you really need to copy every thing? why don't you just copy the data files?
0
 

Author Comment

by:IonelBoeriu
ID: 24033100
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
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 24033155
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
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:IonelBoeriu
ID: 24033224
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
0
 
LVL 38

Accepted Solution

by:
yuzh earned 250 total points
ID: 24035475
You should use the proper tools the database vendor provides to backup the database .
Please read:
http://www.sanitarium.net/golug/rsync_backups.html 
0
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 250 total points
ID: 24036342
rsync is the wrong tool for this task.  You should be using Postgres replication.
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you looking to recover an email message or a contact you just deleted mistakenly? Or you are searching for a contact that you erased from your MS Outlook ‘Contacts’ folder and now realized that it was important.
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question