mardi 30 décembre 2014

rsync --files-from with wildcards


Let's say I want to recreate a subset of my hierarchy. for arguments sake, let's say I want to backup files in filelist.conf



/usr/lib/ld-*
/usr/bin/gcc*
/etc/passwd
/etc/nonexisting


the following "almost" works



mkdir /tmp/testme
rsync -avx / /tmp/testme --files-from filelist.conf


that is, if I know the filename, but I want this wildcard facility here (as gcc and ld may often change versions). this may simply not be in the feature set of rsync and I may need to code this by hand. then again, rsync has so many features and options, they are easy to overlook.



Aucun commentaire:

Enregistrer un commentaire