Cloning a Disk or Partition

This guide describes how to clone data using rsync to create an exact mirror including all file permissions and timestamps.

Warning: The target path will be fully synchronized with the source. Data on the target that does not exist on the source will be deleted. Check your device names carefully.

1

Preparation in Rescue Mode

Boot the server into Rescue Mode to ensure that no files are modified during the cloning process. Then mount the source and target partitions:

Mounting
mkdir -p /mnt/source /mnt/target mount /dev/sda1 /mnt/source mount /dev/sdb1 /mnt/target
2

Data Transfer with rsync

The rsync command mirrors the source to the target. The trailing slash (/) at the source is mandatory to copy the contents:

Cloning process
rsync -axHAX --delete --progress /mnt/source/ /mnt/target/

-axHAX: Preserves file permissions, owners, hard links, and extended attributes (ACLs/Xattrs).

--delete: Removes files on the target that are no longer present on the source.

3

Finalization

Unmount the partitions after the process is complete to finalize the write operations:

Unmount
umount /mnt/source umount /mnt/target

Hardware defect confirmed?

In the event of a technical defect, we will replace your hard drive free of charge. Please open a hardware ticket in your PowerPanel.