Cloning an OS from a physical server to a virtual VPS
From the machine from which we copy:
/ usr / bin / rsync –progress -avz -e ssh --exclude-from = exclude_list / root @ IP_DESTINATION: /
, where exclude_list:
/ etc / fstab
/boot/grub/grub.conf
/ proc
/ sys
/ dev
/ mnt
/ media
/ lost + found
/ etc / sysconfig / network-scripts /
Next fix / etc / hosts
Correct startup programs
Check network settings, DNS
Configs where the old ip of the machine can be found: grep -lir 'old_ip '/ etc /
reboot
/ usr / bin / rsync –progress -avz -e ssh --exclude-from = exclude_list / root @ IP_DESTINATION: /
, where exclude_list:
/ etc / fstab
/boot/grub/grub.conf
/ proc
/ sys
/ dev
/ mnt
/ media
/ lost + found
/ etc / sysconfig / network-scripts /
Next fix / etc / hosts
Correct startup programs
Check network settings, DNS
Configs where the old ip of the machine can be found: grep -lir 'old_ip '/ etc /
reboot