Rsync - delete extra files in Destination without synchronising directories

Tags
advanced, rsync

 
Thread Tools Search this Thread
# 1  
Old 07-05-2017
Rsync - delete extra files in Destination without synchronising directories

I have a script that synchronises a directory to a DR server, but to improve the time, I actually use rsync to transfer files *[123] in one batch and also
*[456] in another batch - both batches run from the same script and run in the background.

My problem is that there isn't much space on the Destination, so I would like to start by deleting any files on there that don't exist on the Source.

Is there any way to delete files on the Destination that don't exist on the Source only i.e. without synchronising the files?

Thanks in advance
# 2  
Old 07-05-2017
I doubt rsync can just delete on the target without any sync.
Though there is a --delete-before option that might give you the needed place before it copies.

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Rsync not deleting destination files/folders Chenchireddy UNIX for Dummies Questions & Answers 3 10-07-2014 01:23 PM
How to delete directories and files with xargs? steiner Shell Programming and Scripting 13 05-27-2014 08:15 PM
Delete files in group of directories zacsparrow Shell Programming and Scripting 3 10-17-2013 11:21 AM
Rsync Can I delete .NFS and .fuse files ajayram UNIX for Dummies Questions & Answers 3 08-26-2013 10:24 AM
Rsync error while running from destination to source lovelysethii UNIX for Advanced & Expert Users 0 08-23-2013 02:12 PM
Is rsync --delete on some files without write permission possible? freddie50 Shell Programming and Scripting 3 07-12-2013 02:55 AM
Script to go Into Directories and Find/Delete files gkelly1117 Shell Programming and Scripting 5 04-04-2013 06:23 AM
Rsync not deleting files on destination gmccarthy Shell Programming and Scripting 0 07-12-2012 04:54 PM
rsync delete specific files - from different target folder MVEERA Shell Programming and Scripting 0 11-22-2011 09:49 AM
[BASH] rsync - error on destination PaganoM Shell Programming and Scripting 0 03-20-2010 07:59 AM
Delete files from sub-directories over 7 days sureshcisco Shell Programming and Scripting 1 12-05-2008 02:44 PM
Search directories for files with zero sizes to delete akeenabawa Shell Programming and Scripting 2 08-12-2008 11:10 PM
A Batch job to delete files from various directories guruparan18 Shell Programming and Scripting 3 05-10-2008 05:31 PM
rsync: taking advantage of files in different directory other than destination rssrik UNIX for Advanced & Expert Users 1 05-06-2008 08:35 AM
delete pattern files in sub directories adurga UNIX for Dummies Questions & Answers 4 03-22-2007 08:41 AM