I am executing below command through script to restore volumes
ssh -p 22 firstname.lastname@example.org dd if=/dev/rmt/0n ibs=4096b | (cd /mnt; vxrestore -c -r -b 4096 -f -)
after restoring thre or four volimes, its ending with below message
===> Verifying ossdg/JUMP 2013-05-09 09:15:48
Positioning tape at block 3
Creating ossdg/JUMP_verify (12288 MB)
New vxfs FS on JUMP_verify
vxrestore -c JUMP_verify
Using vxrestore to receive email@example.com:/dev/rmt/0n to /mnt
UX:vxfs vxrestore: ERROR: V-3-20068: cannot open /dev/tty: No such device or address
and next volume restore doesnot start
I have tried couple of times and it gave the same error for different volumes each time and it stucks randomly
You'll need to consider using a temporary dump file to read inputs for vxrestore, rather than using the STDIN -if you must use a non-interactive script.
In you command you use '-' (after the -f argument) which implies reading from stdin.
There are situations where vxrestore expects user input and this method of using stdin might not work everytime inside scripts. Theres an old technote that has more details on using the workaround but the advised steps are still valid:
yes,you got it right. In addition use the '-e ignore' switch with vxrestore to ignore any extent attribute warning messages. Incase every extent attribute is to be preserved, use the commands interactively per restore, -outside of the script.