Review your favorite Linux distribution.
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 10-02-2009, 01:52 PM   #1
Registered: Nov 2008
Posts: 105

Rep: Reputation: 15
rsync question

I am using this rsync command to backup data to a server... however, it grabs the data regardless if it has been updated or not. what is wrong with my command?

rsync --progress --delete --compress --stats --archive user@server1:/var/www user@server1:/home/ /opt/backup/server1/
Old 10-02-2009, 02:03 PM   #2
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Take a look at the update option
-u, --update
This forces rsync to skip any files which exist on the destination and have a modified time that is newer than the source file. (If an existing destination file has a modification time equal to the source file's, it will be updated if the sizes are different.)

Note that this does not affect the copying of symlinks or other special files. Also, a difference of file format between the sender and receiver is always considered to be important enough for an update, no matter what date is on the objects. In other words, if the source has a directory where the destination has a file, the transfer would occur regardless of the timestamps.

This option is a transfer rule, not an exclude, so it doesn't affect the data that goes into the file-lists, and thus it doesn't affect deletions. It just limits the files that the receiver requests to be transferred.
Old 10-02-2009, 02:25 PM   #3
Registered: Nov 2008
Posts: 105

Original Poster
Rep: Reputation: 15
Thank you, I read that switch but I think I got confused because I was running the command on the server I'm backing the data up to. It says remote server, and in my case, the remote server is the server I'm getting the backup data from! I will try this.

Last edited by hawk__0; 10-02-2009 at 02:47 PM.


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 Question JeffC1 Linux - Software 1 08-25-2008 10:14 PM
rsync question mokku Linux - Newbie 1 05-31-2008 09:56 AM
Rsync question Fill Linux - Newbie 2 10-01-2007 05:30 PM
rsync question juanb Linux - General 10 01-28-2006 04:18 PM
rsync question falco365 Programming 4 05-25-2003 10:24 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:44 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
Open Source Consulting | Domain Registration