LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 07-21-2010, 09:15 PM   #1
xiutuo
Member
 
Registered: Mar 2008
Posts: 52

Rep: Reputation: 15
rsync can not rsync files with include filter...


use rsync to cp such files and dirs under /var/www/html/mydir directory
but these two files (/dir4/1.html /dir4/2.html) cant rsync to dest mechine.I still dont know why,,give me a hint?thx

rsync configure file,below...

[rsy_file_and_dir]
comment= rsync some files and some dir
path=/var/www/html/mydir
read only= no
include= file1 file2/dir1/*** /dir2/*** /dir3/*** /dir4/1.html /dir4/2.html
exclude=*
auth users=testuser
 
Old 07-22-2010, 03:52 PM   #2
BinWondrin
Member
 
Registered: Jun 2008
Distribution: Fedora, RHEL, Ubuntu
Posts: 33

Rep: Reputation: 15
I'm not sure if this is helpful or not. I had a similar problem. What I didn't realize was that the location of the include or exclude files is relative to where you run rsync from.
I wanted to rsync a whole system while excluding /tmp /home /dev /proc etc
My exclude file looked like this:
tmp/
home/
dev/
proc/

and I ran the rsync command out of /



BinWondrin
 
Old 07-23-2010, 02:10 AM   #3
xiutuo
Member
 
Registered: Mar 2008
Posts: 52

Original Poster
Rep: Reputation: 15
thx for your reply,i made my question clear now,

dir infomation:
/var/www/html/mydir
/var/www/html/mydir/(file1,file2)
/var/www/html/mydir/dir1
/var/www/html/mydir/dir1/(file1,file2...fileN)
/var/www/html/mydir/dir2
/var/www/html/mydir/dir2/(file1,file2...fileN)
/var/www/html/mydir/dir3/
/var/www/html/mydir/dir3/(file1,file2...fileN)
/var/www/html/mydir/dir4/
/var/www/html/mydir/dir4/(1.html,2.html)

rsync configuration file /etc/rsyncd.conf content:
and /var/www/html/mydir owner:testuser
-------------------------------------
[rsy_file_and_dir]
comment= rsync some files and some dir
path=/var/www/html/mydir
read only= no
include= file1 file2/dir1/*** /dir2/*** /dir3/*** /dir4/1.html /dir4/2.html
exclude=*
auth users=testuser
------------------------------------


at other linux machine(local_linux),use following command to rysc ...
# rsync -avzp testuser@remote_ip::rsy_file_and_dir /somewhere/somedir/

finally,,,,
these two files /var/www/html/mydir/dir4/(1.html,2.html) cant rysc to local_linux....
!!...confuese...!!

something wrong with /etc/rsyncd.conf ? but i still consist something wrong with exclude or include filter

Last edited by xiutuo; 07-23-2010 at 02:25 AM.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rsync exclude (or include) issue eyeprotocol Linux - General 1 02-09-2010 11:08 PM
Could I run rsync to download files from a server without rsync daemon? Richard.Yang Linux - Software 1 09-18-2009 04:08 AM
Help with rsync filter file Meson Linux - General 1 09-29-2008 06:59 PM
rsync - How to Include Hidden (.something) Files and Directories? edwin11 Linux - Software 4 11-29-2006 07:47 AM
RSYNC and include?? JediKnight2 Linux - Software 0 02-04-2005 11:52 AM


All times are GMT -5. The time now is 05:40 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration