Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Error in Back up Script !!

Posted on 2004-09-10
3
Medium Priority
?
201 Views
Last Modified: 2013-12-15
Hi,

I have a script which does daily back up.

/**********************************

#!/bin/sh
DEVICE="sda1 sda3 sdb1 sdb2 sda5"
if ( ! mt -f /dev/st0 rewind)  then
      echo "No tape in drive" && exit 1
fi

for item in $DEVICE; do
      mount /dev/$item -o remount,ro
      dump -0auqb 64 -f /dev/st0 /dev/$item
      mount /dev/$item -o remount,rw
done

**********************************/

It failed and gave me the following error for one of the file system.

Error message
==========

DUMP: cannot rewrite /etc/dumpdates: Read only file system
DUMP: Entire dump is aborted.
mount: /var is busy.


Can somebody please tell me what cause this error and how should i rectify it. Shall i again run the back and see whether i am getting the error or what. Any help would be highly appreciated.

Thanks in the anticipation that I will get some useful hint to solve the above problem.

Cheers!!
0
Comment
Question by:DipehKhakhkhar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 150 total points
ID: 12031607
You script is invoking dump with the "u" option, whcih says to update the file /etc/dumpdates,. But you've re-mounted / as readonly so that update will fail.

You can either not mount / as readonly or remove the "u" option from the dump command.
0
 
LVL 1

Author Comment

by:DipehKhakhkhar
ID: 12045647
Hi,

Thanks a lot for replying and explaining me about the possible cause of error.
I have made the changes like, removed -u option from the back up script so that it won't write anything now and kept the mouting of the file systems in the read mode only.

I hope tonight it will run properly.

Thanks !
Cheers

0
 
LVL 1

Author Comment

by:DipehKhakhkhar
ID: 12078392
Hi ,

Thanks for your help. It worked and backing is working fine now.

Cheers!
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question