Koozali.org: home of the SME Server

Backup Device Advice

Offline gbentley

  • ****
  • 482
  • +0/-0
  • Forum Lurker
    • Earth
Backup Device Advice
« on: February 05, 2008, 03:20:44 PM »
Hi All,

A client is now exceeding DAT40 and has about 30GB of data. DAT seems to finish at DAT72 and it seems its on to AIT after that however AIT prices seem to rocket towards a grand after about 50GB.

Can anyone recommend any type of reasonably priced backup device that they have working with SME? (links would help :)

The only stipulation is that it must be automated / unattended !

Thanks a mill !

Graham
"If you don't know what you want, you end up with a lot you don't."

Offline brianr

  • *
  • 988
  • +2/-0
Re: Backup Device Advice
« Reply #1 on: February 05, 2008, 04:12:38 PM »
I just use a few USB hard drives, and a script which uses rsync to copy the changed data:

Here's an example:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#!/bin/sh
#
# Archive all system and user data from active Hdd to External 500gb HD
#
LOG="/tmp/rsync.log"
EMAILTO="admin"
date >$LOG
DEV1="sda1"
DEV2="sdb1"

mount /dev/$DEV1 /media/usbdisk >>$LOG

if [ ! -e /media/usbdisk/backup? ];then mount /dev/$DEV2 /media/usbdisk >>$LOG
  if [ ! -e /media/usbdisk/backup? ];then echo "Full backup usbdisk failed to mount ";exit 1
  else echo "using $DEV2" >> $LOG;
  DEV=$DEV2
  fi 
else echo "using $DEV1" >> $LOG;
  DEV=$DEV1
fi
 
ls -l /media/usbdisk/backup? >> $LOG

