Slackware HowTo

Clone a system with rsync on Slackware

Copy a system to a new disk or target root while preserving attributes and structure.

1. When to use it

Useful for controlled migrations, disk replacement, or preparing a secondary root.

rsync | clone system | numeric-ids | target root | migration

2. Base setup

rsync -aAXH --numeric-ids --exclude='/proc/*' --exclude='/sys/*' --exclude='/dev/*' / /mnt/target
cp -a /etc/fstab /mnt/target/etc/fstab
mount --bind /dev /mnt/target/dev

Adjust host names, IPs, interfaces, paths, and versions to the real system before making the change persistent.

3. Quick verification

rsync --dry-run -aAXH --delete / /mnt/target | head
ls /mnt/target/boot
grep -n . /mnt/target/etc/fstab | head

Confirm that the output matches the expected state before considering the intervention complete.

4. Operational notes

Copying files is not enough: after the clone you still need to adapt bootloader, fstab, and references to new UUIDs.

Quick checklist

[ ] Steps completed\n[ ] Config updated\n[ ] Tests executed\n[ ] Rollback ready\n[ ] Logs checked

Back to Linux HowTo