Showing posts with label HDD. Show all posts
Showing posts with label HDD. Show all posts

04 November 2012

Speeding Up Copy Process Between Two Hard Drives

cp command is not suitable for large data transfers between two hard drives. It makes about 10..100KB/sec. Obviously, it will take 29 hours to copy 10GB with 100KB/sec.

There are many ways to speed up copying process -- using USB, Firewire, Ethernet etc. But if everything is done on a local machine, rsync is very effective and simple to use. For example, the following shows how to copy files over the virtual loopback device:

$ mkdir -p /mnt/hdd
$ sudo mount /dev/sdbX /mnt/hdd
$ rsync -az user@localhost:/some/folder/* /mnt/dest-hdd/

a("archive mode") option takes care of permissions, ownership, group, symlinks and so. z instructs rsync to use compression.