Koozali.org: home of the SME Server

Better Backup Selection

linze

Better Backup Selection
« on: April 17, 2004, 02:53:09 AM »
Wouldn't it be nice to be able to select what you backup,
For instance I have 250GB of ISO's on my sme box and I dont really need to back them up BUT my data is also on there which I DO need to backup and I cant because when you select a "backup" it BACKS up EVERYTHING!!!!
Imagine this I have 800GB of storage drives in my SME Box so I do like to "hoard" stuff!!
I'd like to be able to select between which IBAYS I can backup!!!!

Any Help?
Anyone?
YooHoo

bobk

Better Backup Selection
« Reply #1 on: April 17, 2004, 05:03:14 AM »
You could purchase the custom backup and rsync panel from dungog.net. It is inexpensive and work nicely.

OR

I haven't tested this but you should be able to exclude iso files (or anything else) from your backups.
Try the following from a console.
Code: [Select]

# mkdir -p /etc/e-smith/templates-custom/ect/flexbackup.conf
# cp /etc/e-smith/templates/etc/flexbackup.conf/10Exclure_exp00 /etc/e-smith/templates-custom/etc/flexbackup.conf/10Exclure_exp00
# cd /etc/e-smith/templates-custom/sbin/e-smith/flexbackup.conf

Use your favorite text editor to edit the 10Exclure_exp00 template fragment to exclude whatever you want excluded from your back-ups.

Example, try adding this to exclude iso files - $exclude_expr[2] = '.iso';

You may have to experiment a bit with the expression. Go to flexbackup.org for more information.

Save your changes.
Then do.
Code: [Select]

# /sbin/e-smith/expand-template /etc/flexbackup.conf


Do a back-up and see how it works.

Kelvin

Better Backup Selection
« Reply #2 on: April 25, 2004, 08:28:13 AM »
You could install the Arkeia contrib (I'm assuming you have a tape drive). Shad Lord configured the scripts to "mimic" SME's backup operation (ie. backup everything) but you could then either :-

a) Use the Windows based GUI to do selective backups

or

b) write you own scripts to perform selective backups

or

c) make clever use of Arkeia's .OPB_NOBACKUP exclusion capability to exclude directories from being backed up (that way you don't need to modify Shad's scripts)

Kelvin

Offline Denbert

  • *
  • 156
  • +0/-0
    • hegnstoften.net
Backup script from one ibay to another ibay
« Reply #3 on: April 26, 2004, 08:20:39 PM »
I have used this nice script for som time now - Runs every night from /etc/cron.daily

Please see

http://mirrors.sunsite.dk/ldp/LDP/solrhe/Securing-Optimizing-Linux-RH-Edition-v1.3/chap29sec306.html

for details - Runs great om my SME 5.6u6

Cheers Dennis  :pint:

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

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


COMPUTER=jmvserver                                  # name of this computer
DIRECTORIES=/home/e-smith/files/ibays/pub/files/Dokumenter                    # directoris 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

jbillings

Better Backup Selection
« Reply #4 on: July 15, 2004, 07:03:30 AM »
This looks like a good script, it might work for a situation I am in which I described here
before I realized I should have posted it in this forum.