LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-16-2007, 10:17 AM   #1
bdowns
LQ Newbie
 
Registered: Dec 2004
Location: Ambler, PA
Distribution: Fedora Core 2, RedHat 9, FreeBSD 5.3
Posts: 5

Rep: Reputation: 0
Rsync & NFS Help


Hello all.

I have a web server whose doc root is an NFS share on another server. It's mounted (rw) and that all works fine.

I then wanted to have the data sync to another server for a hot fail over. For that I decided to use the Inotify and the following script:

inotifywait -mr --timefmt '%d/%m/%y %H:%M' --format '%T %w%f' -e create -e modify -e moved_to -e moved_from -e delete -e delete_self /home/web | while read date time file;
do
/usr/bin/rsync -togl --stats ${file} -e ssh copy@10.100.1.164:${file} && echo "`date` ${file} sunk."
done

Inotify picks up on the file change or creation, etc, but when rsync tries to move the file, I get an error stating:

rsync: link_stat "/file/I'm/trying/to/move/" failed: Permission denied (13)

Any ideas as to where I'm going wrong?

Thanks in advance.
Brian

Last edited by bdowns; 11-16-2007 at 10:32 AM.
 
Old 11-16-2007, 11:27 AM   #2
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
You are either unable to read or unable to write the file. Here is the rsync command I use to sync my production and mirror servers. I use ssh keys for authentication:

/usr/bin/rsync --delete -trlpoge ssh /usr/local/web/htdocs mirrorserver:/usr/local/web

I run it from the production server on a daily basis, not automatically (things only change on the production server at a set time, so it isn't an issue in my environment).

HTH

Forrest
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync painfully slow over an nfs mount, between 2 vpn'ed pcs nass Slackware 2 09-21-2007 01:40 PM
Protocols (rsync, ssh, nfs, ipp) working only in one direction hroit Linux - General 8 08-23-2007 04:27 PM
Network utilization problems - Rsync and NFS Retrievil_Knievil Linux - Networking 12 08-09-2007 06:03 AM
What distro to use for home nfs/rsync/mpd/apache server? hollywoodb Linux - General 2 03-23-2007 01:02 PM
rsync & acl collen Linux - Software 0 12-10-2003 10:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration