Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-10-2008, 04:04 AM   #1
Registered: Apr 2005
Posts: 104

Rep: Reputation: 15
rsync not delete non existing files on remote server

hi all!

i need to synchronise files from server1 to server2.

but if i delete some files on server1, after rsync-ing they are not deleted from server2.

i'm using next syntax:

rsync -avz --delete /home/john/server1/* remote.server:/home/john/files/

can you help me where i'm wrong?

thank you in advance!
Old 09-10-2008, 04:22 AM   #2
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
What happens if you try

rsync -avz --delete /home/john/server1 remote.server:/home/john/files
(ie remove a /* and / at the end of the source/desination)
Old 09-10-2008, 04:47 AM   #3
Registered: Apr 2005
Posts: 104

Original Poster
Rep: Reputation: 15
that's it! i just removed * after dir name, and it deletes files!

thank you!!!



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[rsync] get the differences between the source files and the existing files djgerbavore Linux - Networking 2 06-04-2008 01:05 PM
Is there a way to allow a user to rsync files to my server without being able to SSH abefroman Linux - Security 1 12-08-2007 07:42 PM
how to add existing files to existing imported kdevelop project?? santana Programming 1 05-22-2007 10:53 AM
How to delete once whole files in a remote directory? backpacker Linux - Networking 1 03-10-2006 06:04 AM
performance issue: rsync sends existing files microtim Linux - Networking 1 12-02-2004 03:27 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:28 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration