Rsync problem... deleting files off destination

Posted on 2006-11-16
Last Modified: 2010-04-20

I have a script with this line:

rsync -avz -e ssh  --delete root@$SRC:/home $DEST/master.d

 that brings files from a remote server to my home. Im expecting that if a file is deleted from $SRC/home, then it would get deleted from $DEST/master.d

Is that correct?
If not how should i do it?

Question by:valhallatech
  • 2
LVL 48

Accepted Solution

Tintin earned 500 total points
ID: 17961540
Your assumption is correct.  Is the delete not happening?

Author Comment

ID: 17961632
no I remove a file, say bla.tar.gz, from $SRC/home/myhome/, but after running rsync, its still there as $DEST/master.d/myhome/
for trouble shooting purposes im executing as root (so $DEST is at my house and $SRC is across the atlantic) - so dont think theres a permission prob

Author Comment

ID: 17961741
ok yes it is - my  bad - had /master.d/myhome/*  and /master.d/home/myhom/* ... was looking at files that shouldnt have ever been there
happy 500 point day ;-)

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AWS RDS 3 64
PHP Apache application gives "Forbidden" message 5 43
BASH script to modify crontab? 3 47
Using SSH Through A Bastion Host Transparently (Is the topic) 1 41
rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

937 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now