Categories
Internet

New Server!!

Today is a wonderful day!

After a decade of using the low end, entry model 212J Synology NAS I’ve finally splurged and gotten a state of the art server. I bought the 212J about a decade ago because I had always wanted to host my own blogs and thus not have to pay some company to host them for me. As I knew nothing about running a server, or even if I could do it I went with the cheapest option. Over the past decade I’ve taught myself and have come to rely on it as my blogs are not only a very important part of my life they are in-fact a recorded history of it. This is such a treasure to me and it was all hosted on a cheap server that could have failed at any moment.

The 212J was faithful although with updates threw some major fits in the past 10 years which could have destroyed my blogs. The most recent tantrum was in the past update where my CPU shot to 99% usage and made the NAS almost completely unusable. This was scary but with patience and a lot of tinkering I was able to figure it out. It was this however which convinced me to finally splurge for a new NAS as well as learn all the things I needed to know to ensure I had it set up like a pro and not an amateur. I had stumbled my way through a decade in getting it to work and had not realized that I was on the edge of a cliff once step away from seriously damaging my blogs.

In technical terms I did not understand RAID nor how to have a perfect backup of the blogs. I used SHR without data protection in the storage. I learned that the pros will always RAID configurations which means the data is always written immediately and simultaneously to two disks in case one fails. Then the other disk will immediately keep the data available until the bad disk is replaced. As I didn’t understand RAID or SHR I only had my blogs on one disk.

Now I did have backups of my blogs but they were not sufficient. I had simply exported the blog from WordPress as well as the content folder which kept the pictures. What I didn’t understand is I also needed a backup of the SQL database because it is that database that lets the blog know which posts to put that media in! Yes, I would still have my writing, and I would still have the pictures, but the blog wouldn’t know which pictures go with which posts. I had tried backing up my SQL before but would always get a timeout because of my slow server and there was a setting or two that was not correct.

With my new 920+ on the way I spent a week studying how RAID and SHR works, and consulted websites on how to ensure everything was set up perfectly. I owe a debt of gratitude to mariushosting.com for creating a site which easily explains everything along with pictures! Often websites will get directly into Terminal commands for the complicated things and the Terminal is pretty much only for the pros. Now I have WordPress in Raid 1 which is two drives mirroring each other all the time.

Simply getting a new blog is not why I’m pleased with myself however. I had been stressing for weeks over being able to transfer my blogs and actually getting them to work on the new server. Mind you I had spent a decade tinkering and often getting stuck for months and even over a year in the beginning. But all that tinkering as well as this past weeks study paid off. I was able to transfer everything over in about 6 hours. It took that long because I did get stuck a few times which I’ll explain. Warning, technical WordPress, SQL stuff ahead!

First I downloaded everything and was even able to download my SQL databases. I preferred to transfer manually as I was somewhat familiar with it, plugins rarely work perfectly for big projects like this and the amount of pictures was immense. I tried it myself at first, but kept getting an error that WordPress couldn’t connect to the database. That kept me stuck for a while but then I realized I shouldn’t be trying to do it with Maria 10 as I had used Maria 5 before. I had tried upgrading to Maria 10 before but could never get it to work. When I finally just used Maria 5 it worked. I’ll come back to this.

The next place I got stuck was in making a secure connection. I didn’t want Google telling visitors my site was un-secure and even worse stopping them with a warning to not proceed! I had transferred the certificates correctly and after a while realized I just needed to assign the right certificate to the right blog. That is to say not all blogs on one site’s certificate.

So I was able to get it working with Maria 5 but I was determined to get Maria 10 to work. The forums all told me it must be something to do with the settings in the WordPress config file but my database, user name and password were all correct. After much searching I was finally able to find the answer. It was like finding a nugget of gold after hours of coming up with nothing but dirt. The problem was that Maria 5 uses “localhost” in the db_host line. The forums were telling me to put in the actual internal IP which didn’t work. The nugget of gold was to put in “localhost” followed by a string I didn’t understand but it made Maria 10 work! I was overjoyed.

Since I’ve decided to dedicate two drives under Raid 1 to WordPress I needed more drives for everything else. I spent a little more and have two 1 TB drives arriving today. Then I’ll be able to install Note, Surveillance Station and also take a peak at all the other applications I’ve been thus far unable to use due to the limitations of my 212J

Today is a good day!

By 魔手

Global Citizen! こんにちは!僕の名前はマットです. Es decir soy Mateo. Aussi, je m'appelle Mathieu. Likes: Languages, Cultures, Computers, History, being Alive! \(^.^)/