LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 08-06-2004, 06:56 PM   #1
PraxisArch
LQ Newbie
 
Registered: Jul 2004
Posts: 3

Rep: Reputation: 0
CD-RW/ Verify backup questions.


Hey kids.

I'm just about to leave a job where I've setup a auto-backup type thing (archiving data files, making an .iso, burning the .iso)... but I've never gotten around to encluding a verify routine. So my employer is going on my good word that their data is okay. Resulting from this, two questions:

1). Does anyone know what output cdrecord gives when it encounters a 'bad' cd-rw (ie: can't be written to)? Is there something that would be visable in the log that's sent to root?

2). Anyone have a handy way to verify that a backup is complete?

Thanks, tons.
jmp
 
Old 08-06-2004, 07:57 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,575

Rep: Reputation: 184Reputation: 184
"1). Does anyone know what output cdrecord gives when it encounters a 'bad' cd-rw (ie: can't be written to)? Is there something that would be visable in the log that's sent to root?"

cdrecord gives a non zero return code when something goes wrong. You could save the cdrecord error messages and record backup failures something like this:

STARTBACKUPTIME = $(hwclock --show)
echo $STARTBACKUPTIME >> /var/log/backup.log
cdrecord -data -eject /tmp/cd.image 2>> /var/log/backup.log
ISOSIZE= $(du -sh /tmp/cd.image)
echo "ISO image size = $ISOSIZE" >> /var/log/backup.log
# Check to make sure cdrecord worked OK.
if test "$?" != 0;
then
echo "error: CD burn failed, rc = $?" >> /var/log/backup.log
fi

"2). Anyone have a handy way to verify that a backup is complete?"
The du command in the above example logs the size of the iso image.

-------------------
Steve Stites
 
  


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
MBR zeroed. Can I verify backup MBR? TomF Linux - General 7 06-20-2005 06:28 PM
backup questions it_slut Linux - Newbie 2 01-10-2005 05:52 AM
How do I verify the iso's with md5sums and other questions Bork3 Mandriva 1 11-16-2003 03:48 PM
Backup questions. cottonmouth Linux - General 1 11-21-2002 03:58 PM
backup/verify files with tar hokri Linux - General 0 11-27-2001 07:05 AM


All times are GMT -5. The time now is 08:19 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration