Welcome to Geeklog Tuesday, November 12 2019 @ 02:41 pm EST

Geeklog.net

RAID for new GL server

  • Contributed by:
  • Views: 4,568
Geeklog.net Knuckles has been gracious enough to donate a dual 1.7GHz Xeon machine. This server will be the future home of this site and other GL related stuff. Before I decide to each the cost, I thought I'd check to see if anybody has a PCI RAID controller they'd like to donate to the project that can handle 4x18.4GB SCSI disks. I also have 500MB of RAM and could use another 500MB if anybody has that. I know, it's a stretch but if any of you have this hardware and are willing to donate any hardware (or money to buy the hardware) please let me know. Email me if you are interested: tony@geeklog.net

Backing Up Geeklog

  • Contributed by:
  • Views: 8,933
Geeklog.net From time-to-time on the geeklog-devel mailing list I see questions about backing up MySQL databases. The answer is pretty simple, write a shell script to do this for you, add it to your crontab or put it in one of the /etc/cron.* directories.

As some of my already know, you can use PHP as a shell scripting language. While as a pure shell language it lacks some of the power of, say, Bash, it is still a viable option for the PHP coder.

This script is a PHP shell script I wrote that will back up a MySQL database. If you already have PHP compiled as a CGI on your system (see php.net's install docs for how to do that) then you can drop this in and it should work fine. The script keeps 7 daily backups, 4 weekly backups and 12 monthly backups which should make recovery much simpler.

In addition to the PHP CGI, you will need tar because the script will compress the database backups. For a point of reference, on my Geeklog database of over 500 stories and 450 users a backup is 1.6MB and only 515KB compressed. Give it a try and let me know what you think!