Andrei Grijincu

GlusterFS - Replicate a volume over two nodes

When you are using a load balancer with two or more backend nodes(web servers) you will probably need some data to be mirrored between the two nodes. A high availability solution is offered by GlusterFS. Within this article, I am going to show how you can set volume replication between two CentOS 7 servers. Let's assume this: node1.domain.com - 172.31.0.201 node2.domain.com - 172.31.0.202…


How to install a .pxf windows ssl certificate on your linux web server

Windows uses .pfx for a PKCS #12 file. PFX stands for Personal eXhange Format. This is like a bag containing multiple cryptographic information. It can store private keys, certificate chains, certificates and root authority certificates. It is password protected to preserve the integrity of the contained data. In order to install it on our apache/nginx web server we need to convert it PEM. Upload…


Mysqldump Through a HTTP Request with Golang

So, in a previous post I explained how one can backup all databases on a server, each in its own dump file. Let's take it to the next level and make a Golang program that will let us run the dump process with a HTTP request. Assuming you already have Go installed on the backup server, create first a project directory in your home folder for example. Copy the mysql dump script from here and save…


Mysqldump Command - Useful Usage Examples

One of the tasks a sysadmin will always have on their list is backing up databases. These backups are also called dump files because, usually, they are generated with mysqldump command. I am going to share a few tricks on mysqldump that will help when handling servers with many relatively small databases.   The most simple way to backup databases would be using mysqldump command with the the…


How to save a file in Vim after forgetting to use sudo

Many of you probably experienced this. You edit a file in Linux with Vim or Nano or whatever else text editor you might be using and when you try to save, you realise you forgot to launch the editor with sudo privileges, and file can't be written. Exiting without saving and editing again with sudo privileges is not always an option, especially if you lose a lot of work. Solutions There are some…