Monday, August 17, 2015

Sample bash backup script

I made a backup script using bash, this script will backup html directory and skip some folder that do not need to be included. The backup process will be written in the log file, so that we know whether backup running successfully or not.

Variable that needed to be changed:
LOG: the log file.
TEMPDIR: temporary directory
BKPDIR: directory to save the back up files
WWWDIR: parent directory that needed to be backed up
BKP: list of directory that will be backed up
NOTBKP: list directory that will not be backed up

Second synchronized disk with drbd, corosync and pacemaker

A couple years a go, I configured a Fail Over system using DRBD, Corosync and Pacemaker with this tutorial. After years, I need more disk space on the system and also make it synchronize each other. So here I show the configuration example for that, if you want to adapt this configuration into your system, just make sure that you start the service in a correct order within crm console because if not, your Fail Over system will not work correctly.

Hacking TL-WA901N v2 AP into a Wifi Router

A TP-Link TL-WA901N/ND v2 is an Access Point, you can use this AP as Wifi client, WDS or standard repeater and bridge. I have this AP and had been used for repeater for several years without problems. But now, I want to use this AP as a wifi router because my existing router is quiet old and only support wireless G. Of course, there is no official firmware that can change this AP into wifi router. So, I decided to try an opensource firmware for this task.