07-30-2014
2,327,
710
Join Date: Feb 2012
Last Activity: 3 May 2020, 3:12 AM EDT
Location: Devon, UK
Posts: 2,327
Thanks Given: 442
Thanked 710 Times in 578 Posts
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)?
Last edited by hicksd8; 07-30-2014 at 07:22 AM..