Skip to main content
added 1064 characters in body; edited tags
Source Link
simona
  • 1k
  • 3
  • 14
  • 28

I back up my pictures from my camera using rsync, using:

 rsync -vzrtl --progress --stats --timeout=0 host destination

Now I was in a different timezone when I did my first backup then I moved to a different timezone and I changed it on my laptop (I use ubuntu 10.04.4). Today I was backing up my pictures and I found that the timestamp were different (I mean the timestamps you can see with 'ls -lt'), so rsync would copy the whole directory (I always run rsync with the option -n first to know the list of files it would transfer). Now this is just stupid, because the files are actually the same. So I changed back to the previous timezone, in fact the file timestamps changed to the same on my camera - this I find weird somehow.

I run rsync again and the files are still different :@ Now, I don't want to copy the files again, this would be stupid, can you suggest a clean solution? How can I prevent this in the future? why the files are still different, if I changed to the previous timezone?


I found that the access and change time are different for the files, using stat. For example:

on host

   File: `DSC00003.JPG'
   Size: 3068392    Blocks: 6016       IO Block: 32768  regular file
 Device: 821h/2081d Inode: 2109        Links: 1
 Access: (0755/-rwxr-xr-x)  Uid: ( 1000/simona)   Gid: ( 1000/simona)
 Access: 2013-03-26 00:00:00.000000000 +0000 
 Modify: 2007-12-25 22:48:20.000000000 +0000
 Change: 2007-12-25 22:48:20.000000000 +0000

and on the destination

   File: `DSC00003.JPG'
   Size: 3068392    Blocks: 6008       IO Block: 4096   regular file
 Device: 802h/2050d Inode: 245762      Links: 1
 Access: (0755/-rwxr-xr-x)  Uid: ( 1000/simona)   Gid: ( 1000/simona)
 Access: 2013-03-26 10:24:49.000000000 +0000
 Modify: 2007-12-25 22:48:20.000000000 +0000
 Change: 2013-02-09 00:11:09.000000000 +0000

Is there a way to prevent rsync to overwrite pictures that have been modified more recently on the destination?

I back up my pictures from my camera using rsync, using:

 rsync -vzrtl --progress --stats --timeout=0 host destination

Now I was in a different timezone when I did my first backup then I moved to a different timezone and I changed it on my laptop (I use ubuntu 10.04.4). Today I was backing up my pictures and I found that the timestamp were different (I mean the timestamps you can see with 'ls -lt'), so rsync would copy the whole directory (I always run rsync with the option -n first to know the list of files it would transfer). Now this is just stupid, because the files are actually the same. So I changed back to the previous timezone, in fact the file timestamps changed to the same on my camera - this I find weird somehow.

I run rsync again and the files are still different :@ Now, I don't want to copy the files again, this would be stupid, can you suggest a clean solution? How can I prevent this in the future? why the files are still different, if I changed to the previous timezone?

I back up my pictures from my camera using rsync, using:

 rsync -vzrtl --progress --stats --timeout=0 host destination

Now I was in a different timezone when I did my first backup then I moved to a different timezone and I changed it on my laptop (I use ubuntu 10.04.4). Today I was backing up my pictures and I found that the timestamp were different (I mean the timestamps you can see with 'ls -lt'), so rsync would copy the whole directory (I always run rsync with the option -n first to know the list of files it would transfer). Now this is just stupid, because the files are actually the same. So I changed back to the previous timezone, in fact the file timestamps changed to the same on my camera - this I find weird somehow.

I run rsync again and the files are still different :@ Now, I don't want to copy the files again, this would be stupid, can you suggest a clean solution? How can I prevent this in the future? why the files are still different, if I changed to the previous timezone?


I found that the access and change time are different for the files, using stat. For example:

on host

   File: `DSC00003.JPG'
   Size: 3068392    Blocks: 6016       IO Block: 32768  regular file
 Device: 821h/2081d Inode: 2109        Links: 1
 Access: (0755/-rwxr-xr-x)  Uid: ( 1000/simona)   Gid: ( 1000/simona)
 Access: 2013-03-26 00:00:00.000000000 +0000 
 Modify: 2007-12-25 22:48:20.000000000 +0000
 Change: 2007-12-25 22:48:20.000000000 +0000

and on the destination

   File: `DSC00003.JPG'
   Size: 3068392    Blocks: 6008       IO Block: 4096   regular file
 Device: 802h/2050d Inode: 245762      Links: 1
 Access: (0755/-rwxr-xr-x)  Uid: ( 1000/simona)   Gid: ( 1000/simona)
 Access: 2013-03-26 10:24:49.000000000 +0000
 Modify: 2007-12-25 22:48:20.000000000 +0000
 Change: 2013-02-09 00:11:09.000000000 +0000

Is there a way to prevent rsync to overwrite pictures that have been modified more recently on the destination?

Source Link
simona
  • 1k
  • 3
  • 14
  • 28

rsync and backup and changing timezone

I back up my pictures from my camera using rsync, using:

 rsync -vzrtl --progress --stats --timeout=0 host destination

Now I was in a different timezone when I did my first backup then I moved to a different timezone and I changed it on my laptop (I use ubuntu 10.04.4). Today I was backing up my pictures and I found that the timestamp were different (I mean the timestamps you can see with 'ls -lt'), so rsync would copy the whole directory (I always run rsync with the option -n first to know the list of files it would transfer). Now this is just stupid, because the files are actually the same. So I changed back to the previous timezone, in fact the file timestamps changed to the same on my camera - this I find weird somehow.

I run rsync again and the files are still different :@ Now, I don't want to copy the files again, this would be stupid, can you suggest a clean solution? How can I prevent this in the future? why the files are still different, if I changed to the previous timezone?