按照转载的此文https://briteming.blogspot.com/2018/06/vps.html,从6月21日开始,断断续续搞到6月30日才搞定。主要是因为原文写得不够详细,误导了我。后又搜到:
http://www.chinaz.com/web/2011/0824/206608.shtml,才恍然大悟。
可行的命令:
登陆source server,然后运行:
rsync -avz -e "ssh -p target-server-ssh-port" --numeric-ids --exclude=/etc/fstab --exclude=/etc/network/* --exclude=/proc/* --exclude=/tmp/* --exclude=/sys/* --exclude=/dev/* --exclude=/mnt/* --exclude=/boot/* --exclude=/etc/udev --exclude=/etc/netplan/* --exclude=/etc/sysconfig/network-scripts/* --exclude=/etc/systemd/network/* /* root@target-server-ip:/
这样,就把源vps(旧vps)上的所有的我生成的数据迁移到了目标vps(新vps)上。
“用rsync迁移vps”准确的说法是“用rsync迁移vps的数据”,因为目标vps已经存在。
注:目标vps必须跟源vps是一样的系统,版本和位数,方能确保迁移成功。我迁移花了一个小时。
http://www.chinaz.com/web/2011/0824/206608.shtml,才恍然大悟。
可行的命令:
登陆source server,然后运行:
rsync -avz -e "ssh -p target-server-ssh-port" --numeric-ids --exclude=/etc/fstab --exclude=/etc/network/* --exclude=/proc/* --exclude=/tmp/* --exclude=/sys/* --exclude=/dev/* --exclude=/mnt/* --exclude=/boot/* --exclude=/etc/udev --exclude=/etc/netplan/* --exclude=/etc/sysconfig/network-scripts/* --exclude=/etc/systemd/network/* /* root@target-server-ip:/
这样,就把源vps(旧vps)上的所有的我生成的数据迁移到了目标vps(新vps)上。
“用rsync迁移vps”准确的说法是“用rsync迁移vps的数据”,因为目标vps已经存在。
注:目标vps必须跟源vps是一样的系统,版本和位数,方能确保迁移成功。我迁移花了一个小时。