Script to automate restore data and root mirror in Solaris 10

Hi Folks, I have taken a backup of root filesystem with tar. Please help me to write a ksh script to automate restoration and root mirror in solaris 10.
Thanks in advance.

First question is, what do you mean by "restore"? You can restore a single file, restore multiple files, or restore the whole filesystem as in disaster recovery (DR).

In the latter case, if the filesystem is root and the system is down then you can't run any scripts - you have no system. In that case there's no alternative to experience and you'll need to boot from some other device (usually CD/DVD) and then enter commands manually. In the case of DR, a tar backup is usually not sufficient; you need something like ufsdump. What type of filesystem is it? ufs or zfs?

I think you need to provide much more detail of your configuration and what automation you are trying to achieve. Yes, you can easily script the restoration of a single file from the tar achive if that's what you are asking.

Also, how is the mirror made? Software (meta) or hardware (raidctl)?

1 Like