One of the other big reasons for using rsync in a large, recursive copy like this is because of the -u switch (or -update). There is some discussion (and benchmarks) around the place about a slow CPU being the actual bottleneck, but it does seem to help me when machine is loaded up doing other concurrent things. rsync -progress -rsh="ssh -c blowfish" / /mnt/dest -auvx Further to Michael's answer re -W, changing the cypher can also speed things up (read up on any security implications though). The same goes for systems built on the concept of read-only mounts.Īdding two useful bits to the thread re rsync: changing cypher, and using -update:Īs per Wolfman's post, cp -ax is elegant, and cool for local stuff. The preferred and recommended way of doing disk/partition cloning is to do so on a non-mounted system since that will not have any non-deterministic side effects. # mount -o remount,rw /path/to/writeable_mount_pointN # mount -o remount,rw /path/to/writeable_mount_point. # mount -o remount,rw /path/to/writeable_mount_point1 # dd if=/dev/sdX of=/dev/sdY bs=64K conv=noerror,sync status=progress # mount -o remount,ro /path/to/writeable_mount_pointN # mount -o remount,ro /path/to/writeable_mount_point. # mount -o remount,ro /path/to/writeable_mount_point1 The strategy and side-effects are the same as for Clone a mounted writable partition except this time the remount commands are repeated for each writable mount point. Or if its your own application re-write it to handle this scenario.Ĭlone a disk with one or more mounted writable partitions if your system have applications that requires writing to this particular partition exactly when you need to clone it, these applications would need to be stopped while partition is cloned. Doing this may have some side-effects on running applications. # mount -o remount,rw /path/to/mount_point # dd if=/dev/sda1 of=/dev/sdb1 bs=64K conv=noerror,sync status=progress # mount -o remount,ro /path/to/mount_point Then do the cloning and finally remount it again to read-writable. The key for cloning a partition that is mounted read-writable is to remount it as read-only. The main reason is performance, it's a block-by-block copy instead of file-by-file.Ĭloning a partition # dd if=/dev/sda1 of=/dev/sdb1 bs=64K conv=noerror,sync status=progressĬloning an entire disk # dd if=/dev/sdX of=/dev/sdY bs=64K conv=noerror,sync status=progress As mentioned in the comments by juniorRubyist, the preferred approach here should be to use dd.
0 Comments
Leave a Reply. |