Backup and restore?
Sounds like a difficult thing to do huh? It really isn't.
Today I got the opportunity to do a backup and restore for one of the leading online markets in Maldives.
My first thought was, well shit, I'm going to mess this up. Spoiler Alert! I didn't.
It was well in to the beautiful afternoon in the island nation of Maldives.. Okay, let's cut the bullshit. I was handed over 2 servers. A Linode and DigitalOcean server.
Mission: Back up Linode onto DigitalOcean.
Now I bet most of you devs are thinking about Rsync, Scp and Sftp. But we don't do that around here. I started by taking a mysqldump and zipping the web directories. After about 20 mins into the zipping. I was notified that the disk had no space. We are sparing no expenses here, so I immediately took a 100Gb volume and mounted it. This time I went with tar
because it was the coolest!
Then came the fun part where I pointed a live domain to my mounted drive giving the whole wild web full access to the Backup file. Yeah nginx default vhost block with the root folder and server name changed. Coolest, okay!
Then I wget
the whole thing into DigitalOcean cause why not. This is when I realized the backup was 44Gb. This is also where I noticed the 100MB/s connection between Linode and DigitalOcean. Took about 7 mins.
Well, Forge did the rest.
Exciting stuff huh? Not really. It was mainly me looking like a hacker on some weird web terminal in Linode and Putty.