Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true;do
- rsync command here (syncing probably only mysql and /home folders ?)
- if [[ "$(comand to discover whether ip is routed on the old or new machine)" == *"something"*]];then
- # ip was re-routed, we stop this source VPS services and do last sync. (destination VPS services are already stopped not to do any mess)
- service chksrvd stop;service cpanel stop;service httpd stop;service mysqld stop;service exim stop;service pure-ftpd stop
- rsync command here (syncing probably only mysql and /home folders ?)
- ssh destinationvps -p port "service chksrvd start && service cpanel start && service httpd start && service mysqld start && service exim start && service pure-ftpd start"
- # above command assuming there is already password less access
- # ip was re routed and i achieved nearly 1:1 clone. 1:1 clone in case of mysql and website files because cpanel, ftp, httpd, mysqld, exim.. was stopped before last rsync
- fi
- sleep 1
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement