Home Man
Search
Today's Posts
Register

Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

Rsync - delete extra files in Destination without synchronising directories

Tags
advanced, rsync

Login to Reply

 
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.
Login to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Rsync not deleting destination files/folders Chenchireddy UNIX for Dummies Questions & Answers 3 10-07-2014 12:23 PM
How to delete directories and files with xargs? steiner Shell Programming and Scripting 13 05-27-2014 07:15 PM
Rsync Can I delete .NFS and .fuse files ajayram UNIX for Dummies Questions & Answers 3 08-26-2013 09:24 AM
Rsync error while running from destination to source lovelysethii UNIX for Advanced & Expert Users 0 08-23-2013 01:12 PM
Is rsync --delete on some files without write permission possible? freddie50 Shell Programming and Scripting 3 07-12-2013 01:55 AM
Rsync not deleting files on destination gmccarthy Shell Programming and Scripting 0 07-12-2012 03:54 PM
rsync delete specific files - from different target folder MVEERA Shell Programming and Scripting 0 11-22-2011 08:49 AM
[BASH] rsync - error on destination PaganoM Shell Programming and Scripting 0 03-20-2010 06:59 AM
A Batch job to delete files from various directories guruparan18 Shell Programming and Scripting 3 05-10-2008 04:31 PM
rsync: taking advantage of files in different directory other than destination rssrik UNIX for Advanced & Expert Users 1 05-06-2008 07:35 AM


All times are GMT -4. The time now is 06:10 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password