Re: Selective --delete
On Tue, Jan 7, 2014 at 9:08 AM, Ashley M. Kirchner ash...@pcraft.comwrote: I just ran this and it happily deleted the events folder. I did verify that it gets excluded during the sync portion as files that either exist or don't exist on either servers did not get synced or deleted, but it did, at the end, delete the entire folder and contents. The only way that is possible is if (1) the folder wasn't actually named events (e.g. Events, or had a trailing space, etc.) or (2) if something specified --delete-excluded or a similar filter-risk option somehow to rsync (e.g. via alias, function, or wrapper script). ..wayne.. -- 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
Re: Selective --delete
On Tue 07 Jan 2014, Ashley M. Kirchner wrote: On Tue, Jan 7, 2014 at 9:44 AM, Paul Slootman paul+rs...@wurtel.net wrote: rsync will not touch files that have been --exclude'ed; unless you also specify --delete-excluded . So just specify those LIVE-only files in your exclude list. Uh, that hasn't been my experience. I just ran this and it happily deleted the events folder. I did verify that it gets excluded during the sync portion as files that either exist or don't exist on either servers did not get synced or deleted, but it did, at the end, delete the entire folder and contents. $ cd /tmp $ mkdir rsync-src rsync-dst $ mkdir rsync-dst/events $ rsync -ai --delete --exclude /events/ rsync-src/ rsync-dst/ .d..t.. ./ $ ls -ld rsync-dst/events drwxr-xr-x 2 paul paul 4096 Jan 8 17:49 rsync-dst/events Your experience differs from mine... Paul -- 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
Selective --delete
I have two servers which I will refer to as a LIVE and DEV servers. On the LIVE server, I have a script that executes the following rsync command: rsync --links --verbose --progress --archive \ --exclude==imagebase= --exclude=events \ --delete \ rsync://rsyncu...@dev.domain.com/path/on/DEV /path/on/LIVE/ My issue is with the --delete part. While I want the procedure to delete extraneous files from the LIVE server when they are removed from the DEV one, there are a few files on LIVE that do not and will never exist on the DEV server, however they are required on the LIVE one. Is there a way to have rsync NOT delete those? Is there an equivalent exclude option for the --delete procedure so that it would still delete whatever got removed from the DEV machine, but it leaves those files I tell it to ignore? I have both individual files as well as entire paths that would need to be spared from getting unceremoniously deleted ... while others do need to get pruned if necessary (because they no longer exist on the DEV one.) -- 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
Re: Selective --delete
On Tue 07 Jan 2014, Ashley M. Kirchner wrote: My issue is with the --delete part. While I want the procedure to delete extraneous files from the LIVE server when they are removed from the DEV one, there are a few files on LIVE that do not and will never exist on the DEV server, however they are required on the LIVE one. Is there a way to have rsync NOT delete those? Is there an equivalent exclude option for the rsync will not touch files that have been --exclude'ed; unless you also specify --delete-excluded . So just specify those LIVE-only files in your exclude list. Paul -- 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
Re: Selective --delete
On Tue, Jan 7, 2014 at 9:44 AM, Paul Slootman paul+rs...@wurtel.net wrote: rsync will not touch files that have been --exclude'ed; unless you also specify --delete-excluded . So just specify those LIVE-only files in your exclude list. Uh, that hasn't been my experience. I just ran this and it happily deleted the events folder. I did verify that it gets excluded during the sync portion as files that either exist or don't exist on either servers did not get synced or deleted, but it did, at the end, delete the entire folder and contents. -- 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