AW: AW: Sync files not folders non recursively

Ehlers, Kolja ehlers at clinresearch.com
Wed Mar 4 14:35:31 GMT 2009


Thanks for helping but using:

/usr/bin/rsync -dnolptgvze --delete --delete-excluded --include='*.htm' --in
clude='*.html' --exclude='*.*' /SOURCE /DESTINATION

is not syncing anything

------

For clarification:

I want to sync *.htm and *.html between SOURCE AND DESTINATION. *.htm and
*.html which are not present in DESTINATION to be copied and *.htm and
*.html which are not present in SOURCE to be deleted in DESTINATION.

I dont want rsync to touch any other files.

-----Ursprungliche Nachricht-----
Von: rsync-bounces+ehlers=clinresearch.com at lists.samba.org
[mailto:rsync-bounces+ehlers=clinresearch.com at lists.samba.org]Im Auftrag
von Fabian Cenedese
Gesendet: Mittwoch, 4. Marz 2009 15:28
An: rsync at lists.samba.org
Betreff: Re: AW: Sync files not folders non recursively



>I am now trying to find a solution to my problem for quite some time. I
hope
>you can help. What I am trying to do is to simply sync files with a special
>suffix to a destination folder. So I dont want to transfer recursively but
I
>want to delete files from the destination which are not in the source
>anymore.
>
>Closest I have gotten is using this command:
>
>/usr/bin/rsync -dnolptgvze --delete --delete-excluded --include='*.htm' --i
n
>clude='*.html' --exclude='*' /SOURCE/ /DESTINATION/
>
>BUT this deletes Files from folder /DESTINATION/A which are not present in
>the Source. I dont want this to happen. Also it syncs folders to
DESTINATION
>but I only want to sync files not folders.
>
>/usr/bin/rsync -dnolptgvze --delete --delete-excluded --include='*.htm' --i
n
>clude='*.html' --exclude='*' /SOURCE/* /DESTINATION/
>
>This command does not delete Files from folder /DESTINATION/A but in this
>care --delete is not working - files which are not in the source anymore
are
>not deleted from destination.

I think you should use /SOURCE /DESTINATION (no trailing slashes).

bye  Fabi

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options:
https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Geschäftsführung: Dr. Michael Fischer, Reinhard Eisebitt
Amtsgericht Köln HRB 32356
Steuer-Nr.: 217/5717/0536
Ust.Id.-Nr.: DE 204051920
--
This email transmission and any documents, files or previous email
messages attached to it may contain information that is confidential or
legally privileged. If you are not the intended recipient or a person
responsible for delivering this transmission to the intended recipient,
you are hereby notified that any disclosure, copying, printing,
distribution or use of this transmission is strictly prohibited. If you
have received this transmission in error, please immediately notify the
sender by telephone or return email and delete the original transmission
and its attachments without reading or saving in any manner.



More information about the rsync mailing list