-   Linux - Software (
-   -   rsync question (

hawk__0 10-02-2009 12:52 PM

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/

repo 10-02-2009 01:03 PM

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.

hawk__0 10-02-2009 01:25 PM

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.

All times are GMT -5. The time now is 09:17 AM.