I have a 2 1.5TB drives containing numerous video, audio, documents etc that I would like to essentially mirror to 2 other drives for backup. I would like to do this using rsync (as it seems the most appropriate thing to use).

What command should I use to do so? Is there anything to be aware of when rsyncing NTFS partitioned drives/files?

EDIT: To clarify I am running NTFS formatted drives in Kubuntu 10.04 machine. I am rsync'ing the drives from here.

up vote 5 down vote accepted

With rsync on unix, use --archive, and don't forget the --sparse and --hard-links options. I don't know if NTFS or the NTFS driver you use (ntfs-3g or kernel) supports sparse files and/or hardlinks, but it's good practice when using rsync for backups.

Also remember that --archive doesn't do --acls and --xattrs, but with NTFS, that doesn't matter.

I don't know how different rsync behaves on a Windows system, though.

If the NTFS partitions are mounted on a *NIX device, rsync is good. If you runing Windos, take a look at ROBOCOPY.EXE (included in free downloadable Resource Kit Tools, if your edition of Windows does not already have it).

rsync -a source dest

is the basic comand, but you better read carefuly the documentation and make some tests before using it as a backup strategy

http://www.microsoft.com/downloads/details.aspx?familyid=c26efa36-98e0-4ee9-a7c5-98d0592d8c52&displaylang=en - Microsoft SyncToy 2.1 is a free application that synchronizes files and folders between locations.

To sync between Linux ext4/xfs and windows ntfs mounts

OR

To sync between two ntfs mounts using rsync :

[ram@thinkred1cartoon ~]$ df -hT
Filesystem                       Type      Size  Used Avail Use% Mounted on
/dev/mapper/rhel-home            xfs       192G  175G   17G  92% /home
/dev/sdb2                        fuseblk   671G  564G  107G  85% /run/media/raman/Windows7_OS
/dev/sda2                        fuseblk   1.6T  513G  1.1T  32% /run/media/raman/Seagate

If the intent is to back-up contents to ntfs mount using rsync and only transfer delta to ntfs partition, don't use rsync with archive (-a) option.

rsync archive is equivalent to -rlptgoD and doesn't work with ntfs partition effectively.

Instead, try:

rsync -rvh --size-only --progress /path/to/ext4/ /path/to/ntfs/

rsync -rvh --size-only --progress /path/to/ntfs1/ /path/to/ntfs2/

Examples from above mounts:

rsync -rvh --size-only --progress /home/ /run/media/raman/Windows7_OS/

rsync -rvh --size-only --progress /run/media/raman/Seagate/ /run/media/raman/Windows7_OS/

So, rsync works between two NTFS partitions.

-r = recursive

--size-only skips files that match in size

-v = verbose          (optional)
-h = human readable   (optional)
--progress = progress (optional)

Here are some rsync hacks that I use everyday for backup.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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