LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 09-10-2008, 03:04 AM   #1
proNick
Member
 
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, 03:22 AM   #2
billymayday
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

Code:
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, 03:47 AM   #3
proNick
Member
 
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!!!
 
  


Reply

Tags
rsync


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 12: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 06:42 PM
how to add existing files to existing imported kdevelop project?? santana Programming 1 05-22-2007 09:53 AM
How to delete once whole files in a remote directory? backpacker Linux - Networking 1 03-10-2006 05:04 AM
performance issue: rsync sends existing files microtim Linux - Networking 1 12-02-2004 02:27 AM


All times are GMT -5. The time now is 07:06 AM.

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