7

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.

5 Answers 5

6

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.

9

To rsync between Linux ext4/xfs and windows ntfs mounts

OR

To rsync between two ntfs mounts :

If the intent is to back-up the 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/

Example:

[ram@thinkred1cartoon ~]$ df -PhT
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

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/

Where:

-r = recursive

--size-only = skip files that matches in size

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

Here are some more rsync hacks

7
  • I used this but then found my timestamps weren't correct, so I reran it with -t to maintain timestamps. I also reran it with --inplace to attempt to avoid recopying all the data. It did seem to run much faster than the initial sync.
    – TheClassic
    Commented Mar 30, 2020 at 15:21
  • @raman-kathpalia How do you preserve permissions, timestamps, group and ownership between two NTFS partitions with rsync ?
    – SebMa
    Commented Sep 24, 2020 at 15:57
  • @SebMa With rsync, you can't AFAIK. Not at the time of writing this comment at least. Commented Dec 30, 2020 at 14:41
  • @TheClassic -t produces tons of errors of the form "failed to set times on..."
    – Michael
    Commented Oct 21, 2022 at 16:24
  • I think rsync with NTFS is not useful, because it cannot copy attributes, including file created date. I don't want a backup with lost all attributes.
    – Kamil
    Commented Dec 3, 2022 at 23:24
4

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

1

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.

1
0

I know I am probably late to the party, but I was having this issue, but fixed it with using new options on my fstab configuration file, and after a reboot it worked flawlessly!

This is what my /etc/fstab looks like (notice noatime and big_writes):

UUID="3AEEB210EEB1C503"  /mnt/PiDrive ntfs-3g rw,auto,users,permissions,noatime,async,big_writes uid=1000,gid=1000,umask=0000 0 0
UUID="149022ED9022D550" /mnt/PiDriveBU ntfs-3g rw,auto,users,permissions,noatime,async,big_writes uid=1000,gid=1000,umask=0000 0 0

And the resync command I was using:

 sudo rsync -rvh --size-only --progress  --exclude="*.part"  /mnt/PiDrive/Hyperspin/ /mnt/PiDriveBU/Hyperspin/

I went from 20-50kb/s to 20-30mb/s!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .