[linux] rsync problem - prenasanie IBA *.bz2 suborov - VYRIESENE

Lubomir Host rajo na platon.sk
Pátek Březen 14 14:47:29 CET 2008


Aby som to zhrnul: na forach a v roznych HOWTO som sa nedozvedel nic.
Backupovanie vsetkych suborov rsyncom uz vyriesene mam, ja teraz
potrebujem prenasat IBA *.bz2 subory.

Takze uz som zacinal postupne citat zdrojaky rsyncu, ked som este raz
narazil na tuto sekciu v manuali:


man rsync:
  -m, --prune-empty-dirs
    ...
    Here’s an example that copies all .pdf files in a hierarchy, only creating the necessary destination directories to hold the  .pdf  files,  and  ensures  that  any
    superfluous files and directories in the destination are removed (note the hide filter of non-directories being used instead of an exclude):

    rsync -avm --del --include=’*.pdf’ -f ’hide,! */’ src/ dest

    If  you  didn’t want to remove superfluous destination files, the more time-honored options of "--include=’*/’ --exclude=’*’" would work fine in place of the hide-
    filter (if that is more natural to you).

Explicitne uvedeny priklad "rsync -avm --del --include=’*.pdf’ -f
’hide,! */’ src/ dest" tiez nerobil to, co som potreboval. A potom som
konecne nasiel tu spravnu kombinaciu:

rsync -avm --stats --numeric-ids --itemize-changes --acls \
    --include '*.bz2' --include='*/' --exclude='*' \
    -e 'ssh -i /root/.ssh/id_dsa' root na server:/var/log/ /backup/server/logfiles/

Teraz, ked sa pozeram na tu kombinaciu parametrov, tak je celkom
logicka. Preco som na nu nevedel prist skor uz fakt nejdem skumat. :-)

Vdaka za komentare a napady.

rajo

-- 
  ,''`.  Lubomir Host 'rajo' <rajo AT platon.sk>    ICQ #:  257322664
 : :' :  Jabber: rajo AT jabber.platon.sk      VoIP: callto://rajo207
 `. `'   WWW: http://rajo.platon.sk/  Platon Group: http://platon.sk/
   `-    GnuPG key: DC0C C7EA 55C8 B089 C41D 944A F251 A93A 2361 A82F


Další informace o konferenci linux