LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-30-2004, 09:33 AM   #1
onewhoknows
Member
 
Registered: May 2004
Posts: 30

Rep: Reputation: 15
Help with backups


I was put in charge of maintaining a backup process, but sadly I'm just learning linux! Taking a look at this script I see that it splits the compressed file into as many 3072mb segments as required. Right now, it seems like the mkisofs command accounts for two iso images, but I'm fast running out of space. What do I need to do to make sure it creates a third ISO image or is this script already set up for the third file?

Thanks!




BACKUP="ops.tar"
SCRIPTLOG="/u1/dvd.staging.area/ops/ops.log"
ERRORLOG="/u1/dvd.staging.area/ops/ops.err"
CATALOG="/u1/dvd.staging.area/ops/catalog.txt"
ISOIMAGE="/u1/bertha/backup/DAILY-ISO-IMAGES/ops.iso"

# invoke a new script log
/bin/date >$SCRIPTLOG
echo "Creating backup." >>$SCRIPTLOG

# remove old files
cd /u1/dvd.staging.area/ops
rm -rf /u1/dvd.staging.area/ops/*

# tar files and directories.
( cd /u1 ; /bin/tar --atime-preserve -c -v --ignore-failed-read \
-f /u1/dvd.staging.area/ops/$BACKUP \
ops
) >>$SCRIPTLOG 2>$ERRORLOG

# generate catalog,
cd /u1/dvd.staging.area/ops
echo "Generating catalog." >>$SCRIPTLOG
/bin/tar -tvf $BACKUP >$CATALOG 2>>$SCRIPTLOG

# compress the backup.
cd /u1/dvd.staging.area/ops
bzip2 -9 $BACKUP

#----------------------------------------------#
# it's a dirty hack, but it gets the job done. #
# ops doesn't need to be completely backed up #
# therefore this script needs to be rewritten #
# using rdiff. we split into 3GB files, and #
# burn two CD's - aglenn 04/29/2004 #
#----------------------------------------------#



# split the file into 3GB pieces.
cd /u1/dvd.staging.area/ops
/usr/bin/split -b 3072m $BACKUP.bz2 $BACKUP.bz2.
#rm -f $BACKUP.bz2

# create ISO image.
echo "Creating ISO image file(s) ." >>$SCRIPTLOG
/usr/bin/mkisofs -r -J -V "OPERATIONS $DATE CD1" -o /u1/bertha/backup/DAILY-ISO-IMAGES/ops1.iso \
 
Old 07-30-2004, 09:56 AM   #2
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
The program split will break the file into as many parts as it needs. Does this script leave one or two iso images? It looks like it puts all the chunks into one big iso image. Do you actually burn the images after this?

Hmm, I think I need to spend some more time reviewing this script. Not sure I am not missing something.
 
Old 07-30-2004, 10:29 AM   #3
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Okay, I am having some trouble with this script. Everything appears okay till the last line (which is incomplete).

It would help if I had the rest of the script to review -- I am running it on a test system with fake directories and files to see just how it performs. Note: If /u1/ops is a seperately mounted partition you might want to look at replacing tar with dump -- as dump will let you do incremental backups (like you said you only want to backup what has changed).

In the meantime... what is the rest of the script... starting with the rest of the last line.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
backups shelbyg75 Red Hat 3 09-24-2004 05:16 PM
backups allan_y Linux - Newbie 3 07-01-2004 07:08 PM
backups firestomper41 Mandriva 3 02-29-2004 01:11 AM
backups AZDAVE Linux - General 1 11-06-2003 12:05 PM
Backups mohapi Linux - General 5 08-03-2003 09:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration