backup

Kenneth Porter shiva at sewingwitch.com
Sat Jun 19 02:05:01 UTC 2004


--On Wednesday, June 16, 2004 10:22 AM -0700 The Unofficial Bob Dylan Free 
Library <simon at freelib.org> wrote:

> The following script handles my hourly backup of my MySql.
> It performs the following steps:
> 1) Deletes the previous backup(s)
> 2) Tars and compresses contents of /var/lib/mysql
> 3) Copies (via Samba) the resulting tar
>    (For example NS13-hourly-backup-16-June-2004-09.tar.gz)to a Windows XP
> box    (Burner) share (bup).

Why not use mysqldump? That takes care of most locking issues, allowing you 
to do a "hot" backup. The output is a text SQL source file, which is tar'd 
at high compression. I do that every night on a web host and scp the 
tarball to /tmp on my home gateway. tmpwatch then takes care of removing 
the old backups.





More information about the users mailing list