Using NTFSClone to clone NTFS volumes super fast

by john on January 8, 2007

in Linux

NTFSClone is a super fast Linux utility for copying NTFS volumes. It is incredibly fast and will typically clone a 10GB NTFS volume in under 3 minutes.

Compare this to Ghost which would easily take 10 minutes to complete the same task and you begin to realise the potential of this utility.

Basically all you need to tell it is the file/ volume to clone from (SOURCE) and give it an output file (or device) to clone on to. (e.g. /dev/hda1 or /mnt/tmp/myimage.file).

How to use NTFSCLone

ntfsclone [OPTIONS] SOURCE
ntfsclone –save-image [OPTIONS] SOURCE
ntfsclone –restore-image [OPTIONS] SOURCE
ntfsclone –metadata [OPTIONS] SOURCE

NTFSClone command options

Below is a summary of all the options that ntfsclone accepts. Nearly all options have two equivalent names. The short name is preceded by – and the long name is preceded by — . Any single letter options, that don’t take an argument, can be combined into a single command, e.g. -fv is equivalent to -f -v . Long named options can be abbreviated to any unique prefix of their name.


-o, --output FILE
Clone NTFS to the non-existent FILE. If FILE is clone to the standard output.

-O, --overwrite FILE
Clone NTFS to FILE, overwriting if exists.

-s, --save-image
Save to the special image format. This is the most efficient way space and speed-wise if imaging is done to the standard output, e.g. for image compression, encryption or streaming through a network.

-r, --restore-image

Restore from the special image format specified by SOURCE argument. If the SOURCE is then the image is read from the standard input.

--rescue
Ignore disk read errors so disks having bad sectors, e.g. dying disks, can be rescued the most efficiently way, with minimal stress on them. Ntfsclone works at the lowest, sector level in this mode too thus more data can be rescued. The contents of the unreadable sectors are filled by character … and the beginning of such sectors are marked by “BadSectoR\0″.

-m, --metadata

Clone ONLY METADATA (for NTFS experts). Moreover only cloning to a file is allowed. You can’t metadata-only clone to a device, image or standard output.

--ignore-fs-check
Ignore the result of the filesystem consistency check. This option is allowed to be used only with the –metadata option, for the safety of user’s data. The clusters which cause the inconsistency are saved too.

-f, --force

Forces ntfsclone to proceed if the filesystem is marked “dirty” for consistency check.

-h, --help
Show a list of options with a brief description of each one.

More posts like this one:

  1. Using NTFS Resize

Was this article useful?

rss feed icon

Email this article to yourself or...

rss feed icon

Subscribe to the RSS feed for more useful articles and tips.

Share this article with others

  • del.icio.us
  • Twitter
  • Reddit
  • StumbleUpon
  • Facebook
  • Digg
  • http://www.squidoo.com/linux-tips-and-tricks linux tips

    Great tip. You can probablyt also use the dd command in Linux to diskcopy an ntfs partittion.

  • llama

    @linux tips:
    Yes, but ntfsclone saves space by not saving the empty space to its image file

  • Keith

    So, I tried this and am now completely confused. It appears that ntfsclone has copied the boot sector of the disk. When I try to restore it, it complains about a bad magic number. When I perform a bit more investigation, I get this:
    root# losetup /dev/loop0 /backup.img
    root# fdisk -l /dev/loop0

    Disk /dev/loop0: 574 MB, 574324736 bytes
    255 heads, 63 sectors/track, 69 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x75e975e9

    Device Boot Start End Blocks Id System
    /dev/loop0p1 * 1 1467 11783646 7 HPFS/NTFS
    Partition 1 has different physical/logical endings:
    phys=(1023, 254, 63) logical=(1466, 254, 63)

    If I try to mount the first partition, I get this:
    root# losetup -d /dev/loop0
    root# losetup -o32256 /dev/loop0 /backup.img
    root# mount -t ntfs -o ro /dev/loop0 /media/dell
    Failed to read last sector (23567291): Invalid argument
    Perhaps the volume is a RAID/LDM but it wasn’t setup yet, or the
    wrong device was used, or the partition table is incorrect.
    Failed to mount ‘/dev/loop0′: Invalid argument
    The device ‘/dev/loop0′ doesn’t have a valid NTFS.
    Maybe you selected the wrong device? Or the whole disk instead of a
    partition (e.g. /dev/hda, not /dev/hda1)? Or the other way around?
    The sparse nature of the image will not allow a mount and the FAT will not allow a restore. Is there any hope?

  • anonymous

    Great article, used this to setup a backup system for a computer lab

  • MasBlaMan

    use nfts-3g /path/to/file.img /mnt

    dont use losetup