Topic: Backup Solutions

I'm wondering what everyone does hardware- and software-wise to do backups. 

I haven't been doing any regular ones lately, but before I was just tarring up the important stuff on my workstation and scp'ing it to my server with a shell script.  I'm not sure how I'm going to set them up now, so I guess I'm looking for some ideas that I haven't thought of!

and I'm just curious.

Re: Backup Solutions

I've got a script that runs nightly that makes a tar file of my /home directories minus a few directories like /home/roddierod/tmp.

The tar files are written to a external firewire drive I have. Then after a while I write them to DVD for storage.

I really have to go tweak that file now that I think of it....

"An educator never says what he himself thinks, but only that which he thinks it is good for those whom he is educating to hear."
-Nietzsche

Re: Backup Solutions

Tape backups!

One for the web/email server and one for the firewall.

The ws is expendable (so to speak) and I just backup the /home dir occasionally to the webserver so it ends up on tape wink

"UBER" means I don't drink the coffee... I chew the beans instead
             -- Copyright BSDnexus

Re: Backup Solutions

I backup my / every week, for those times where my disk desides to die....
I also  backup my music/photos/videos/stuff I create/  twice. One  when sth new is added, and one "long term" (in case sth is deleted by mistake from the original directories  and then deleted again from the backup during replication).

I use rsync and external usb disks.
WIntellect what backup hardware are you using ? I've never seen or worked with tapes (well except from my...walkman tongue)

Guru for a day, newbie for a lifetime

Re: Backup Solutions

I too use tape, but then I found a DLT4000 drive for attractive terms (namely, free).  I have it attached to my server, and do backups from the workstations manually using tar at the moment.  I don't have media files, so 40GB/tape is enough for me if I am careful.

I will shortly implement bacula for network-wide backup, and organize things more.

DrJ

Re: Backup Solutions

I've looked into doing tape backups but it seemed like a lot of the hardware was pretty expensive.  maybe I was looking in the wrong places.

for something similar to a tape backup I suppose I could put a CD-RW in the machines I want to back up and copy all of my config files to the CD every couple of days or so with a cron job.  I think I've got a couple of CD-RW drives laying around...

Re: Backup Solutions

I think for config files sth like tar-bz2ing and then mailing them somewhere would be more convienient.
But then I dont't know how big your configs are tongue

Guru for a day, newbie for a lifetime

Re: Backup Solutions

they're not that big smile, but I like being self-reliant!  I suppose if they were small enough I could write them to a floppy disk.

Re: Backup Solutions

asemisldkfj wrote:

I've looked into doing tape backups but it seemed like a lot of the hardware was pretty expensive.  maybe I was looking in the wrong places.

Look for a DLT4000 or 7000.  They are available for about $100 used; you need a SCSI port and usually some adapters (50 pin to 68 pin) and cables.  Tapes are about $15 new, and dirt cheap used (if you trust them). $15 for 70GB (compressed) is not too bad.

I do caution that these things are large: they require two deep 5.25" days that are not obstructed with guides or notches.  Mine came with a separate enclosure (also free) so that was not an issue for me.

They are also not fast.  My drive runs at about 1.5MB/s, which is fine for an overnight backup, but don't expect blazing speed.

The upside is they are darned reliable, new tapes are guaranteed for 30 years (!), they are widely used, and the non-changer varieties are inexpensive.  Now if you want to get into TB tape storgae, you would need LTO drives and tape changers.  That runs into major $$.

Re: Backup Solutions

I wrote a backup script to burn tarballs to a CD-RW tonight.

http://www.thehomerow.net/software/cd_backup.sh

#!/bin/sh

cd /home/brain
mkdir tmp
cd tmp/
tar -czf etc.tgz /etc/hosts /etc/ksh.kshrc /etc/pf.conf /etc/profile /etc/rc.conf.local /etc/skel/ /etc/sysctl.conf
tar -czf home.tgz /home/brain/.irssi/config
tar -czf root.tgz /root/bin/
tar -czf www.tgz /var/www/archive/ /var/www/htdocs/

mkisofs -R -o backup.iso /home/brain/tmp

export ISOSIZE=`ls -sk backup.iso | awk '{print $1}'`
if [ "$ISOSIZE" -gt "700000" ]
then
    echo "ISO is $ISOSIZE kilobytes." | mail -s "Failed Backup" brain
    exit
fi

cdrecord blank=fast dev=/dev/rcd0c
cdrecord dev=/dev/rcd0c backup.iso
cd /home/brain
rm -r tmp/

Last edited by asemisldkfj (2006-10-11 02:04:40)

Re: Backup Solutions

I use this scripts, sends most important files to email every night:

#!/bin/sh

BACKUP_DIR=~/.BACKUP
HOME_DIR=/home/vermaden

MUTT=/usr/local/bin/mutt
EMAIL=me@some.server.com

LIST_DOT=list-dot
LIST_SYS=list-sys
LIST_STD=list-std

NAME_DOT=backup-dot.tar.gz
NAME_SYS=backup-sys.tar.gz
NAME_STD=backup-std.tar.gz

ECHO=NO

eval_value ()
{
  if [ $? -eq 0 ]; then
     if [ $ECHO != NO ]; then
       echo "done"
     fi
  else
    if [ $ECHO != NO ]; then
      echo "fail"
    fi
    exit 1
  fi
}

