Solved

Error in Back up Script !!

Posted on 2004-09-10
3
199 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 50 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

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Fine Tune your automatic Updates for Ubuntu / Debian
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.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

634 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