问题原文
原帖链接 · Cadmos · CC BY-SA 4.0
I have a CentOS6.9 Linux server remotely on a VPS Provider and I need to clone my remote server on my local computer as a Virtual Machine for examination purposes.
I made a full server backup without compression to another remote server (rsync.net) by using the following rsync command:
rsync -auHxv --numeric-ids --delete-after --progress --exclude="/etc/fstab" --exclude="/dev/*" --exclude="/proc/*" --exclude="/sys/*" --exclude="/tmp/*" --exclude="/boot/*" --exclude="/run/*" --exclude="/mnt/*" --exclude="/media/*" --exclude="/backup/*" --exclude="/lost+found" / -e ssh [email omitted]:backup_directory
Would it be possible to use this backup as an image for cloning through Virtual Machine on my local computer, either by using VMWare Workstation or Virtual Box or any other Virtual Machine Platform ?
已采纳解答
原帖链接 · Joe M · CC BY-SA 4.0
I would use DD over SSH and import that as a new VBox image after conversion. I use GZIP to skip copying gigs of empty space.
ssh root@remoteIP "dd if=/dev/sda | gzip - " | dd of=image.gz
Uncompress and convert.
gunzip image.gz
VBoxManage convertdd image image.vdi --format VDI
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
