Re: exclude option for rsync

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Mon, Nov 10, 2008 at 10:54 AM, Cameron Simpson <cs@xxxxxxxxxx> wrote:
On 10Nov2008 09:56, L <yuanlux@xxxxxxxxx> wrote:
| I use rsync to sync a mirror site. I wnat to exclude files that were created
| more than 10 days ago. I have  a long list of excludes in a file. But I want
| a dynamic option.
| what is the option for this in rsync ?

As far as I'm aware there isn't one. The include/exclude stuff is
entirely pathname based. I have in the past done a recursive _listing_
of a mirror site, chosen files out of that, and constructed an
include/exclude file on that basis. This was automated with a script.

In my case the example was a GNU archive with multiple versions of
packages; I wished only to mirror the "latest" package.

If you can construct (via, perhaps, "rsync -n" and some postprocessing)
a list of the remote files that you want, or do not want, it is a pretty
easy task to convert that into an include/exclude list automatically. Then
you just use that in a wrapper script for calling rsync.

Cheers,
--

at the bottom of rsync example page @

http://www.samba.org/rsync/examples.html

it says

Fancy footwork with remote file lists


One little known feature of rsync is the fact that when run over a
remote shell (such as rsh or ssh) you can give any shell command as
the remote file list. The shell command is expanded by your remote
shell before rsync is called. For example, see if you can work out
what this does:

rsync -avR remote:'`find /home -name "*.[ch]"`' /tmp/

note that that is backquotes enclosed by quotes (some browsers don't
show that correctly).

not sure how to make this work.

Y

 

Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

MS-DOS: "... an OS originally designed for a microprocessor that modern
kitchen appliances would sneer at...."
       - Dave Trowbridge, _Computer Technology Review_, Aug '90

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux