1834453 Members
2062 Online
110067 Solutions
New Discussion

re : cpio help

 
SOLVED
Go to solution
Vincent_5
Super Advisor

re : cpio help

Hi Guys,
Can someone help to modify this backup script for me as this script was done by a previous system administrator who have left my company, because I'm not really good at script, by I need to get cpio to restore the /disk5 to another directory. Please help , thanks in advance

Regards
Vincent
nothing is better than to know more
2 REPLIES 2
Jakes Louw
Trusted Contributor

Re: re : cpio help

If you enter option 6: "Restore from tape (all)", it should prompt you for a destination directory. What happens if you give it a directory name?
Trying is the first step to failure - Homer Simpson
Ninad_1
Honored Contributor
Solution

Re: re : cpio help

Vincent,

Yes as stated above you can use the script you have attached to restore the backup. But a word of caution -
First check the contents of the backup - If the backup was taken using option 1 in your script then only you can restore to any directory other than /disk5 [ because the option 3 uses absolute path name and hence will restore to exact directory location and nowhere else i.e. only to /disk5/DAASSING ]
To check if relative path name was used or not you can use option 8 of your script - if you can see filenames as /disk5/... then its absolute path name and you cant resote to any other directory than /disk5 , but if there is no /disk5/ then you can restore to any directory.
If relative path name is used you can restore using option 6
Run the script
/pathname/backup.sh
Use Option 6
Enter /restoredir when asked to enter the destination directory.
This will restore the backup of /disk5/DAASSING to the /restoredir.

Another word of caution - ensure you are using the correct tape to which backup of /disk5/DAASSING was taken.

Please let us know if this satisfies your purpose or you need anyother help,

Regards,
Ninad