Automating executing commands on multiple tapes and changing (loading) them


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Automating executing commands on multiple tapes and changing (loading) them
# 1  
Old 11-05-2009
Automating executing commands on multiple tapes and changing (loading) them

The thing that we need to be able to do is:

- Scanning tapes from failed backup jobs with bscan (a bacula command)
- loading the next tape with the mtx command

Bscan does unload tapes but does not load them.

Bscan comes with this message when it's done with a tape:

Mount Volume "XO7563L3" on device "Tape1" (/dev/nst0) and press return when ready:

The script doesn't have to be fancy like determine in what slot the volume is. It would be enough just loading the tapes from let's say slot 10 to 24 and we need to make sure they are loaded in the right order into the tape library.

The thing that we ran into is that when the above message appears it normally should input the answer but in this case it should run another command first and then input the answer.

Is Expect the program for the job and how to do it?

Thanks...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Executing multiple commands in a file at same time

Hi Am having file.ksh as below wc -l file1.txt wc -l file2.txt wc -l file3.txt wc -l file4.txt i want all the commands in this file to execute in same time please help Thanks in advance (1 Reply)
Discussion started by: ragu.selvaraj
1 Replies

2. Shell Programming and Scripting

Executing multiple ssh commands inside a shell simultaneously

I would like to execute a commands in four different servers through ssh at a single instance(simultaneously). Below are the details with examples, ssh user1@server1 "grep xxxx logs" ssh user1@server2 "grep xxxx logs" ssh user1@server3 "grep xxxx logs" Each statement will take some... (4 Replies)
Discussion started by: Amutha
4 Replies

3. Shell Programming and Scripting

Automating execution of commands inside a program

I have a program dnapars I execute the program from command line as following: ./dnapars The program then prompts me some message as a user menu from where I have to select a series of options in the order R U Y R. And then I copy the output file (outfile) in another result file. I wrote the... (3 Replies)
Discussion started by: deeptisjains
3 Replies

4. Shell Programming and Scripting

Need help with executing multiple commands in remote machine

Hi, I work on a jumpserver and I wrote a script to transfer a file from source server to destination server. #!/bin/ksh echo "\nEnter the file name:\n" read name echo "\nSelect the Source server\n" echo "1. ODS PROD " echo "2. ODS DROPBOX" echo "3. ODS STE" echo "4. ODS STE DROPBOX"... (6 Replies)
Discussion started by: ajayakunuri
6 Replies

5. Solaris

Help with executing multiple remote commands after multiple hops

Hi SSHers, I have embedded this below code in my shell script.. /usr/bin/ssh -t $USER@$SERVER1 /usr/bin/ssh $USER2@S$SERVER2 echo uptime:`/opt/OV/bin/snmpget -r 0 -t 60 $nodeName system.3.0 | cut -d: -f3-5` SSH to both these servers are public-key authenticated, so things run... (13 Replies)
Discussion started by: LinuxUser2008
13 Replies

6. Shell Programming and Scripting

Executing commands

I need to execute a command to run my script several times with varying parameters perl ex.pl -b 130198 -e 130884 -c plot plot.txt 1_plot.txt perl ex.pl -b 1345 -e 1308 -c plot plot.txt 2_plot.txt perl ex.pl -b 1345567 -e 130898 -c plot plot.txt 3_plot.txt . . . 100's of excutions ... (2 Replies)
Discussion started by: Lucky Ali
2 Replies

7. Shell Programming and Scripting

Executing many commands at once

Hi, I want to run these two commands one after the other. awk 'BEGIN {OFS="\t"} {print $2}' sort -u rather than typing awk 'BEGIN {OFS="\t"} {print $2}' file1 > file2, then sort -u file2 > file3. Is it possible to run both commands on file1 then get output file3? Its kinda hard for... (5 Replies)
Discussion started by: kylle345
5 Replies

8. Shell Programming and Scripting

Executing Commands From Non-Standard Path (Changing user's PATH secretely???)

Hi: I have a requirement as below: I have some standard Unix commands modified and kept them in a directory say /usr/clsh/bin. For example I have a script named "ls" kept here which is modified version of "ls" (say it always gives long listing i.e. ls -l). When any user logs on and types... (2 Replies)
Discussion started by: ramesh_samane
2 Replies

9. Red Hat

How commands are executing ?

Hi Folks, I have a small doubt, the binary commands under /bin and /sbin as well as other path binary files, if you peek deep into that, you can find the difference in the way of normal perl programming and some commands will be like binary files. how are the commands executing like the... (3 Replies)
Discussion started by: gsiva
3 Replies

10. UNIX for Dummies Questions & Answers

how to tar to multiple tapes

how to tar to multiple tapes (1 Reply)
Discussion started by: sean dixon
1 Replies
Login or Register to Ask a Question
BSCAN(8)					     Network backup, recovery and verification						  BSCAN(8)

NAME
bscan - Bacula's 'Scan tape' SYNOPSIS
bscan [options] bacula-archive DESCRIPTION
The purpose of bscan is to read (scan) a Bacula Volume and to recreate or update the database contents with the information found on the Volume. This is done in a non-destructive way. This permits restoring database entries that have been lost by pruning, purging, deleting, or a database corruption problem. Normally, it should not be necessary to run the bscan command because the database is self maintaining, and most corrupted databases can be repaired by the tools provided by the database vendors. In addition, if you have maintained bootstrap files during backups, you should be able to recover all your data from the bootstrap file without needed an up to date catalog. bscan command. OPTIONS
A summary of options is included below. -? Show version and usage of program. -b bootstrap Specify a bootstrap file. -c config Specify configuration file. -d nn Set debug level to nn. -dt Print timestamp in debug output. -m Update media info in database. -D Specify the driver database name (default: NULL) -n name Specify the database name (default: bacula) -u username Specify database username (default: bacula) -P password Specify database password (default: none) -h host Specify database host (default: NULL) -t port Specify database port (default: 0) -p Proceed inspite of I/O errors. -r List records. -s Synchronize or store in Database. -S Show scan progress periodically. -v Verbose output mode. -V volume Specify volume names (separated by '|') -w dir Specify working directory (default from conf file) SEE ALSO
bls(8), bextract(8). AUTHOR
This manual page was written by Jose Luis Tallon <jltallon@adv-solutions.net>, for the Debian GNU/Linux system (but may be used by others). Kern Sibbald 26 November 2009 BSCAN(8)