I am executing below command through script to restore volumes
ssh -p 22 email@example.com 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 firstname.lastname@example.org:/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:
However if it lookinfor input like 'y' from user , it should be the case in each volume restore.
How come it restores few volumes in non-interactive mode and then it fail for one
only for some restores the user input might be prompted & not for others ..like only for specific FS, vxrestore might want to correct/reset the permissions/mode etc and seek user confirmation
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.