Solved

Error in Back up Script !!

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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
open source backup solution 1 36
awk to variable in bash 2 76
Migrating php-mysql-jquery application to Microsoft Azure Cloud 7 38
what do I need to host my own web sites? 13 53
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

820 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