Apache and backing up access log

I’ve search the www and at last i found a tool to rotate my Apache access.log and error.log
I use
Cronolog from http://cronolog.org/ , it is a free tool to use and easy to setup.

This cronolog is tested and run on Windows

  • download the installer from http://cronolog.org/download/cronolog-1.6.1-win32.zip
  • extract it to somewhere , mine is C:/cronolog/ and you can find
    • cronolog.exe
    • other stuffs
  • Go to your Apache conf httpd.conf and find your access logfile , you will see CustomLog C:/apache/logs/access.log common
  • Turn off the line and add this line TransferLog “|C:/cronolog/cronlog.exe C:/apache/logs/access.%Y%m%d.log”
  • Restart apache and your new access.log file will be created with access.20090709.log
  • Next step, you can backup your access log for old logs.

Ruby + Rails + Windows + Installation

Some of you out there may find installing ruby and rails are easy. But not some of us like me.Currently I installed ruby on my TOSHIBA laptop running on Windows XP, and to access the internet I have to use proxy.

Thanks to Michael Wales http://www.michaelwales.com/ruby-on-rails/installing-ruby-on-rails-on-windows-vista for providing very good step by step tutorial. My part here is just to explain more

Continue reading

Creating a daily backup MySQL database in Windows

You may using Windows as your database server, but don’t know how to backup it, and some of you may use tools. You can actually do it by running this command

“C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqldump.exe” –host=localhost -uroot -ppassword –opt mydatabase > “C:\helmy\backup\%date:~10,4%_%date:~4,2%_%date:~7,2%_backup.sql”

It will create a file 2008_04_04_backup.sql

If you want to schedule it, put it on a backup_db.bat and ask Windows Task Scheduler to run it