Sponsored Content
Operating Systems Solaris Need help in creating script for disk mirror and backup Post 302981438 by praveensharma21 on Tuesday 13th of September 2016 05:25:04 AM
Old 09-13-2016
Need help in creating script for disk mirror and backup

Hi,

I am very new to scripting. I need to create a script which does following.

Scenario:
  1. First get the format command output echo | format
  2. Insert the new disk to Solaris Server
  3. Get Zpool status
  4. format the new disk
    ( Here I need to select the new disk which have been inserted, I do not know how to do it)
  5. Specify disk number (Based on disk in step4)
  6. Label the disk
  7. partition output
  8. print
  9. modify
  10. Chose base(enter number)[0]?1
  11. Free Hog partition[6]?0
  12. Enter table name (remember quotes):" "
    Label of the disk in step 4
  13. Ready to label disk. continue ? y
  14. quit format command
  15. Execution of mirror
  16. zpool attach rpool "Disk from Zpool status" New disk at step 4)
  17. Wait for resilvering
  18. Output reslivering is finished
  19. Create installboot


Please any advise and help is appreciated.
I am running on Sparc Solaris 10 x64 T4-1

Thanks,
Praveen

Last edited by rbatte1; 09-13-2016 at 08:11 AM.. Reason: Converted text list to formatted number list and removed HTML tags
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Creating a Mirror RAID With Existing Disk

Hi there, I'm not sure if this is possible, but here is what I'd like to do.. I have an existing 160GB drive in my Redhat 9.0 server that I would like to add an additional 160GB drive to and create a mirrored RAID of the first disk to the new disk. I would like to do this without having to... (2 Replies)
Discussion started by: sysera
2 Replies

2. Solaris

creating log files for a backup script on solaris

I have a simple backup script that I am running to back up drives across the network. However I need to have detailed log files for this script such as time backup started, what was backed up, if there were any errors and the time that the backup was complete. I would also like the script to... (3 Replies)
Discussion started by: valicon
3 Replies

3. HP-UX

HP UX Disk Mirror

Being somewhat extremely new to Unix, I have just had a system crash One of my Volume Groups has crashed However, this Volume Group is actually mirrored How do I switch to use the mirrored copy? Any assistance greatly appreciated Thanks (1 Reply)
Discussion started by: cobdeng
1 Replies

4. Solaris

zfs mirror disk

Is it possible to create a Mirror with zfs ?? I'm experimented user with Solstice Disk suite. Or Sun Volume manager or veritas volume manager. But, i would like switch from Disksuite to Zfs. All my mirrored disks. (1 Reply)
Discussion started by: simquest
1 Replies

5. Solaris

Lost Mirror, have backup

I need some help. I can not seem to recover my server. I have a mirrored array of my root disk, c0d0. I was playing with ZFS and I lost the array some how. I have a backup of the full disk taken with TAR. Whenever I try and restore to disk from single user booting with CD I get write... (5 Replies)
Discussion started by: mrlayance
5 Replies

6. AIX

Creating Mirror

Good afternoon all, I'm sorry if this is a total n00b question but if you create a mirrored disk (rootvg (approx. 30 GB) - AIX 6.1 on a P520), will there be any impact to the production system as it's syncronizing? The boss thinks there will be too much impact to do this during working hours. ... (4 Replies)
Discussion started by: Spellbound
4 Replies

7. Shell Programming and Scripting

Need help in creating file restoration script from a backup script.

Hi all i am struggling in creating a restore of env files while doing applications clone. the first file i created for copying the important configurations file which is running perfect now for reverting the changes i mean when i am restoring these files to its original places i have to do... (7 Replies)
Discussion started by: javeedkaleem
7 Replies

8. Solaris

Solaris patching using mirror disk backup? need help!

hi friends, need help.. it is my first time patching using mirror disk backup approach, not so sure about the steps :confused: how do you detach, patch it, boot it and reattach it ? any kind soul here can advise ? thanks in advance..:) below is the information from my machine: Filesystem ... (3 Replies)
Discussion started by: Exposure
3 Replies

9. AIX

Clone or mirror your AIX OS larger disk to smaller disk ?

hello folks, I have a 300GB ROOTVG volume groups with one filesystem /backup having 200GB allocated space Now, I cannot alt disk clone or mirrorvg this hdisk with another smaller disk. The disk size has to be 300GB; I tried alt disk clone and mirrorvg , it doesn't work. you cannot copy LVs as... (9 Replies)
Discussion started by: filosophizer
9 Replies

10. HP-UX

What is the difference between DRD and Root Mirror Disk using LVM mirror ?

what is the difference between DRD and Root Mirror Disk using LVM mirror ? (3 Replies)
Discussion started by: maxim42
3 Replies
BAK2DB(8)						      System Manager's Manual							 BAK2DB(8)

NAME
bak2db - Directory Server script for restoring a backup SYNOPSIS
bak2db archivedir [-Z serverID] [-n backendname] [-q] | [-h] DESCRIPTION
Restores the database from a archived backup. The Directory Server must be stopped prior to running this script. OPTIONS
A summary of options is included below: archivedir The directory of the archived database. -Z Server Identifier The server ID of the Directory Server instance. If there is only one instance on the system, this option can be skipped. -n Backend Name The name of the LDBM database to restore. Example: userRoot -q Quiet mode. Reduces output of task. -h Display the usage. EXAMPLE
bak2db /LDAP/backups/20130305/ -Z instance1 -n userRoot bak2db /LDAP/backups/20130305/ -n example DIAGNOSTICS
Exit status is zero if no errors occur. Errors result in a non-zero exit status and a diagnostic message being written to standard error. AUTHOR
bak2db was written by the 389 Project. REPORTING BUGS
Report bugs to http://bugzilla.redhat.com. COPYRIGHT
Copyright (C) 2013 Red Hat, Inc. Mar 5, 2013 BAK2DB(8)
All times are GMT -4. The time now is 02:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy