Use theRestoreDatafrom aBackupoptiontorestoreoneormorevolume groups, filesystems,logicalvolumes,directories,orregularfilesfromanytype of backupcreatedwith SysBack.
Torestorefroma backup:
1. From theBackup&RecoveryOptions menu,selectRestoreData froma Backup.
Note: Fromthe commandline,type smitsb_restore.
2. On theDevice Selectorscreen,highlightthedeviceyouwanttouseand press Enter.
3. Ifyouselectedatapedriveorvirtualdevice,enterthebackupsequence number.Thedefaultvalue is“1,”indicatingthatyouwanttorestoredatafrom thefirstbackuponthemedia.Ifyou“stacked”multiple sequentialbackups on themedia,andwanttousetheinformationfroma differentbackup, enterthe backupnumberand pressEnter.
Thebackupmediaisthenread todeterminethebackuptype.
IfyouselectedaTSMvirtual device,selecttheTSMBackupIDfromthelistof backupsonthenextselectorscreen.
4. Selectthetypeofdatatobe restoredfromthelistdisplayed.Thepossible choicesinclude:
v VolumeGroup (allLVsandfilesystems) v Filesystem
v All DirectoriesandFiles v Directory(allfileswithin) v Regular File
Onlytheoptionsthatarevalidforthetype ofbackupyouarerestoringfrom aredisplayed.Highlight thetypeofdatayouwanttorestoreand pressEnter.
5. Ifyouselectedvolumegroup,logicalvolume orfilesystem,selectthedatatobe restoredfromthelistofvolumegroups, logicalvolumes, orfilesystemmount points.Toselectasingle option,highlighttheoptionand pressEnter. Toselect multipleoptions, highlighteachoptionandpressF7.Whenyouhavemadeall selections,pressEntertocontinue.
6. Atthe“Do youwishtolistselectfilestorestore?”prompt,select“yes”fora listofallfiles containedonthebackupmedia.Youcanalsonarrowthelistby usingasearchword orwildcardcharacter. Thesearchwordcanincludethe wildcard(*)character.SysBacksupportstheuseofBRE(BasicRegular
Expression)wildcardstorestorea wildcardmatchoffiles.Thefilenamesand thewildcardmust beenclosedindoublequotationmarks(″)toavoid
expansionbytheuser’sshell.
For example,thesearchword “/home/j*”indicatestorestorealldirectories andfiles thatstartwith“/home/j”suchas/home/johnor/home/jenn.Another exampleisthesearchword“ab*d”,whichwould displaythefollowing
filenames:
/tmp/abcd
/var/spool/abduct /home/data/aboyandhisdog
SMITlimitationspreventa listoffileslongerthan32768linesfrombeing displayed.Therefore,thelist,iflonger, istruncatedtothissize. However,in somecases,SMITcannothandletheexcessivesize andwilldisplayan error.If thisoccurs, simplyrestoretothe“Doyouwishtolistselectfiles torestore?”
promptandselect“no”instead.Youmaythen specifyeither afilecontaining thelistoffilestorestore,orexplicitlyenterthefilenamesdesired.
Ifyouwanttodisplaya filethatcontains alistoffilestorestore,select“no”
7. Thefollowingfiguresshowthedefaultoptionsandvaluesthataredisplayed whenyourestoreafilesystemfroma volumegroupBackup, andregularfiles froma filesystembackup:
Restore Data from a Backup
Type or select valuesin entry fields.
Press Enter AFTERmaking all desired changes.
[Entry Fields]
Hostname of server hambone
Disk image file /sysback.images/chukra>
TSM backup ID
Restore data type Filesystem
Report output type both +
Device name forremote volume prompt []
Allow restore ofsystem data? no +
Allow restore ofincremental backup? no +
Recreate VG,LV,or filesystem before restoring? no + Restore non sparsefiles as non sparse (AIX 5.1 on no + ly?)
Destination (ifdifferent) []
Exclude List FileName [] +/
File containinga list of data to be restored []
Data to restore(of above type) [/fixes]
F1=Help F2=Refresh F3=Cancel F4=List
F5=Reset F6=Command F7=Edit F8=Image
F9=Shell F10=Exit Enter=Do
Figure10-4.DefaultValuesWhenRestoringaFilesystemfromaVolumeGroupBackup
Thefollowingisanexplanationofeachfield:
Hostnameofserver
Theserverhostnameifaserveroption wasselectedontheprior device selectorscreen.Youcannotchangethisfield.
Device name
Thedevice,ifa tapedriveorvirtual devicewasselected.Youcannot changethisfieldfromthis screen.
Diskimagefile
Thenameofthediskimagefilepreviouslyselected.Thisfieldis displayedonlyifa diskimagefilenamewasselected.Youcannot changethisfieldfromthis screen.
TSMBackupID
Thisoptionwillonlybedisplayed whentheDevice orfilename isa TSMvirtual device.Thevalue forthisfieldispropagatedfroma previousinputscreenandmaynotbechanged.
Restoredatatype
Thetypeof datatoberestored.Thisfieldisforinformationonlyand cannotbechanged.
ReportOutputtype
Default=progressindicator.Keep thedefaultvalue ifyouwantto displayaprogressindicatorduringthebackupprocess,whichindicates theapproximatetotalbackuptimeandamount completed.PressTabto select“filelist”todisplaya listoffilesastheyarebeingbackedup,or Taboncemoretoshow“onlyerrors”thatoccurduring thebackup.
Restore Data from a Backup
Type or select valuesin entry fields.
Press Enter AFTER makingall desired changes.
[Entry Fields]
Hostname of server hambone
Disk image file /sysback.images/chukra>
TSM backup ID
Restore data type Filesystem
Report output type both +
Device name for remotevolume prompt []
Allow restore of systemdata? no +
Allow restore of incrementalbackup? no +
Recreate VG,LV, orfilesystem before restoring? no + Restore non sparsefiles as non sparse (AIX 5.1 on no + ly?)
Destination (if different) []
Exclude List File Name [] +/
File containing a listof data to be restored []
Data to restore (ofabove type) [/fixes]
F1=Help F2=Refresh F3=Cancel F4=List
F5=Reset F6=Command F7=Edit F8=Image
F9=Shell F10=Exit Enter=Do
Figure10-5.DefaultValuesWhenRestoringaFilefromaFilesystemBackup
Devicename forremotevolumeprompt
Default=(Blank/None).EnteraTTY,LFTorPTSdevicenametosend thevolumeprompttoa specifieddeviceratherthantothecurrent SMITscreen. Ifyouarebacking uptoaremotehost,thedevicename youspecifyisattachedtotheremotehost.Thisfieldisdisplayed only whenthebackupdeviceisa tapedriveorvirtual device.
Examplesof devicenamesare /dev/tty0,/dev/lft0and /dev/pts/5.
Youcandeterminetheterminaldevicenamebytypingttyat the commandlineonthatdevice.
Allow restoreofsystem data?
Ifthisfieldissetto“no”,therestoreprocesscannotrestorecertain directories,logicalvolumes, orfilesystemsthatmight affectthesystem operation.Examplesarethehd4(/filesystem)logicalvolume,the/usr filesystem,orthe/etc/objreposdirectory.PressTabtochangethisfield to“yes”ifyouwanttoallowanysystemdatatoberestored,butbe awarethatthismight causesystemerrorsora completesystemfailure dependingontheinconsistency ofthedatabeingrestored andthe currentsystemconfiguration.
Allow restoreofincremental backup?
Default=no.Changethisfieldto“yes”if youarerestoringentire filesystemsor volumegroupsfroman incrementalbackup.The
restorationofincrementaldatacanhaveadifferenteffectthanrestoring regularbackupdata.Informationonrestoringincremental backupsis detailedin“UnderstandingIncrementalRestores”onpage10-7.
Anerrormessageisdisplayedandtheprocess terminatesifyou attemptto restoredatafromanincrementalbackupwithoutsettingthis fieldto“yes.”
RecreateVG,LV,orfilesystembeforerestoring?
Specifythis optiontoremakevolumegroup,logicalvolume,andfile systemstructuresbeforerestoringthedata.
Note: Ifyouwouldliketoeditanyof theLVMattributesassociated with thevolumegroup,logicalvolume,orfilesystembefore recreatingthem,youmayspecifythe-eflag onthe
/usr/sbin/sysrestorecommand. Thisfunctionalityisonly available fromthecommandlineasthereisnoSMITmenu equivalentfunction toedittheattributes.
Insteadofusingthecommandlinetoachievethisfunctionality, youwouldsimplyrecreatetheLVMstructuresandrestorethe dataasa twostep process.TheRecreateVolumeGroups, LogicalVolumes& Filesystemsmenu allowsyoutoeditthe LVMattributesbefore recreatingthestructures.Pleasereferto section “RecreatingVolumeGroups,LogicalVolumes, and Filesystems” onpage10-2formoreinformation.
Restorenonsparsefilesasnonsparse(AIX 5.1on
Specifythis optionwhentheredataisbeingrestoredtoanAIX5.1 system.Youdonothavetoknowwhichfilesaresparse vs.non-sparse.
Thisoptionusuallyonlyappliestocertaindatabaseusersrestoring databasefiles.Previously,onlytheAIXtarcommandcould restorefiles asnon-sparse.However, inAIX5.1the/usr/sbin/restore commandhas beenmodifiedtohandlethis aswell.
Note: Thisoptiononlyappliestobackupsbeingrestoredtosystems runningAIX5.1orlater.
Destination(ifdifferent)
Default =blank.Ifyouarerestoringdatatoitsoriginallocation,leave thisfieldblank.Toselectanalternate“relative”logicalvolumeor directoryfortherestoreddata,selectone ofthefollowing:
v For afile/directorybackup, enteranewdirectory. Ifthefiletobe restoredfromthemediais/home/tonyandyouwanttorestorethe fileto/tmpdirectory,thefileisrestored“relative”to/tmp,resulting inthefilename/tmp/home/tony.
v For afilesystembackup, enteranewdirectory. Thecontentsofthe entirefilesystemwillmovetothenewdirectory.Thenew filenames willnotberelativetotheprevious filesystemmountpoint.For instance,the/home/tonyfilesystem (containingthefile
/home/tony/file1)canbe movedtothe/testdirectory;theresulting fileis/test/file1(the/home/tonydirectoryprefixisremoved).
v For logicalvolume backups,entera newlogicalvolumename.The dataisrestoredtothenewlogicalvolume.An “endoffile” error occurswhenwritingthedataifthenewlogicalvolumeissmaller thantheoriginal.
Note: Youcannotspecifyanew destinationwhenyouselect multiplelogicalvolumes,volume groups,orfilesystemsto restore.
ExcludeListFileName
Specifythefullyqualifiedpathand filenameoftheexcludelisttobe processedinrestoreservices.Ifyoudo notspecifya pathnamealong withthefilename,thefilenamespecifiedwillbe checkedforin the /usr/lpp/sysbackdirectory.
FileContaininga Listof DatatobeRestored
Specifythefullyqualifiedpathnametoafilethatcontains thelistof filestobe restoredfromthisbackupimage.Usethis optionwhen restoringlargenumbersoffiles.
Note: Thefileliststructure shouldbe suchthatthereisonlyoneentry perlineinthefile.Forexample:
/tmp/myjunk /home/*
/home/my file name that has spaces in it
/home/my file name with special %&* characters in it
ThisistheonlywaythatSysBackcanselectivelyrestorefiles withspacesorcharactersthathavespecialmeaningtotheshell.
Also,wildcardrestoreswillcorrectlyrestorefilesanddirectories thatcontainspacesorspecial charactersinthename.
Forexample:
/myfs/mydirectory/*
Awildcard restorespecificationsuchasthiscould restorefiles anddirectorieslike:
/myfs/mydirectory/ my file name
/myfs/mydirectory/my sub d&rectory/ spec#$@l file
|
|
|
|
/yourfs/*
Awildcard restorespecificationsuchasthiscould restorefiles and directorieslike:
/yourfs/speci@l name/dir/dir /yourfs/dir name/file@ special Data torestore(ofabovetype)
Unlessthebackupisafile/directorybackupandyouselecttorestore allfilesand directories,thisfieldcontains thedatato restoreasselected onthepriorselectionscreen.Thiscanbealistofvolume groups, filesystems,logicalvolumes,directoriesorregularfiles,dependingon thetypeofbackuptoberestored.For afile/directorybackup, leave thisfieldblankif youwanttorestoreallfiles.
Ifyouarespecifyingmultiplefiles ordirectoriestorestore,theymust beinputasa spaceseparatedlist.Ifyouareusingwildcards inyour dataspecifications,theentrymustbe surroundedbydoublequotes(″).
Forexample:
/tmp
"/home/cindy_*"
"/tmp/g.love"
SysBacksupportsthreetypesofBREs(BasicRegularExpressions):
v Zeroormorecharactermatch* v Matchoneormoreina set[]
v Matchonecharacterwithina rangeintheset [x-y]
8. PressEnterwhen allfieldshavebeenenteredcorrectly.Eitheraprogress indicatororlistoffiles,ifselected,isdisplayed asthedataisreadfromthe mediaand selecteddataisrestored.
Chapter 11. Changing the Volume Group, Logical Volume and Filesystem Attributes
Thissectiondescribes theprocess forchangingthevolumegroup,logicalvolume, and filesystemattributespriortocreating (orrecreating)avolume group,logical volume, orfilesystem.The sameinstructionsapplytothefollowingSysBack processes:
1. Installationofasystem fromaSysBacksystem backup
2. Recreationofa volumegroupfroma systemorvolume groupbackup
3. Creationofa logicalvolume orfilesystemfromasystem,volume group,logical volume orfilesystembackup
Youcanrecreateavolume group,logicalvolume,orfilesystem fromwithinthe SMIT menusorusingtheremakevgcommandatthecommandline.
Whenyourecreatea volumegroup,logicalvolume,orfilesystem,theinformation isretrievedfromthebackupmedia andcompared withthecurrentsystem configurationtodetermineifthehardwareresourcesareavailable torecreatethe volume group,logicalvolume orfilesystemasdefinedonthemedia.Ifthe
configurationmatches,youcanchangetheattributes.Iftheconfigurationdoesnot match,messagesindicatethedifferences,andyoumustchangethevolumegroup orlogicalvolume attributestofitthenewsystem.
Whenyouselecttorecreateavolume group,logicalvolume,orfilesystem onan activesystem orwhenyouselecttoChangeVolumeGroup& LogicalVolume Information wheninstallingfroma systembackup, ascreensimilartothe followingisdisplayed:
Notes:
1. TheChange FilesystemAttributesoption isnotdisplayedif youare installing a systemfromapowerbackup.
+---+
| ChangeVolume Group & Logical Volume Information | +---+
Select Physical Volumes for Volume Groups Change Volume Group Attributes SelectPhysical Volumes for Logical Volumes
Change Logical Volume Attributes Change Filesystem Attributes Change Physical Volume Attributes
Advance Install Options
+---+
| Select this optionto change the physical volumes which are assigned to each |
| volume group. |
+---+
| Use ARROW or Tabkeys to move and ENTER to Select. Press ESC for Main Menu. | +---+
Figure11-1.TheChangeVolumeGroup&LogicalVolumeInformationMenu
2. TheSelectPhysicalVolumesforVolumeGroupsandChangeVolume Group Attributesoptionsarenotdisplayedifyouhavechosenonlytorecreate specific logicalvolumesandfilesystemfroma backup.
3. TheAdvanceInstallOptionsmenuisonlydisplayedwhenthis menuis invokedbythesysteminstallationprocess.
PressEsctoreturnto theMainMenuifyouareinstallingasystem ortorecreate volume groups,logicalvolumes,orfilesystems onanactivesystem.
The followingsectionsdescribeeachoption,asshownabove, indetail.