目录

服务器迁移记录

目录

服务器迁移记录

由于去年买的学生机马上要到期了,恰好遇到双十一打折就新买了一台服务器,然后就是把旧服务器上的服务迁移到新服务器了。

在开始之前发现了去年迁移服务器的 rsync 脚本

#!/bin/bash

rsync -Pav -e "ssh -i /home/kdxcxs/CXS_Student.pem" root@120.26.58.90:/root/ /home/kdxcxs/AliStudent/home/
rsync -Pav -e "ssh -i /home/kdxcxs/CXS_Student.pem" root@120.26.58.90:/usr/local/openresty/nginx/conf/ /home/kdxcxs/AliStudent/nginx/conf
rsync -Pav -e "ssh -i /home/kdxcxs/CXS_Student.pem" root@120.26.58.90:/srv/ /home/kdxcxs/AliStudent/srv/
rsync -Pav -e "ssh -i /home/kdxcxs/CXS_Student.pem" root@120.26.58.90:/lib/systemd/system/frps.service /home/kdxcxs/AliStudent/lib/systemd/system/frps.service
rsync -Pav -e "ssh -i /home/kdxcxs/CXS_Student.pem" root@120.26.58.90:/usr/lib/systemd/system/n2n_supernode.service /home/kdxcxs/AliStudent/usr/lib/systemd/system/n2n_supernode.service
rsync -Pav -e "ssh -i /home/kdxcxs/CXS_Student.pem" root@120.26.58.90:/lib/systemd/system/openresty.service /home/kdxcxs/AliStudent/lib/systemd/system/openresty.service
rsync -Pav -e "ssh -i /home/kdxcxs/CXS_Student.pem" root@120.26.58.90:/etc/letsencrypt/ /home/kdxcxs/AliStudent/etc/letsencrypt/
rsync -Pav -e "ssh -i /home/kdxcxs/CXS_Student.pem" root@120.26.58.90:/var/www /home/kdxcxs/AliStudent/var
rsync -Pav -e "ssh -i /home/kdxcxs/CXS_Student.pem" root@120.26.58.90:/var/log/nginx/ /home/kdxcxs/AliStudent/var/log/
rsync -Pav -e "ssh -i /home/kdxcxs/CXS_Student.pem" root@120.26.58.90:/root/qbittorrent /home/kdxcxs/AliStudent/qbittorrent