HDindex=`ls -l /media/usbdisk/backup?`
HDindex=${HDindex#*backup}


echo "Backup disc $HDindex" >> $LOG

echo "pre-backup" >> $LOG
#signal-event pre-backup >> $LOG
/etc/e-smith/events/actions/mysql-dump-tables
ls -l /home/e-smith/db/mysql/* >> $LOG
echo "post pre-backup" >> $LOG

rsync -aPv /home /media/usbdisk/backup/ >> $LOG
rsync -aPv /etc /media/usbdisk/backup/ >> $LOG
rsync -aPv /root /media/usbdisk/backup/ >>$LOG
rsync -aPv /usr /media/usbdisk/backup/ >>$LOG
rsync -aPv /bin /media/usbdisk/backup/ >>$LOG
rsync -aPv /lib /media/usbdisk/backup/ >>$LOG
rsync -aPv /opt /media/usbdisk/backup/ >>$LOG
rsync -aPv /service /media/usbdisk/backup/ >>$LOG

PERCENT=`df | grep media | gawk '{print $5}'`

echo "USB Hard Drive used: $PERCENT" >>$LOG

date >>$LOG
umount /media/usbdisk >>$LOG

cat $LOG | grep -v "files\.\.\." | mail $EMAILTO -s "Full backup log on /dev/$DEV using Backup disc $HDindex used $PERCENT"

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


as you can see it expects to find a file on the top level "backup?" where the ? is a digit 0-9, each drive is formatted to ext3, and has a file "backup1","backup2" etc the numeric is used as part of the email sent, so that the admin can tell which drive was used.

I get the customer to change the drive as required (daily,weekly,etc).

Note that the files accumulate, which means that any files deleted are retained, but also means if you restore from the data, then files (and emails) "magically" re-appear.  If you add "--delete" to the rsync calls, then  it will produce a copy of the current state, but you will not be able to rescue deleted files unless they are on another drive (or it is the same day)  I run it nightly via a script in cron.daily.

Note also that the drive that the USB connects as, depends on your other arrangements, SATA drives come up as /dev/sd?9, IDE drives come up as /dev/hd?9, therefore depedning on this your USB drives may be /dev/sda1 or /dev/sdc1 (or whatever).


Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline jester

  • *
  • 496
  • +1/-0
Re: Backup Device Advice
« Reply #2 on: February 05, 2008, 04:16:13 PM »
It has not yet been fully tested, but you could use a cheap usb-hd or a iomega REV-drive together with Backup with DAR, i've got this running without any real problems for a few months now. Or a NAS (or an old pc with big hd and FreeNAS) together with Backup with DAR or AFFA no experience with affa though.

HTH,
jester.

Offline brianr

  • *
  • 988
  • +2/-0
Re: Backup Device Advice
« Reply #3 on: February 05, 2008, 04:34:25 PM »
the dar contrib works fine with hd-usb, I use it on my own system every day.  my only (small) reservation is that it does not allow me to recover deleted files unless the drive is changed everyday (which is why I use the above).  With my clients, this is the most common  use of the backup.
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline gbentley

  • ****
  • 482
  • +0/-0
  • Forum Lurker
    • Earth
Re: Backup Device Advice
« Reply #4 on: February 05, 2008, 04:49:02 PM »
Thanks for those - I did try DAR some months ago but didnt seem to get it to work correctly.

In some places I use the 'Recycle Bin' but I cant remember if its possible to auto empty it on a cycle - will have to read up that !!!

In this instance there is already another SME remotely rsync'ing the main office to mirrored scsi discs however they are paranoid and liked taking the tape home.

Will look into the other options - thanks !!!

Graham

Brian - Greetings from Sunny Southport - Lol !!!
"If you don't know what you want, you end up with a lot you don't."

Offline m

  • ****
  • 276
  • +0/-0
  • Peet
Re: Backup Device Advice
« Reply #5 on: February 05, 2008, 08:56:56 PM »
@brianr
there's no need to backup /etc/, /usr/, /bin/, /lib/, /opt/ and /service/.
quite the contrary, it will be harmful if you would restore those data.
This command shows you all the files and dirs you have to backup:
Code: [Select]
echo 'use esmith::Backup;$b = new esmith::Backup;print join("\n",$b->restore_list)' | perl

Offline brianr

  • *
  • 988
  • +2/-0
Re: Backup Device Advice
« Reply #6 on: February 05, 2008, 09:21:31 PM »
that may be true for the ordinary backup procedure, but from my experience if you try to use the CopyFromDisk program that Charlie wrote some months ago, it assumes a "complete" system and fails if it is not.

see here:

http://bugs.contribs.org/show_bug.cgi?id=2741


Also some systems have user data in /opt, such as the mailman contrib
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Backup Device Advice
« Reply #7 on: February 05, 2008, 10:05:31 PM »
This command shows you all the files and dirs you have to backup:
Code: [Select]
echo 'use esmith::Backup;$b = new esmith::Backup;print join("\n",$b->restore_list)' | perl

Or just:

Code: [Select]
perl -e 'use esmith::Backup; $b = new esmith::Backup;print join("\n",$b->restore_list)'

Offline thomasch

  • *
  • 232
  • +0/-0
Re: Backup Device Advice
« Reply #8 on: February 06, 2008, 03:53:40 AM »
May I ask you why not backup via network?

I have a 160GB Freenas box as a backup server.
Perfectly backup every night unattended and automatically rotate using Backup_with_dar contrib.
Every morning I receive backup report in my mailbox.

thomas

Offline gbentley

  • ****
  • 482
  • +0/-0
  • Forum Lurker
    • Earth
Re: Backup Device Advice
« Reply #9 on: February 06, 2008, 07:26:33 AM »
As above I actually have another remote sme and rsync the ibays. However, for years I drummed into them how important backup is, and also made them buy into tape [travan, then DAT] They are so used to taking a tape offsite overnight that they now think there is something wrong if they don't do it. Both servers are Dell SC1420 with Dual SCSI, the remote one has APC UPS as occasionally they have power glitches. I think there are a few concerns for them;

a) Fire / Theft at either office b) Power cuts at remote office c) Staff accidently deleting files they need that day

Actually I was wondering ....

To address c) I could use the 'Recycle Bin' however I woud like the possibility of purging at the end of each week?
Also, is a 'Recycle Bin' folder actually within an ibay (i.e. would it cause any issue for my rsync job?)
« Last Edit: February 06, 2008, 07:43:24 AM by gbentley »
"If you don't know what you want, you end up with a lot you don't."

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Backup Device Advice
« Reply #10 on: February 06, 2008, 09:41:48 AM »
gbentley


Recycle Bin is the answer for recovering deleted files.
The folder is in
..../ibayname/files/Recycle Bin

Also take a look at ShadowCopy which will retain old versions of files.
http://wiki.contribs.org/ShadowCopy
...

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Backup Device Advice
« Reply #11 on: February 06, 2008, 09:44:43 AM »
Hi All,

A client is now exceeding DAT40 and has about 30GB of data. DAT seems to finish at DAT72 and it seems its on to AIT after that however AIT prices seem to rocket towards a grand after about 50GB.

Can anyone recommend any type of reasonably priced backup device that they have working with SME? (links would help :)

The only stipulation is that it must be automated / unattended !

Thanks a mill !

Graham


My 2c:
if you want to continue to use tape, look to an used DLT tape driver; it is rock solid, works without problems with sme without changing anything.

HTH

Ciao
Stefano