AboutWelcome to Free Software Daily (FSD). FSD is a hub for news and articles by and for the free and open source community. FSD is a community driven site where members of the community submit and vote for the stories that they think are important and interesting to them. Click the "About" link to read more...
AutoMySQLBackup is a shell script that lets you take daily, weekly and monthly backups of your MySQL databases using mysqldump. It can back up multiple databases, compress the backups, back up remote databases, and email the logs. This tutorial explains how to install and use it on an Ubuntu 9.10 server.
mylvmbackup is a Perl script for quickly creating MySQL backups. It uses LVM's snapshot feature to do so. To perform a backup, mylvmbackup obtains a read lock on all tables and flushes all server caches to disk, creates a snapshot of the volume containing the MySQL data directory, and unlocks the tables again. This article shows how to use it on an Ubuntu 12.10 server.
But there are better tools for managing your MySQL databases. One of those tools, MySQL Administrator, is actually released by the MySQL developers. This tool will work with any MySQL installation >= 4.0 and makes the daunting task of administrating MySQL databases far easier than any other desktop GUI tool.
mylvmbackup is a Perl script for quickly creating MySQL backups. It uses LVM's snapshot feature to do so. To perform a backup, mylvmbackup obtains a read lock on all tables and flushes all server caches to disk, creates a snapshot of the volume containing the MySQL data directory, and unlocks the tables again. This article shows how to use it on a Debian Lenny server.
Whilst an increasing number of recent converts are avoiding it (and I don't blame them really), the shell is still a key tool for the majority of GNU/Linux users. Shell scripts are knocked-up, shared and deployed in all sorts of circumstances - some simply time-saving, others life-saving.
This isn't about a shell script, it's about a really cool technique to apply in shell scripts. Have you ever been worried about multiple instances of a shell script running because they might overwrite or corrupt the data or devices they are working on? Here's a way to prevent that.
One of the most important responsibilities of any administrator is to make regular backups. But unlike backing up regular data, backing up databases isn't a straightforward affair. Designing an effective strategy for taking backups of production MySQL servers depends on a lot of factors.
Backing up files and directories is relatively easy; databases, however, have some special quirks that you need to address. Our examples use MySQL, but the same principles apply to PostgreSQL and other relational databases.
If you've ever worked with and manipulated MySQL databases, chances are you've used phpMyAdmin to manage your databases from a Web interface. But phpMyAdmin can be a little complex; if you want a lightweight alternative, try phpMinAdmin. It's easier to install than its more robust cousin and has an easy-to-navigate graphical user interface for most important MySQL functions.