LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   rsync re-syncs same files (https://www.linuxquestions.org/questions/linux-newbie-8/rsync-re-syncs-same-files-4175452607/)

tripialos 03-04-2013 04:00 AM

rsync re-syncs same files
 
Good Day

I have a problem with y rsync setup, it synchronizes the same files that are already there.

Let me first explain what i actually did:

I have a Linux VPS which i use it as a sync point between my two computers.

<pc1-win> <------------> <VPS-lnx> <------------> <pc2-win>
pull/push pull/push

I uploaded 1 GB of files from <pc1> to the <vps> and then in turn <pc2> successfully pulled-synced the files.

All was going well until my <pc1> "died" so i bought a new one. When my new computer <pc1> was installed, i used a usb flash drive, which had the same 1 GB files with the ones used in the first sync, to copy the files to my new pc.

When i run rsync, then it is pushing the again the files to the VPS.

1) why since the files i pushed to the VPS in the beginning are re-synced again from my new PC? Isn`t it possible if the source folder is destroyed to just copy from a hdd ?

2) Is there a problem i use a Linux system for sync in between two Windows systems?

Thanks

jv2112 03-04-2013 04:29 AM

'man cp'


By default when you cp files it grabs the attributes of the person running the command and the current time stamp. So the new files place on the replacement PC are new to rsync.

tripialos 03-04-2013 04:39 AM

Quote:

Originally Posted by jv2112 (Post 4904202)
'man cp'


By default when you cp files it grabs the attributes of the person running the command and the current time stamp. So the new files place on the replacement PC are new to rsync.

Thats.... bad!!

Is there any way with rsync to only sync files which only have different size and forget about the attributes ownership's ?

jv2112 03-04-2013 04:50 AM

--size-only

'man rsync'


All times are GMT -5. The time now is 09:56 PM.