Solved

Error in Back up Script !!

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VMware Workstation 12 Player 16 73
LINUX backups with VEEAM 8 79
How to enable sync between two yum repo? 1 30
windows 7 starter missing password 21 77
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…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
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.

776 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