Sep 18 2008

Lynx user Guide

Tag:tepezcuintle @ 2:39

Lynx

Lynx Users Guide v2.8.5

Lynx is a fully-featured World Wide Web (WWW) client
for users running cursor-addressable, character-cell display devices (e.g.,
vt100 terminals, vt100 emulators running on PCs or Macs, or any other
character-cell display). It will display Hypertext Markup Language
(HTML) documents containing links to files on the local system, as
well as files on remote systems running
Continua”Lynx user Guide”


Sep 09 2008

How to backup your MySQL databases with Hotcopy and bash

Tag:tepezcuintle @ 4:45

Dolphin
Backing up your MySQL databases the easy way.

This is an easy script that can back up all your mysql databases, provided you are using MYISAM tables and not INNODB

Cut and paste this shell script and dump it on your /etc/cron.daily folder
then chmod 700 /etc/cron.daily/marco-db.sh


#!/bin/bash
#
# Marco Maldonado MySQL Backup
# Version 1.0 September 9 2008
# comments marco@penguincares.no-ip.org

MYSQL=`which mysql`
HOTCOPY=`which mysqlhotcopy`
BACKUPS=/backups/marco-db
userpassword=" --user=root --password=yourpassword"
dbs=`$MYSQL -u root -pyourpassword -Bse 'show databases'`

for db in $dbs
do
rm -rf $BACKUPS/$db.3
mv $BACKUPS/$db.2 $BACKUPS/$db.3
mv $BACKUPS/$db.1 $BACKUPS/$db.2
mv $BACKUPS/$db.0 $BACKUPS/$db.1
mkdir $BACKUPS/$db.0
$HOTCOPY $userpassword $db $BACKUPS/$db.0
done

Once you have saved this script you need to create a backup directory. I created my directory inside the folder /

mkdir /backups
mkdir /backups/marco-db

Remember you can change the path to the backup directory to any directory that you like, but
please edit the script to reflect the changes.

Ok so this is what will happen, the first time it runs it will create a backup of your databases inside the /backups/marco-db folder the first backup will have all the databases in this format.

drwxr-xr-x 3 root root 4096 Sep 9 00:19 mysql.0
drwxr-xr-x 3 root root 4096 Sep 9 00:19 rachelcloud.0
drwxr-xr-x 3 root root 4096 Sep 9 00:19 security_blog.0
drwxr-xr-x 3 root root 4096 Sep 9 00:19 techmodeals.0
drwxr-xr-x 2 root root 4096 Sep 9 00:19 test.0

then the next day that it runs again it will create another backup and the backup from the day before will be renamed with a 1 at the end.

drwxr-xr-x 3 root root 4096 Sep 10 00:19 security_blog.0
drwxr-xr-x 3 root root 4096 Sep 9 00:19 security_blog.1
drwxr-xr-x 3 root root 4096 Sep 10 00:19 techmodeals.0
drwxr-xr-x 3 root root 4096 Sep 9 00:19 techmodeals.1

the script will run until it creates 4 backups of your databases and then it will start removing the 4th oldest backup. so you will have 4 days worth of backups of your database.

You can change the script so that you only have 2 day backups or 3 days. You can also modify the path to the backups for example /backups/weekly and then drop this script inside the
/etc/cron.weekly and you will have weekly backups of your database.

That way you can have a full weekly backup and then daily backups of your database just in case.

I hope this helps someone who is having problems backing up their databases.

Warning: These scripts are free and there is no guarantee. While I have tried everything to make sure that everything works you have to make sure to test it first before you use it in a production environment.

Later Penguins.