Solved

Rsync on Solaris 10

Posted on 2009-03-31
6
1,360 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

VM backups can be lost due to a number of reasons: accidental backup deletion, backup file corruption, disk failure, lost or stolen hardware, malicious attack, or due to some other undesired and unpredicted event. Thus, having more than one copy of …
In this article we will learn how to backup a VMware farm using Nakivo Backup & Replication. In this tutorial we will install the software on a Windows 2012 R2 Server.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

739 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