Archive for the ‘OS’ category

Exclude File or Folder from Archiving

April 7th, 2010

I’m just wanna create a note, because sometime this simple thing is forgotten. To exclude a file or folder from archiving process, we can use –exclude option behind tar command.

Example :
tar -czvf file-result.tar.gz /path/to/file/or/folder/for/archiving –exclude “/path/to/exclude”

MySQLdump Without Locking Tables

April 6th, 2010

For urgent reason like preventing website down when dumping MySQL, we need to skip lock-tables. You can use -–skip-lock-tables and –skip-add-locks option with mysqldump command.

Example :
mysqldump -u 412843_reebonzsg -p –skip-add-locks –skip-lock-tables db_name \
> dbfile_dump.sql

Awstats Patch – Add Database Break per Minute

March 24th, 2010

Just because of my monitoring server being shut down by somebody at office, I should give my customer another availability report. I decided to use awstats, because it’s free to use and also widely use for analysing apache log.

By default, awstats will process data at monthly based, but for several purposes I need more details. Awstats has ‘databasebreak’ feature to separate analysis result based on monthly, daily, and hourly. But still, I need more details, so my friend from Teltics help me patch awstats source code.

So, you can use it by :

# perl awstats.pl -config=awstas.domain.conf -update -databasebreak=minute

awstats.pl