Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

backup filesystem one at a time

Status
Not open for further replies.

CaptNeo

Technical User
Jun 4, 2002
49
0
0
US
Hello,

I need to process a backup on each filesystem that are mounted one fs at a time. Say like a variable has this;

/ /usr /var

but this would depend on the system (it may even have a /home)

Now I tried to run this simple script but it would not run until I press the 'Enter' key.

# for tape in $i
> do
> read $tape
> /sbin/vdump -0qf /dev/ntape/tape0 $tape
> sleep 1
> done

Any help please?
 
each filesystem that are mounted
A starting point:
mount | awk '{print $1}' | while read tape
do /sbin/vdump -0qf /dev/ntape/tape0 $tape
sleep 1
done

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hi

That [tt][highlight #F0F8FF]read $tape[/highlight][/tt] looks strange. First, the [tt]$tape[/tt] is the loop control variable, so already will have one value from the given list and no [tt]read[/tt] is necessary. Second, when the variable name is preceded by the dolar sign, is a reference to it's value, but when [tt]read[/tt], there must be just a variable name.

Anyway, try PHV's script.

Feherke.
 
PHV,

Thanks for the tip, using that I was able to get what I needed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top