Category Archives: How To

How to Migrate 3 MySQL Databases to Amazon RDS in 5 Minutes

I had a LAMT (Linux-Apache-MySQL-Tomcat) on Amazon EC2 and I wanted to move all remaining MySQL databases (3) to an existing Amazon RDS instance. This would allow me to shutdown the MySQL instance on EC2, freeing RAM for Tomcat and leveraging RDS automated backups for those 3 databases in case of a disaster. The databases to migrate only contain low volume TEST data, but I already have that RDS instance, so why not use it?

I also have a SLA with my clients that allows me to perform “Standard daily maintenance“. Basically, the “Standard daily maintenance” must be performed outside business hours and must last at most 15 minutes.

The key to the success of this migration was to prepare, prepare and prepare before the actual migration. So here is what I did before the migration:

  • Create 3 empty databases and users on the RDS instance
  • Prepare new configuration files with the new JDBC url pointing to the RDS instance
  • Prepare all the commands that must be executed
  • Review and test the commands as needed

Now that I am prepared I just need to wait for the “Standard daily maintenance” time. Then, I just copy and paste the commands in a terminal. I prefer to copy/paste the commands one by one, so if any command fails (for any reason), it can be fixed right away before running the next commands. Here is a summary of the commands:

  1. Shutdown Tomcat
  2. MySQL dump/restore from EC2 to RDS (3 databases)
  3. Copy the configuration files with JDBC url pointing to RDS (3 files)
  4. Prevent MySQL from starting during boot: echo manual > /etc/init/mysql.override
  5. sudo reboot (I want to verify that MySQL on EC2 won’t start after a reboot)

Everything went fine. After reboot, the MySQL instance on EC2 was not started, as expected. The Tomcat webapps were fine as well and there is more free RAM for Tomcat.

For those webapps, I have uptime monitoring at one minute interval with Pingdom. I receive emails when a webapp go down and up again. Here is the “UP” email from Pingdom, showing 5 minutes of downtime for that migration:

OpCode is UP again at 12/22/2014 08:25:36PM, after 5m of downtime.

 

How to Add a Free “Client Login” to your Website

This 2 steps tutorial explains how you can add a professional and fully-functional Client Login form to any website at no cost. See below a screenshot of my website with this Client Login form (in the navbar, top-right corner):

Client Login

This “Client Login” will allow you to securely exchange any files (big and small) with your clients: invoices, statements, project plans, photo/video productions, etc.

Step 1. Get a free account at IO Road

IO Road is a professional file transfer service designed to transfer BIG files (few GB) securely. The good thing about it: no monthly fees. This means you can sign up (no credit card required), configure it (your brand), add users (clients) and it costs nothing $0. You even get free credits at sign-up.

NOTE: There will be a fee only when (and if) you transfer files, but the rates are very low anyway: $0.000122 per MegaByte.

Signing up to IO Road is straightforward, but if you need some help, refer to the wiki page Sign up to IO Road in 3 Steps. When this step is completed, you will own the new domain: MyDomain.ioroad.com

Step 2. Add the “Client Login” (HTML) to your website

Variant 1: Simple Link

On the top menu, you can add a simple link like this

In the code above, change mydomain to the domain you chose at IO Road.

Variant 2: Client Login Form

If you have more real-estate in your menu you can go with the html form with this code:

Here again, change mydomain to the domain you chose at IO Road.

Caution: Make sure to use https (not http) in the form “action” attribute, otherwise this will not work.

 

Retiring FTP: 10 Tips for a Replacement Technology

OpCode Solutions is the creator of ioroad.com, a professional file transfer service designed for businesses.

If your business still uses a FTP server to transfer big files, you may already be considering a replacement. Many businesses have already moved away from FTP, and for good reasons. FTP is an old protocol with many security vulnerabilities, is hard to implement and maintain in today’s networking environment, can be difficult to administer (create users, manage permissions, etc) and challenging for non-techie users. This post is not intended to list all issues related to FTP, but rather to offer a viable alternative for companies wanting to move away from the legacy File Transfer Protocol (FTP).

