1

I have mounted my google drive in ubuntu nad want to rsync my pictures.

I issue the command

rsync -Parvhz folder1 /home/me/GoogleDrive/Pictures/

it transfer them all. Then I re-issue the command and it again sends the whole files, though nothing has changed.

Isn't rsync suppose to transfer the diffs? Am I doing something wrong?

What I intended to do is run a cron job to rsync the whole 130GB folder to google drive every night since I rarely put photos in there. But if I have to upload again all files then we have a problem!

Thanks

2

I think it should work and I don't see anything wrong with your command except one small detail that you don't need to explicitly use -r option because you are using -a option which implies it. You can try doing md5sum on files in your source and destination path, to check if they are the same. If checksums are not equal, then something is changing your files (on the source or on the destination). And yes, rsync should transfer only diffs this way.

4
  • yes I know about -a -r thanks. I am sure files aren't changed. I re-issue the command right after it ends so nothing is changed. – Harris Jan 3 '19 at 12:03
  • but did you try md5sum? it would be good to exclude a possibility of data being corrupted by network transfer, google-drive client bug, rsync bug, etc. only after you compare md5sum checksums, you can be 100% sure that data on both locations are really identical. From what you are writing it seems you're sure only with that the data weren't changed by user or app who is allowed to intentionally change them, but not by copy process itself or on the server side. – patok Jan 3 '19 at 12:35
  • ok here is the output for 1 image: > md5sum folder/00000001.jpg 33c22485d30dbeece703b68855a61982 folder/00000001.jpg > md5sum ~/GoogleDrive/Pictures/folder/00000001.jpg 33c22485d30dbeece703b68855a61982 /home/me/GoogleDrive/Pictures/folder/00000001.jpg > rsync -Parvhz folder/00000001.jpg /home/me/GoogleDrive/Pictures/folder/00000001.jpg sending incremental file list 00000001.jpg 2.11M 100% 703.48kB/s 0:00:02 (xfr#1, to-chk=0/1) sent 2.09M bytes received 35 bytes 126.73K bytes/sec total size is 2.11M speedup is 1.01 so as you can see it has the same md5. – Harris Jan 3 '19 at 13:10
  • Ok, try to check also modification time of both files (with ls -l <file>). Although you are passing -a option which should preserve it on destination files, google drive can possibly ignore it and sets own last modify time; if so, you can ignore this check by rsync's --size-only option – patok Jan 3 '19 at 13:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.