Koozali.org: home of the SME Server

Cheap Backup

scotta

Cheap Backup
« on: July 21, 2004, 04:44:23 PM »
I am needing to backup only the samba shares and am wondering what options there are other than a tape drive?

Would something like 2 removable IDE hard drives work? Can you hot swap IDE drives in linux? How would I set it up to delete everything on the drive and copy the whole samba share every night, alternatly is there a way to sync?

Thanks
Scott

Offline arnoldob

  • *
  • 183
  • +0/-0
Cheap Backup
« Reply #1 on: July 21, 2004, 05:04:45 PM »
Try searching the forums here for rsync. There are some posts about using it to sync files.

Here's a starter:
http://no.longer.valid/phpwiki/index.php/rsnapshot%20howto
http://no.longer.valid/mylinks/singlelink.php?cid=57&lid=7
http://mirror.contribs.org/smeserver/contribs/aloveless/howtos/rsync_backup/SME_BackupServer.html
Pay particular attention to the last one, it specifical talks about using removable drives.

Good Luck :pint:
Tampa, FL USA

scotta

Cheap Backup
« Reply #2 on: August 02, 2004, 05:09:25 PM »
http://mirror.contribs.org/smeserver/contribs/aloveless/howtos/rsync_backup/SME_BackupServer.html

Looks very much like what I want to do.

Can anyone confirm that you do not need to reboot the machine when removing these drives? ie: as long as the drives are identical and that they have been unmounted you can just pull the one out and put the other in?

Thanks
Scott

Offline Denbert

  • *
  • 156
  • +0/-0
    • hegnstoften.net
Re: Cheap Backup
« Reply #3 on: August 02, 2004, 06:16:08 PM »
Quote from: "scotta"
I am needing to backup only the samba shares and am wondering what options there are other than a tape drive?

Would something like 2 removable IDE hard drives work? Can you hot swap IDE drives in linux? How would I set it up to delete everything on the drive and copy the whole samba share every night, alternatly is there a way to sync?

Thanks
Scott


Hi,

I’m using a script from http://www.tldp.org/LDP/solrhe/Securing-Optimizing-Linux-RH-Edition-v1.3/chap29sec306.html

And are dropping the backup in an ibay – then I move the full backup every Monday to my XP box – It’s VERY simple and has saved me from a Disk Crash – Even my Domino Server was restored without any loss of data – below you will find my SME backup script:

------------------------------------------------------
#!/bin/sh
# full and incremental backup script
# created 11 october 2002
# Based on a script by Daniel O'Callaghan <danny[at]freebsd.org>
# and modified by Dennis Johansen <brascoe[at]hegnstoften.net>

#Change the 5 variables below to fit your computer/backup


COMPUTER=your_SME_Box # name of this computer
DIRECTORIES=/home/e-smith/files/ibays/pub/files/dokumenter # directory to backup
BACKUPDIR=/home/e-smith/files/ibays/backups/files/dokumenter # where to store the backups
TIMEDIR=/home/e-smith/files/ibays/backups/files/dokumenter/last-full # where to store time of full backup
TAR=/bin/tar # name and locaction of tar

#You should not have to change anything below here

PATH=/usr/local/bin:/usr/bin:/bin
DOW=date +%a # Day of the week e.g. Mon
DOM=date +%d # Date of the Month e.g. 27
DM=date +%d%b # Date and Month e.g. 27Sep

# On the 1st of the month a permanet full backup is made
# Every Sunday a full backup is made - overwriting last Sundays backup
# The rest of the time an incremental backup is made. Each incremental
# backup overwrites last weeks incremental backup of the same name.
#
# if NEWER = "", then tar backs up all files in the directories
# otherwise it backs up files newer than the NEWER date. NEWER
# gets it date from the file written every Sunday.


# Monthly full backup
if [ $DOM = "01" ]; then
NEWER=""
$TAR $NEWER -cf $BACKUPDIR/$COMPUTER-$DM.tar $DIRECTORIES
Fi

# Weekly full backup
if [ $DOW = "Sun" ]; then
NEWER=""
NOW=date +%d-%b

# Update full backup date
echo $NOW > $TIMEDIR/$COMPUTER-full-date
$TAR $NEWER -cf $BACKUPDIR/$COMPUTER-$DOW.tar $DIRECTORIES

# Make incremental backup - overwrite last weeks
else

# Get date of last full backup
NEWER="--newer cat $TIMEDIR/$COMPUTER-full-date"
$TAR $NEWER -cf $BACKUPDIR/$COMPUTER-$DOW.tar $DIRECTORIES
Fi
------------------------------------------------------
/ Denbert
"Success is not final, failure is not fatal: it is the courage to continue that counts" - Sir Winston Churchill