Rsync with --delete but do not delete peer dirs on target
rsync with --delete won't honor the delete if the source is something/*. I want the delete to work, but not to delete directories on the target that are peer to the intended directory. For example, using these source and target file structures:
Source on desktop:
Target on laptop:
The goal is for rsync, with the --delete option, to sync ~/Money/some_files between the desktop and the laptop, BUT
I do not want rsync to delete or even update ~/Friends/ or ~/Friends/other_files on the laptop.
I have not found the magic invocation yet. Any help? I can offer a cold homebrew for a good solution!
Last edited by JavaMeister; 11-20-2016 at 10:17 AM..
Tell me this - set me straight!
The --delete option says "delete files that don't exist on the sending side"
Does this mean and only mean that it will delete files from the DESTINATION that DON'T EXIST on the sending side? :confused: (1 Reply)
When I try to back up my libraries with
rsync -azv --delete -e ssh /home/sarah/ saga:/home/sarah/bupembladaily/
I get error message
rsync: readlink_stat("/home/sarah/.gvfs") failed: Permission denied (13)
FATAL I/O ERROR: dying to avoid a --delete-during issue with a pre-3.0.7 receiver.... (7 Replies)
Hi all,
I have a text file with a lot of records.
In each records I have tags like this:
=952 \\$aBNCS-CH\\$bBNCS-CH\\$h1989\\$oBNCS-CH0000001\\$pBNCS-CH0000001\\$yJNL
=952 \\$aBNCS-C.UNIV\\$bBNCS-C.UNIV\\$h1974-77.\\$oBNCS-C.UNIV0000001\\$pBNCS-C.UNIV0000001\\$yJNL
=952... (4 Replies)
Hi
We want to delete a single file from the destiantion directory using rsync. Is it possible to do this ? or Do we have any alternate approaches in rsync( for ex applying some filters ..etc)
For ex:
-----------------------------------------------
Source (Folder)
... (3 Replies)
Hi,
I need to use rsync to delete multiple files(only specified files not all) using --delete option, these files are located in different target folders.
Instead of running rsync command multiple times for each file, can we achieve this with one time execution?
your help is much... (0 Replies)
hi all,
i'm new here and i have a question,
i wanted to know, what should happen if i delete a LUN that is already mounted on one of my initiators.
thanks! (3 Replies)
Hi Team,
I have to remove files which are more than 7 days in my target directory.
I have this script but using this i faced some problems like, removed library files of unix.
for abc in `find /xxx/abc/OutputFiles/xxxx_*.txt -type f -mtime +5|xargs ls 1`
do
echo "xxx files are:"$abc
... (1 Reply)
Hi
Please can someone give me a hint on this, when I list the targets, I see two o them:
#iscsiutil -p
Operational Target Information
------------------------------
Target # 1
-----------
Target Name : iqn.1992-08.com.netapp:sn.142241859
Target Alias ... (2 Replies)
Hi,
I have restored backup of a directory on one server to another server. But there may be some differences because the date on which backup was taken is 5 days back, so I want to delete the files on target if something is not in sync, but do not want to copy it all, since this is already... (1 Reply)
Hello,
I need help in writing the shell script for below mentioned case.
There are 2 servers(server A, server B).
A cronjob syncs files between these 2 servers.
Existing script is copying files from A to B.
This is done using the command rsync.
However, the files are not deleted... (2 Replies)