Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

For a long time I was using windows. I have a separate drive I use to keep copies of my media files, photos etc. on, which I periodically backup to an external drive. In Windows I used SyncToy to do this. After my Windows stopped booting, I decided to switch to Linux (Ubuntu 10.10). That seems to be going fine, but now I want to backup my drive to the external drive like before.

Mostly the two drives will be already the same with maybe about 10GB of extra files added.

So I try to use rsync to synchronise the two drives like this:

rsync --dry-run -rvlt --modify-window=1 /media/Antonio1TB/Backup /media/FREECOM\ HDD/Backup

The problem is the dry run indicates that every file on the drive will be copied. Not just the files I have recently added.

What is the correct command to synch two NTFS drives under Ubuntu so that files that already exist don't get copied again? Thanks.

share|improve this question

2 Answers 2

If modification times and such are not important (permissions can not be preserved on ntfs), I use the --size-only option which will compare sizes alone and ignore files that differ only by modification time.

E.g.:

rsync --size-only -r /mnt/original /mnt/ntfs/backup/ # -in for "pretend mode"
share|improve this answer

After additional research I think I partially figured out the problem. What the command above will do is copy the directory Backup on the source into Backup in the destination. But what I really wanted to do was copy the files and directories in Backup to the destination directory. In other words I needed a forward slash at the end

rsync --dry-run -rvOlt --modify-window=1 /media/Antonio1TB/Backup/ /media/"FREECOM HDD"/Backup

I also added the -O option. Without this rsync seems to want to copy directories even if no files in them have changed. I'm kind of puzzled by this option and exactly what it is doing in this situation and why it is needed.

share|improve this answer
    
Using -O, --omit-dir-times the modification time of directories won't be copied to the destination, even if it was updated on the original directory. Glad you solved your problem, you should accept your own answer to the question. –  gnp Jul 12 '13 at 21:20

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.