There are many things you have to consider when choosing a file transfer solution for your business. Here is a list of 10 characteristics to take into account.

1. Free vs Paid

There are many “free file transfer” solutions out there. Unfortunately, transferring files cost money in terms of bandwidth and servers. Those “free” service providers make their money by displaying advertisements to users. This is OK when you send a video of your child to your mom, but it is NOT OK when sending important files to your clients. A service with No Ads is essential to maintain your credibility with clients. Also, most “free” solutions impose severe limits (file size, bandwidth, speed) and lack business features like security, multi-user, delivery notifications, etc. A few dollars from your pocket can go a long way.

2. Security

This is the #1 reason why most companies moved away from FTP. Security is very important because most files you share with clients are confidential. You want to make sure only your recipient can access the files you share. File transfers must be encrypted (https, TLS) to prevent network sniffing by hackers. Also, you want a service offering password protection. If anyone can get the file by clicking a link (without password), your confidential data is at risk.

3. Receiving files

Unlike FTP, many file transfer services work only one way: sending files. This means you’ll be able to send large files to your client, but the service will not allow you to receive files from your client. This may or may not be an issue depending on your needs. To offer a first class experience to your clients, consider file transfer solutions that work both ways and allow you to receive large files from your client, just like FTP.

4. Limits

Check for the limits. Limits can be in terms of file size, storage, bandwidth, concurrent or total file transfers. Beware of “unlimited” offerings. As said earlier, transferring data costs money. Some providers claim to offer “unlimited” service, but will have very slow file transfer speeds, effectively limiting your ability to transfer files. Waiting 25 minutes to transfer a huge file is understandable, but waiting 25 hours for that same file is long, very frustrating and can Jeopardize your business. You also want a service that can adapt to your needs over time: easy upgrade and downgrade.

5. Ease of use

This was another complaint about FTP. You want a service that is intuitive so that your clients (and employees) can use it easily. Transferring files should be as simple as sending an email. You want a service that requires no software installation. People do not like to install yet another software they do not trust (malware?). A web-based service accessed from a browser (https) is preferable. Also, some nice additions to look for are drag-n-drop and progress bars for file transfers (uploads and downloads). Transferring large files can take a lot of time, the worst thing is “not knowing if my current upload/download is working”.

6. Multi-User

This is a must-have if you are working in teams. Each team member can have his own access to the service with his own permissions, just like FTP. Employees can get sick, take vacation and even leave the company. You may be tempted to work-around this by sharing the same user/password with all team members, but this is probably not allowed by the service provider. Also, doing this has several drawbacks: you cannot give each person different permissions and you’ll allow anybody in your team to  hijack your account by changing the unique password. Moreover, if the service has some sort of “audit logs“, you will loose the ability to know who did what, because everything is done under the same username. Multi-user should not be costly, because is does not cost much for the service provider to implement this feature.

7. Delivery notifications

That feature is just too nice to be missing. It is good to know that your client correctly received your file, or that a client just uploaded a new file for you. You should not have to install yet another app on your phone to get notifications, email notifications are universal. Also, you should be able to configure the system so that notifications are sent to many people.

8. Audit logs

Sometimes, you need to know what happened with a file: who uploaded it, who downloaded it, who deleted it and when. For audit purposes, you may also need to know what did a specific user do in the last 4 weeks. Audit logs are nice to have.

9. Branding (white label)

When transferring files with your client, take that opportunity to communicate your brand. For large file transfers, your client may be on that screen for longer than when he visited your website. Offer a good experience: show your colours, your company name and tagline.

10. Price

Last but not least, you want a reasonable and sustainable price. Money is hard to earn and your business already has a lot of recurring costs. There is no reason for a service provider to ask the payment of one full year in advance. And you should not have to pay anything when you don’t use the service. Use IO ROAD and pay only for what you use.

Conclusion

IO ROAD is packed with all those business features and has a unique pricing model in the industry: Pay As You Go. You can register and try the service for free, no credit card required.