Hello,
Rsync 2.6.9
Mac OS interacting with Windows servers.
My Rsync command: rsync -rvz --exclude-from=exclude.txt source destination.
I copy large files from server A to server B excluding multiple directories
which rsync quickly and beautifully executes.
What I end up with at destination is these folders.
01_us_eng...
2_ASSETS
3_web
4_print
I manually then move the web/print folders into the 01_us_eng... folder and
then I manually delete the assets folder.
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?
I have done exhaustive searches without success and i really
appreciate your help.
Thanks,
Freddie
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.samba.org/pipermail/rsync/attachments/20191114/773cc5da/attachment.htm>
On Thu 14 Nov 2019, Freddie Valdez via rsync wrote:> > Rsync 2.6.9Wow, that's ancient. Released 06 Nov 2006> Mac OS interacting with Windows servers. > > My Rsync command: rsync -rvz --exclude-from=exclude.txt source destination. > > I copy large files from server A to server B excluding multiple directories > which rsync quickly and beautifully executes. > What I end up with at destination is these folders. > 01_us_eng... > 2_ASSETS > 3_web > 4_print > I manually then move the web/print folders into the 01_us_eng... folder and > then I manually delete the assets folder.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. Paul
>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