RAID for new GL server
- Friday, July 26 2002 @ 01:26 pm EDT
- Contributed by: Tony
- Views: 5,413
Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 08:22 pm EST
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!
Most engaging in the last 2 months
If you need help in setting up or using Geeklog, please see the documentation, the FAQ, the Wiki, try our search page or browse through the Support Forum. Chances are someone else already had the same problem.
More resources are listed on the support page.
If you still can't find an answer, feel free to post in the forum or ask on Gitter in the Geeklog room.