Backing up all databases using mysqldump

In this post I’ll explain how I backup all databases in servers I work with. When you face trouble with those servers it’ll be pretty useful to have daily database dumps.

So, I use mysqldump utiliy to backup database and an script I wrote myself to transfer files, which you can find here.

Zipping and unzipping websites with php

Sometimes you need to work with only FTP access, and it takes a lot of time to backup a website through FTP because usually there are a lot of files and listing them is a long process. I made these php scripts to avoid wasting time when I only have FTP access. For example, when a mate wants to work on a website but he/she want to backup it up first just in case they break something. They use these scripts below:

Facebook sharer and IPv6 issue

Last week all facebook buttons on domains on ALL of our servers stopped working. I always got a 404 response when facebook crawler tried to visit our domains. This happened in our 2 dedicated servers from 1and1. At first, my mates were trying to figure out if it was a joomla issue, but they finally couldn’t solve it, so they asked me to investigate it. My first thought was: you got a 404? let’s check logs for those domains and we’ll see what happens for sure. I checked those files and I couldn’t see any 404 error, the visit wasn’t even logged. Shit happens.

Configuring IPTABLES and fail2ban on centOS 6

In this post I’ll explain how to configure iptables along with fail2ban and how to start/stop these services without messing up your chains or configuration.

Iptables should be included in your default Linux OS, and you can easily get fail2ban from standard repos. So, just enable the chains you need on /etc/fail2ban/jail.local. Copy the file from /etc/fail2ban/jail.conf if it doesn’t exist. For example, if you want (you should) activate ssh jail, just add/uncomment this lines to the file: