Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an EC2 instance with data I want to sync to a mounted, but remote, volume, as a backup.

rsync seems like the way to go with this, so as a test I took my test file (a Postgres pg_dump file) and used rsync -v to copy it to the mounted volume:

[ec2-user work]$ rsync -v dump.sql.1 ../backup/dump.sql
dump.sql.1

sent 821704315 bytes  received 31 bytes  3416650.09 bytes/sec
total size is 821603948  speedup is 1.00

Then, I ran it again, expecting to see minimal sent/received numbers because it would just be checksums. Instead...

[ec2-user work]$ rsync -v dump.sql.1 ../backup/dump.sql
dump.sql.1

sent 821704315 bytes  received 31 bytes  3402502.47 bytes/sec
total size is 821603948  speedup is 1.00

I'm new to rsync so perhaps I'm missing something, but isn't the idea that the source and destination files are checked for differences, and then a patch is generated and applied to the destination? Why is this not reducing the amount of data 'sent' to just the size of the checksums?

Some background if it's relevant:

the mounted volume is using s3fs, mounted with s3fs <bucketname> backup.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

rsync by default copies eveerything. You can use flags like -t or -c to make it check timestamps of files and don't re-transfer files who's last modification timestamp hasn't changed (-t), or where the checksum is still the same (-c). Another useful option is -a (I always use it), which sets -t and a few other options useful for archiving/backups.

share|improve this answer
    
Ha, sounds like I should've RTFM more carefully. rsync -ac looks like it does the job for me, thanks! –  sharakan Nov 30 '12 at 21:36
    
Careful with -c -- it's expensive and really only needed if files can have the same timestamp, but differing contents. –  Dennis Kaarsemaker Nov 30 '12 at 21:41
    
Turns out I was wrong, with -c or without still doesnt' work. But the problem, it turns out, is with s3fs, not resync usage. See rsync related issues here: code.google.com/p/s3fs/issues/… –  sharakan Dec 5 '12 at 20:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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