AARGH! I can't make rsync not copy dirs with --files-from option

David C. Rankin drankinatty at suddenlinkmail.com
Sat Mar 14 21:11:12 GMT 2009


	I'm running rsync 3.02 and I have a simple thing I'm trying to do, but rsync
won't let me do it. What I'm trying to do is consolidate saved rpms on openSuSE
11.0 to a central server for local updates. openSuSE saves the rpms in:

/var/cache/zypp/packages/<repository name>

	I have written a script that parses all the file names and creates temp files
that holds the full path to the rpms. The rpms are separated into 5 files which
are used to categorize the rpms (delta i586 noarch src x86_64). An example of
the file contents is:

17:34 alchemy:~/linux/scripts/config/zypp> tail -n3 /tmp/zyppcon/*
==> /tmp/zyppcon/delta <==

==> /tmp/zyppcon/i586 <==

==> /tmp/zyppcon/noarch <==

==> /tmp/zyppcon/src <==

==> /tmp/zyppcon/x86_64 <==

	These files are on host 'alchemy'. I want to rsync them to host 'nirvana'
under /home/backup/rpms/(delta,i586,noarch,src,x86_64), respectively.  The
rsync call in the script is is:


/usr/bin/rsync -auv --files-from=${TEMPDIR}/${i} /

	rsync is called from within a for loop where $i iterates through the files

	All I am trying to do is to rsync (say for example this file):


	from alchemy and have it end up in nirvana:/home/backup/rpms/delta. (it would
be rsync'ed when $i=delta.

	For the life of me I *can't make it work*. I have tried every combination of
--no-relative, --no-dirs and --no-implied-dirs (I know, but I was desperate),
and no matter what I do, the files end up in:


	Way too much path, way way too much path. There are thousands of rpms, so the
thought of calling rsync for every file is a no go

David C. Rankin, J.D.,P.E.
Rankin Law Firm, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
Telephone: (936) 715-9333
Facsimile: (936) 715-9339

More information about the rsync mailing list