Thanks Fabi, et all,
I will follow up with your suggestion using ssh for renaming the
directories after rsync. I appreciate the help.
Freddie
On Mon, Nov 25, 2019, 4:00 AM <rsync-request at lists.samba.org> wrote:
> Send rsync mailing list submissions to
> rsync at lists.samba.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.samba.org/mailman/listinfo/rsync
> or, via email, send a message with subject or body 'help' to
> rsync-request at lists.samba.org
>
> You can reach the person managing the list at
> rsync-owner at lists.samba.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of rsync digest..."
> To unsubscribe or change options:
> https://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
>
> ---------------------------------------
> Today's Topics:
>
> 1. Re: Removing folder at destination (raf)
>
>
>
> ---------- Forwarded message ----------
> From: raf <rsync at raf.org>
> To: rsync at lists.samba.org
> Cc:
> Bcc:
> Date: Mon, 25 Nov 2019 13:43:33 +1100
> Subject: Re: Removing folder at destination
> Fabian Cenedese via rsync wrote:
>
> > >Why not exclude 2_ASSETS from the first run, and then do a second
run to
> > >rsync the _contents_ of 2_ASSETS to the target 01_us_eng
directory?
> > >
> > >Add /01_us_eng/2_ASSETS/ to the exclude.txt file.
> > >
> > >rsync -rvz --exclude-from=exclude.txt source destination
> > >rsync -rvz source/01_us_eng/2_ASSETS/ destination/01_us_eng/
> > >
> > >(perhaps add some variation of the exclude.txt file if you're
excluding
> > >stuff under the 2_ASSETS directory)
> > >
> > >> My humble question to samba.org is this, can I add an rsync
command
> to move
> > >> folders 3 and 4 into 01... and delete the 2_ASSETS folder so
I dont
> have to
> > >> manually do this 200 times each day?
> > >
> > >You can't use rsync to perform remote rename operations, which
is what
> > >you're essentially asking for.
> >
> > You can execute remote commands using ssh/rsh. If the names
> > stay the same then you can add the rename commands to a script
> > file being executed after the rsync run.
> >
> > bye Fabi
>
> But if you do that, subsequent uses of rsync won't work
> any more efficiently than the first one did. It would
> have to re-copy the files that have not kept their
> original names. That's probably why rsync doesn't do
> renaming operations.
>
> You might be better off renaming or moving things at
> the source and rsyncing that. If that's not an option,
> and the source and destination really need to differ,
> you could construct the desired directory layout using
> symlinks to the originals, and rsync the alternate
> symlink version.
>
> I've done a similar thing when rsyncing files
> originally from a macOS host whose names contained
> colon characters (representing forward slashes) to a
> Windows host where colon characters aren't allowed in
> file names. A script would construct the
> Windows-friendly view of the files, then rsync that,
> then delete the Windows-friendly view afterwards.
>
> That won't work if you need to rsync any symlinks as
> symlinks but otherwise, it should be OK.
>
> cheers,
> raf
>
>
>
> _______________________________________
> Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
>
> rsync mailing list
> rsync at lists.samba.org
> https://lists.samba.org/mailman/listinfo/rsync
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.samba.org/pipermail/rsync/attachments/20191206/1a25f16c/attachment.htm>