create_backup () # (file LIST, file NAME)
{
  if [ $# -ne 2 ]; then
    if [ $ECHO != NO ]; then
      echo "ERROR: create_backup(): need two arguments"
    fi
    exit 1
  fi

  if [ $ECHO != NO ]; then
    echo -n "BACKUP: Creating ${2}: "
  fi

  mv -f ${BACKUP_DIR}/${2} ${BACKUP_DIR}/${2}.old > /dev/null 2>&1
  cd ${HOME_DIR} && tar --exclude ${BACKUP_DIR} -czf ${BACKUP_DIR}/${2} `cat ${BACKUP_DIR}/${1}` > /dev/null 2>&1
  eval_value
}

sent_backup ()
{
  if [ $ECHO != NO ]; then
    echo -n "BACKUP: Sending backup to ${EMAIL}: "
  fi

  ${MUTT} -a ${BACKUP_DIR}/${NAME_DOT} -a ${BACKUP_DIR}/${NAME_SYS} -s "`hostname|cut -d . -f 1`: daily backup // `date +"%d-%m-%Y"`" ${EMAIL} < /dev/null > /dev/null 2>&1
  eval_value
}

case $1 in
  --small|-s) # SYS + DOT
    create_backup ${LIST_DOT} ${NAME_DOT}
    create_backup ${LIST_SYS} ${NAME_SYS}
    ;;
  --all|-a) # SYS + DOT + STD
    create_backup ${LIST_DOT} ${NAME_DOT}
    create_backup ${LIST_SYS} ${NAME_SYS}
    create_backup ${LIST_STD} ${NAME_STD}
    ;;
  --mail|-m) # send email with MUTT(1)
    if [ -x ${MUTT} ]; then
      sent_backup
    else
      if [ $ECHO != NO ]; then
        echo "mutt(1) mail client not avialable here: ${MUTT}"
      fi
      exit 1
    fi
    ;;
  *|-h|--help)
    echo "usage: `basename ${0}` [ -s | -a ]"
    ;;
esac
"religions, worst damnation of mankind"
[color=Blue]Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for

Re: Backup Solutions

bacula seems to be a good network backup solution, it was metnioned on bsdtalk in september 2006 .
http://www.bacula.org/

13

Re: Backup Solutions

That's what I use for network-wide backups, both full and incrementals.  It works well.

Re: Backup Solutions

maple wrote:

I use floppies. Alot of floppies. Not so bad, but backing up a few gigs of mp3s is a pain since i have to split up each song onto 2 or 3 floppies.

God I hope you're joking.

... and then they said "I bet you can't make MINIX kernel panic!!!" And that's when I got mad

Re: Backup Solutions

KernelPanicked wrote:
maple wrote:

I use floppies. Alot of floppies. Not so bad, but backing up a few gigs of mp3s is a pain since i have to split up each song onto 2 or 3 floppies.

God I hope you're joking.

lol

"UBER" means I don't drink the coffee... I chew the beans instead
             -- Copyright BSDnexus

Re: Backup Solutions

Floppies are good for backing up important config files. Whole /etc directory
goes into 1.4M floppy if i tar.gz it first.

maple wrote:

I use floppies. Alot of floppies. Not so bad, but backing up a few gigs of mp3s is a pain since i have to split up each song onto 2 or 3 floppies.

lol

Re: Backup Solutions

erno wrote:

Floppies are good for backing up important config files. Whole /etc directory
goes into 1.4M floppy if i tar.gz it first.

Sure... Then one day you go back to use them and find they're not working.

"UBER" means I don't drink the coffee... I chew the beans instead
             -- Copyright BSDnexus

Re: Backup Solutions

next thing you know, the disk is sitting next to your magnetic nametag.

Re: Backup Solutions

dannyp wrote:

next thing you know, the disk is sitting next to your magnetic nametag.

lol I once knew a store that had powerful magnets under the counter to disable the perfumery alarm tags. However, when customers handed their credit cards over the counter to purchase the products, they were suddenly shocked to find the cards no longer worked in the card-swipe...

"UBER" means I don't drink the coffee... I chew the beans instead
             -- Copyright BSDnexus

Re: Backup Solutions

wintellect:  That's much more common than you think.  At least in the States...  Stores are getting smarter and moving the magnets off to the side of the register so customers don't accidentally ruin their card.

May Science bless you.

Re: Backup Solutions

just an update to my backup solution here at home.

I've now got an extra drive in my server that I use specifically for backing things up or for storing large files that I don't want to keep anywhere else. I've got a cron job on the server that copies important stuff from the server's main drive over to the backup drive every 24 hours.

rsync --delete -avz /home/brain/documents /var/www/users /var/www/htdocs /root/bin /home/brain/files/crashoverride/

nothing too complicated smile.

I've also installed Anacron on my MacBook so if it's asleep when the backup is scheduled for it will perform it a few minutes after waking up. and the rsync command:

rsync -e 'ssh -p 23' --delete -avz ~/Documents ~/Movies ~/Music ~/Pictures ~/Software crashoverride:~/files/cerealkiller/

it's been working very well lately, and the best part is that I don't even have to think about it smile.

Last edited by asemisldkfj (2007-11-18 18:08:44)