--add-locks: Surround each table dump with LOCK
TABLES and
UNLOCK
TABLES statements. This results in faster inserts
when the dump file is reloaded.

--flush-privileges: Send a FLUSH
PRIVILEGES statement to the server after dumping
the mysql database. This option should be
used any time the dump contains the mysql
database and any other database that depends on the data in
the mysql database for proper
restoration.

The tricky part is how would you know, what file was uploaded X days ago? With richer (scripting) languages like Python, or Groovy, it's lot more easy to enumerate the files in the backup folder. And if files are more than X, delete the excessive files. To me, it's tricky to this in shell script. So, I ended up in having smart filename instead.

I name the files as www.mywebsite.com.YYYY-MM-DD.sql.tar. So, to delete the file that was created X days ago. All I have to do it to generate the date of X day ago and place in similar filename structure and then call s3cmd del s3://BUCKETNAME/SUB/DIRECTORY/OLD_FILENAME

Thursday, July 19, 2012

Sure you can do it manually. And it worked flawlessly until now. Wait
until you have a multi-module project and yet dared to do it manually.
Sooner than later you will see you have made a typo -- you renamed the version to 1.2.3-SHAPSHOT

Anyway, the most common Google search results into mvn release:update-revisions which requires the pom.xml to be in SNAPSHOT revision, and it's release, you may not want to perform a release.

A better (and correct) alternative is to use Maven Versions plug-in. It updates the versions of submodules too. Here is how to use it

Saturday, July 7, 2012

My last install of Nagios on CentOS went all fine except the home page of Nagios was not loading the main container with welcome page. It was blank. I had to change default home page to something meaningful. I changed it to "tactical overview" page.

In /usr/local/nagios/share/index.php or /usr/share/nagios/htdocs/index.php file, change this line

$corewindow="main.php";

to:

$corewindow="cgi-bin/tac.cgi";

If you do not find your index.php in above two locations, try using this command to locate it on your disc: