Skip to main content

Posts

Showing posts from September, 2008

USB Boot Installation

Many of us are familiar to the term Live CD , a common term during Linux installations. Being a System Administrator for past 2 years at CRAVE , a problem which I regularly came across was the need for a CD-ROM during installation process. Now this is absolutely fine when we install distro on a PC or so, but when you are talking about 20-30 PCs this becomes a pain especially if the PCs aforementioned are without CD-ROMs. As I was thinking of possible solutions like 'network boot', it struck me that ' USB boot' is also a possible solution. Though ' USB boot' is not very popular among Linux users, at least now. Currently ' USB boot' is in its early stages. At CRAVE we tried ' USB boot' about 7-8 months ago, the result was we could not get pass the initial loading screen. Making ' USB boot' work involves a lot of tweaking. I believe it is high time that Linux distros start working towards this, the floppy disks have already vani...

Automating MySQL DB backup

Recently I came across a situation that required to create backup of websites maintained by me. The CRAVE wiki and CRAVE site administered by me are not regularly updated so i needed something that would backup the databases monthly. This is when it struck me, that cron could solve my problem. Writing a simple shell script and calling the script via cron solved my problem. Let the script name be dumpdb.sh . The shell script for it is as follows #!/bin/sh db_uname="DBUSER"; db_pass="DBPASSWD"; db_name="DBNAME"; dateVar=$(date +%d%b%Y) mysqldump -u $db_uname -p$db_pass $db_name > ~/mysql_dbbackup/$db_name-$dateVar.sql This script will create dump of the database. The naming of the file is done by appending date with the database name, this way a unique name is created for every dump. The only job left now is to call this script every first day of month. This job can be done by adding the following line to crontab 01 10 1 * * /path_to_script/dumpdb.s...