linux:clone-linux-drive
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| linux:clone-linux-drive [2025/08/10 21:47] – created Wuff | linux:clone-linux-drive [2025/09/03 01:50] (current) – Wuff | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Clone Linux Drive ====== | + | ====== Clone Linux Drive/ |
| Line 6: | Line 6: | ||
| Firstly you will need a live USB stick, build this or use an existing stick - this will be used throughout. | Firstly you will need a live USB stick, build this or use an existing stick - this will be used throughout. | ||
| - | Install the new hard drive and build it as a new machine as normal | + | Install the new hard drive and build it as a new machine as normal. |
| Once complete, boot the PC to the live environment with only the old hard drive installed. | Once complete, boot the PC to the live environment with only the old hard drive installed. | ||
| Line 121: | Line 121: | ||
| - Confirm that the mount points have applied, this may require a restart. | - Confirm that the mount points have applied, this may require a restart. | ||
| + | |||
| + | |||
| + | ====== Live remote cloning ====== | ||
| + | |||
| + | Target system: | ||
| + | < | ||
| + | sudo apt-get install openssh-server | ||
| + | sudo sed -i ' | ||
| + | sudo service ssh restart | ||
| + | </ | ||
| + | |||
| + | On source system: | ||
| + | < | ||
| + | sudo su - | ||
| + | apt-get install sshfs rsync | ||
| + | mkdir / | ||
| + | mount -t fuse.sshfs root@IP:/ / | ||
| + | cp / | ||
| + | rsync -ahPHAXx --delete --exclude={/ | ||
| + | |||
| + | #or for overall bandwidth stats and brief output: | ||
| + | rsync -ahPHAXx --info=progress2 --info=name0 --delete --exclude={/ | ||
| + | |||
| + | </ | ||
| + | |||
| + | Adjust / | ||
| + | |||
| + | reset GRUB: | ||
| + | < | ||
| + | for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i / | ||
| + | sudo chroot / | ||
| + | sudo grub-install --recheck /dev/sdX | ||
| + | sudo update-grub | ||
| + | </ | ||
linux/clone-linux-drive.1754858871.txt.gz · Last modified: by Wuff