Solved

Error in Back up Script !!

Posted on 2004-09-10
3
194 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
  • 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now