Safe Timeframe
The problem I have with switching from one VPS to another is that I need plenty of time to make the transition. It is for that reason I purchased my new VPS (vps3) mid-February.
My free add-ons (SLA compensation for downtime in '13) are auto-renewed on 18th May (expiry of 31st May), with the minimum notice of 14 days meaning notice needs to be given before 18th May (presumably meaning by 23:59:59 on the 17th May). That is the date I decided as a deadline of having vps3 up and running everything by.
Last month I turned off auto-renew on my add-on for an additional IP address on vps3, with me due to be invoiced for next month also on the 18th May. Hopefully that invoice will be for £2.50 (i.e. just for the base VPS package), and I also hope that on the 1st June vps3 will continue to be functioning.
The base package of vps2 is due to auto-renew on 17th June (expiry of 30th June), with the minimum notice of 14 days meaning notice needs to be given before 17th June (presumably meaning by 23:59:59 on 16th June).
Assuming the billing is correct for vps3 on the 18th May, and the VPS is still functioning as expected on the 1st June, I will cancel my order for vps2.
Listing Installed Packages
One of the advantages of having the same OS installed on both VPSs is that the package names will be the same.
Getting a list of packages installed through apt is as sinple as issuing a command in the shell:
( zcat $( ls -tr /var/log/apt/history.log*.gz ) ; cat /var/log/apt/history.log ) | egrep '^(Start-Date:|Commandline:)' | grep -v aptdaemon | egrep '^Commandline:' | grep -v dist-upgrade | grep -v autoremove | grep -v upgrade
Commandline: apt-get install automake make Commandline: apt-get install gcc Commandline: apt-get install libssl-dev Commandline: apt-get install dnsutils Commandline: apt-get install nsd Commandline: apt-get install nginx Commandline: apt-get remove nginx Commandline: apt-get install nginx Commandline: apt-get remove --purge nginx Commandline: apt-get install nginx Commandline: apt-get install iptables Commandline: apt-get remove nginx Commandline: apt-get install nginx Commandline: apt-get install whois Commandline: apt-get install python-software-properties Commandline: apt-get install lynx Commandline: apt-get install apt-transport-https Commandline: apt-get install varnish Commandline: apt-get install mysql-server mysql-client Commandline: apt-get install postfix postfix-mysql postfix-policyd-spf-python dkimproxy Commandline: apt-get install telnet Commandline: apt-get remove amavisd-new Commandline: apt-get remove dkimproxy Commandline: apt-get install opendkim opendmarc Commandline: apt-get install curl Commandline: apt-get install mutt Commandline: apt-get install nginx-extras Commandline: apt-get install nginx-full Commandline: apt-get install linux-image-virtual linux-headers-virtual Commandline: apt-get install php5-cli php5-fpm Commandline: apt-get install unzip Commandline: apt-get install php5-mysql Commandline: apt-get purge linux-image-3.13.0-44-generic Commandline: apt-get purge linux-image-extra-3.13.0-44-generic Commandline: apt-get install php5-gd Commandline: apt-get install dovecot-core dovecot-mysql Commandline: apt-get install git Commandline: apt-get install nodejs git build-essential Commandline: apt-get install iputils-tracepath Commandline: apt-get install gnutls-bin
Then it is a simple case of going through everything installed and uninstalled in order to arrive at the current list of user-installed packages, which gives the following command:
sudo apt-get install automake make gcc libssl-dev dnsutils nsd iptables whois python-software-properties lynx apt-transport-https varnish mysql-server mysql-client postfix postfix-mysql postfix-policyd-spf-python telnet opendkim opendmarc curl mutt php5-cli php5-fpm unzip php5-mysql php5-gd dovecot-core dovecot-mysql git nodejs build-essential iputils-tracepath gnutls-bin
Comparing With New VPS
When compared with vps3, the following install prompt is presented:
The following extra packages will be installed: autoconf autotools-dev libencode-locale-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libssl-doc libswitch-perl liburi-perl m4 python-pycurl zlib1g-dev Suggested packages: autoconf2.13 autoconf-archive gnu-standards autoconf-doc libtool gettext libwww-perl libcurl4-gnutls-dev python-pycurl-dbg zip The following NEW packages will be installed autoconf automake autotools-dev libencode-locale-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libssl-dev libssl-doc libswitch-perl liburi-perl m4 opendmarc python-pycurl python-software-properties unzip zlib1g-dev 0 to upgrade, 18 to newly install, 0 to remove and 1 not to upgrade. Need to get 3,519 kB/3,835 kB of archives. After this operation, 14.1 MB of additional disk space will be used. Do you want to continue? [Y/n]
At this point it is important to check the list. The one thing that stands out on there is opendmarc, which I don't want to install because I've installed a later version from source. It can't hurt to install all the other stuff, though.
The following extra packages will be installed: autoconf autotools-dev libssl-doc m4 python-pycurl zlib1g-dev Suggested packages: autoconf2.13 autoconf-archive gnu-standards autoconf-doc libtool gettext libcurl4-gnutls-dev python-pycurl-dbg zip The following NEW packages will be installed autoconf automake autotools-dev libssl-dev libssl-doc m4 python-pycurl python-software-properties unzip zlib1g-dev 0 to upgrade, 10 to newly install, 0 to remove and 1 not to upgrade. Need to get 3,519 kB of archives. After this operation, 13.0 MB of additional disk space will be used. Do you want to continue? [Y/n]
This looks fine to me, so I entered y
and hit enter.
At this point, all apt installed packages on vps2 and vps3 are the same.
Additional Packages
Some things have been built from source or installed from elsewhere.
A look on vps2 shows that nothing has been installed from /opt, and in /usr/local/src the only thing there is cjdns.
On vps3 there is also nothing in /opt, and in /usr/local/src there is cjdns, libspf2, and opendmarc.
Ready For Transition
At this point I am fairly sure that absolutely everything I need on vps3 after switching off vps2 is already there.
Therefore the only thing left to do is make the final DNS changes on June 1st, wait a few days for propogation, and then when neither mail nor Web servers receive any traffic decide how I'm going to finally decommission the VPS.
Why does VPS3 run Ubuntu? The same reason vps2 and vps(1) did—I am more familiar with Debian-based distributions and Ubuntu Server LTS is my preferred VPS OS of choice due to support (even this article is Ubuntu-based) and software (PPA, for example).
18th May 2015
Today an invoice was raised for my free add-ons for vps2 and the monthly fee for vps3. Total cost was £2.50.
This is where I hoped things would be today. The next date of interest is June 1st, where vps3 should continue to function properly after the IP address add-on is no longer active.