Website Migration Headaches and Lost Sleep

I live in a small town in Montana.  For the last 10 years I have been creating and maintaining websites on a server owned/operated by a local resident.  We have been good friends all that time and he allowed me great freedom on his server.

However, a small group of residents decided to create a company that be a community service company - it is a "for profit" company that we expect will never make a profit; but we feel it is a necessary service to the community.  My friend and I were both on the intial Board for the community service company.  That's when the difficulties began.  My friend is works as an administrator for a company located in another state; he runs the web/email hosting company on the side. 

He is a very good Linux administrator and I never worried about the server side.  I worried about the websites I created and knew the server was in good hands.  However, my friend is not a very good programmer.  He insisted on taking ownership of coding an important component of our company -- the customer facing side; and I took ownership of the backoffice processing.  The customer facing side was not well done. Customers reported problem after problem.  And, he only implemented a single facet of the customer facing processing.  

Well, new software has bugs. EVERY programmer knows that.  Unfortunately, after a year we still had a terrible customer facing system and the problems continued.  In addition to those problems, he and I had differences over just about everything in running the company.  He has no management experience at all; I had 20 years of experience in managing development and being on the executive staff of a major software company.  He just did not understand many things about actually running a company.

We also had some technical difficulties on the server side -- mostly email.  I implemented some python programs on the server; while I had pretty good access to his server I was not a root user. Installing python packages required permissions I didn't have; so, I created a python venv so I could install packages in my own venc. He took exception to that. We were starting to run low on space (while my friend is a good adminstrator, he is a terrible housekeeper). When I stated he was running low on storage and asked what his plan was, well.... he seemed to be greatly offended.

So, we received an "eviction notice" for the company website (more on that later).  He was good enough to setup a new unmanaged server for us and I migrated our 2 websites to the new server. He also offered to help us smooth out any problems for a couple of weeks before leaving us to our own devices. When, I asked about the other websites, he said they could stay on his existing server.

After moving the website and company email server everything seemed to be running pretty smoothly, except for email issues.  We were close to having a solution for that when I received an email notice that he decided to shutdown his web hosting business and that I had to get all of the existing websites off -- in 2 weeks time. Perhaps the shutdown was the reason we were evicted and that he wanted to get us established on the new server before dropping that "I'm shutting down" notice. I prefer to believe that.

I have been a system administrator (for the IBM Mainframes when they ruled the universe) and, while not an expert, am familiar with Unix systems. I could be the administrator for the site; but, I am 71 years old working 12-14 hours a day (or more) on the new company.  I had neither the time nor the desire to be a Unix system administrator.

So, I started looking for a managed system website hosting company.  I found that looked perfect. I did a chat with them for about an hour: they had all the software I needed (Drupal, Backdrop, Postgresql, MySql, python, etc.).  I could have unlimited websites, unlimited databases and unlimited storage.  They even have a migration team to help migrate websites. I didn't really need that; but if they could avoid all of the issues I would likely have a new system ...

I signed with the new company and slept good for the first time in over a month.  I wouldn't have to worry about system administration; if the system died I had someone else to worry about getting in running again. I could just focus on websites and running the company we started.

My happy place died the next day!

It turns out while they have Postgresql and I did have access to it, there version of Postgresql is 9.6; the version I am currently using is 15.4.  No way to backup/restore my database. Their answer was NOT "we will get Postgresql 15.4 installed".  The answer I got from them was - you need to upgrade to our managed vph - at only 10 times the cost!

I was NOT happy.  However, on my laptop I have Postgresql 9.5.  I verified I could export/import from my laptop to  the new hosting service version of Postgresql.  All I have to do is write a program that will access the 85 tables I have in the database, post the data to the database on my laptop, backup that database and restore the tables in the new system.  Easy-Peasy. Of course, there are a lot of primary keys that are auto-incremented with many databases containing pointers to those primary keys.  All I have to do is keep track of all those autoincemented keys and the new keys as I write to the local db and adjust the references. 

So I am looking at a least a month, probably more, at converting the database.  Oh well, my wife is already mad about the amount of time I am working; so, she will just get madder.  This summer she did ALL of the yardwork while I worked.  She already has told me that if I don't start getting off the computer we are moving to a condo!

Well, my next step was to install Drupal on the new hosting service and get it setup with everything we need to run.  My plan is to backup the db and restore it to my laptop. That gives me a "template" database to migrate all of our data. Then I can restore that database. 

So, it was time to create a Drupal system and get it configured for the intial "template" backup.  They offer install software,  I just have to choose what I what installed - Drupal, WordPress, Joomla, etc.  I have always just done a manual install of the Drupal system using the native install process. The hosting service install was even easier - asked what I wanted to db name to be, the administrator id and password  then performed the install.  

Well! That was easy. I answered the 3 questions, hit enter and up came a Drupal system -- maybe a 5 second install. I was well on my way to install the drupal modules (including the 70-80 of my own) when it occured to me that the install software didn't ask which database software to use.  I checked, it created a MySql database. I don't mind MySQL  -- but that just adds to the difficulty of moving the db. 

So, I had to remove the  Drupal system (and all of the configuring I had already done) and start over. I installed Drupal manually specifying that I wanted a Postgresql system. That all went fine and I started installing Drupal modules.  Everything went well until I tried to enable a Drupal module I wrote for doing Strip CreditCard processing.  When I enabled that module I received a page full of "deprecated PHP functions" from code in the Strip API Library.

Accepting credit card payments is somewhat important!  So, I did my research and downloaded the latest version of the Stipe API.  I installed that API Library and did the enable. Success - no php deprecation messages.  But, will it work. Do I have to make changes to my code to interface with the new library.  PROBABLY!

So, more time to spend before I can move on to actually migrating data. 

I am sure to encounter more incompatabilites!

I can hardly wait to migrate a BackdropCMS website using MySQL...

I will keep you posted.