Support Forum Articles File Help Startup DB Tips Service DB Hijack This! Analyzer

 

MySQL DB backup - Automated shell script

There's been quite a bit of interest in my guide to using cron. Lately one of my highest priorities has been data backups! For quite a while now I've had a rolling backup going so that I have 1 backup for every day of the week. There's been quite a few questions floating around about how I'm doing it, so now I'm going to show you exactly what I did. I have full access to the server so I can put things wherever I want :) If you're on a shared server you will have to put the file someplace that you have access to. I prefer placing everything in non web accessible directories.

If you guys would like to see more Linux related content on this site please post a message or 5 in the forum asking for help in our Linux forum. The forum is primarily windows users, so I've been writing guides to make their lives easier. I have plenty of tricks for the linux users too.

Step 1: Create the file

/usr/dbbackup

This can be done using MANY different programs. The most powerful might be vi, but pico is the easiest I've found. If you don't know how to use either of those apps you'll want to google it and/or get yourself out of ssh/telnet immediately and hire an administrator to do it for you! We do have a few linux server admins floating around the forum if you need them.


Written By: Martin Krohn
Date: 7-30-04
Views: 12930
Printer Friendly

Article Index:
Page 2 -->