Hardware & Advanced Topics

How can we help?

Guides and technical documentation for your Server4You dedicated server or VPS.

Cloning a Disk or Partition

This guide shows how to clone a disk or partition on a Linux server with rsync in rescue mode. The copy keeps all file permissions, owners, timestamps, hard links, and extended attributes.

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 permissions, owners, and timestamps (-a), stays on one file system (-x), and keeps hard links (-H), ACLs (-A), and extended attributes (-X).

--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.