My previous article on the subject of adding a swap file to an Amazon EC2 instance focused on adding the swap file to the instance storage (also known as ephemeral storage) that comes with certain Amazon EC2 instances. This article discusses how you can still leverage the concept of swap files even on “EBS only” Amazon EC2 instances.
Connecting to databases via SSH Tunneling is something developers and IT professionals often need to do. And HeidiSQL is one of the more popular open-source database tools. While HeidiSQL fully supports SSH tunneling, there doesn’t seem to be any documentation about how to accomplish this. So, after struggling with this for a few hours and figuring it out, I put these instructions together to help others.
On Amazon EC2, the instance type you choose determines the amount of physical memory (RAM) that you get. Larger instance types with lots of RAM are more expensive. So if you want more RAM on a medium or small EC2 instance, you can define some storage space on your disk to act as RAM when needed. The disk area you use for this purpose is called a swap file. This article explains swap files and demonstrates how to set up a 2GB swap file using ephemeral storage on an m3.medium instance of Amazon EC2 that has only 3.75GB of RAM by default.
Most Linux systems have a default bash prompt in one color that tells you your user name, the name of the machine you’re working on, and some indication of your current working directory. This is all useful information, but you can do much more with the prompt. All sorts of information can be displayed. You can even change the colors either to make it look interesting, or to make certain information stand out. You might also want to customize your bash prompt if you have difficulties using the terminal because the prompt isn’t visible enough.
I like to automate things! There’s this great feeling you get when you set things up to run without manual intervention. It just makes you feel “powerful”. I have scripts and code pieces to backup stuff like Microsoft SQL Server Databases (see my post on Backing up SQL Server to Dropbox), MySQL Databases, entire cloud machines, entire websites, and/or selected folder(s) within a directory.