NBU的备份和恢复图形篇.docx
《NBU的备份和恢复图形篇.docx》由会员分享,可在线阅读,更多相关《NBU的备份和恢复图形篇.docx(25页珍藏版)》请在冰豆网上搜索。
NBU的备份和恢复图形篇
Veritas常用命令-原创
Veritas常用命令:
1.查看当有运行的任务
bpdbjobs–report|grepActive
2.停止任务
bpdbjobs–cancelPID(包括主任务和子任务)
3.开始任务
bpbackup–i–ptask_name(如bss_archive_backup)
4.查看所有在用的驱动器和磁带
vmoprcmd–hmedia_server_hostname
5.查看pool所含的磁带(包括freeze)
bpmedialist
6.Freeze磁带
bpmedia–freeze–mmedia_id–hmedia_server_hostname
bpmedia-hhostname|grepFROZEN
7.查看error解释
bperror–Smedia_id
8.查看在驱动器的磁带
robtest1
sd
查看slot中的磁带
robtest1
ss
将带子从驱动器的移走
md驱动器号s槽号
9.查找某一盘磁带
在MASTER上vmquery–mmedia_id
10.测试IBM磁带库
lsdev–Cctape
tapeutil
1
/dev/rmt1
11.查看某个时间段的备份情况
bpimagelist–U–d08/20/200400:
00:
00–e08/21/200400:
00:
00
12.查看备份策略
bpplist
13.通过bpps–a确认veritas进程(SANMedia)已停止
netstat|grepbpcd查看bpcd监听进程(client)
驱动器或重启驱动器
vmoprcmd–upno.
vmoprcmd–resetno.
15.将带子从pool中移走
bpexpdate–mmedia_id–d0–hosthostname
NetbackupTips
Glossary
Term
Definition
CLI
CommandLineInterface
GUI
GraphicalUserInterface
MediaServer
MasterServer
StartingandStoppingNetbackup
StoppingNetbackup
∙/usr/openv/netbackup/bin/K77netbackup -->gracefulshutdown
∙/usr/openv/netbackup/bin/bpps-a -->checkforanyremainingprocesses
∙/usr/openv/netbackup/bin/goodies/ ---> killsallremainingnetbackupprocesses,notnecessarilygraceful
∙/usr/openv/netbackup/bin/bpps-a -->checkforanyremainingprocesses
∙kill-9 foranyremaining. NOTE:
unkillableprocessesmayrequireareboot
StartingNetbackup
∙/usr/openv/netbackup/bin/S77netbackup -->after,torestart
CommonTasks
StartingtheAdministrationGUI
∙javafromthewindowsclient
∙x-windowsfromtheserver-/usr/openv/netbackup/bin/xnb&
CheckingBackupStatus
∙ActivityMonitoror
∙/usr/openv/netbackup/bin/admincmd/bpdbjobs-report
Cleaningatapemanually
∙Identifythedrivenametobecleaned
otpclean-L
∙Manuallycleanthedrive:
otpclean-C
Determiningwhattapeswereusedforabackup
∙GUI
oBackupandRestore-->Findthefilesystem-->PreviewMediaButton
∙CLI
oFindthecorrectbackupimages
▪bpimagelist-U-client-d-e
oFindthemediausedforthoseimages
▪bpimagelist-U-client-d-e-media
∙Listingthefilesinabackup
∙
∙Findthetape(s)used(aboveprocedureusingbpimagelist)
∙cd/usr/openv/netbackup/db/jobs/done
∙Runthefollowingscriptandredirectit'soutputtoatextfile:
∙ forfilein`grepMOUNTING*|grep|awk'{print$1}'|sed's/:
MOUNTING|awk'{print$10}' -->thisprintsoutthefilesinthebackup
ForNBU>
∙bpflist --help -->undocumentednetbackupcommandtolistfilesfromabinary.ffile
InventorytheRobot
∙InventoryRobot --> /opt/openv/volmgr/bin/vmcheckxxx-rtrobot_type-rnrobot_number-list (whererobot_typeistld,acs,...)
∙InventoryRobotandUpdateConfiguration--> /opt/openv/volmgr/bin/vmupdate-rtrobot_type-rnrobot_number-list (whererobot_typeistld,acs,...)
ListingPropertiesoftheVolumePools
∙vmpool-listall
ScratchTapes
∙Countscratchtapes:
/usr/openv/volmgr/bin/vmquery-pnScratch|grep-c"robotslot"
∙Movingtapestothescratchpool
oIfNeeded-Expirethetape
▪bpexpdate-ev-d0-force-host
oMovethetape
▪vmchange-p2-m
CheckingDriveUsage
∙/usr/openv/volmgr/bin/vmoprcmd
Takingadrivedownorup
∙/usr/openv/volmgr/vmoprcmd-down
∙/usr/openv/volmgr/vmoprcmd-up
PerformingaRestore
∙FromtheGUI
ouserbackup&restore-->configuration-->client
ouserbackup&restore-->configuration-->clienttorestore
odirectorytosearch
odirectorydepth
odaterange
ofile-->browsebackupsforrestore
AddingNewTapestotheLibrary
∙UsingtheGUI
oMediaManagement-->Actions-->New-->SingleVolume.. -->
oMediaType(ieDLT)
oRobotType(ieTLD)
oMediaID(fromInventory)
oSlotNumber(fromInventory)
oRobotNumber(ie0)
oVolumeGroup
oVolumePool(ieScratch)
∙UsingtheCLI
ovmadd-m-mt-verbose-rt-b-rn-rc1-p-mm
▪vmpool-listall -->listsallpools,bothnameandnumber
oForexample:
vmadd-m000151-mtdlt-verbose-rttld-b000151-rn0-rc18-p2-mm0
Re-usingTapesfromothersystemsorolderNetbackups
∙Expirethemedia
obpexpdate-evMEDIA_ID-d0-force-hostHOST
∙Deassignthemedia
ovmquery-deassignbyidMEDIA_ID40
∙Movetothescratchpool
ovmchange-mMEDIA_ID-pPOOL#
∙Relabelthemedia
obplabel-evCIM572-ddlt-pScratch
Changingtheattributesofmedia
∙Changingthebarcode
ovmchange-barcodeCYM100D-mCYM100
∙ChangingtheVolumePool
ovmchange-mMEDIA_ID-pPOOL#
Toexpiremedia
∙bpexpdate-ev-d0-force-host
Tounfreezemedia
∙Listthefrozenmedia
o/usr/openv/netbackup/bin/goodies/available_media|grep-iFROZEN
∙Unfreezethemedia
obpmedia-unfreeze-ev-h
Torelabelatape
∙bplabel-ev-d-p
∙bplabel-ev000687-ddlt-pTriVrgt_OFFSITE
ToremovemediafromtheNetbackupdatabase
∙Verifythattherearenoimagesonthetape
obpimmedia-mediaid000687-L
∙Expirethetape
obpexpdate-ev000687-d0-hostscorpius-force
∙Getthestatusandpoolnumberofthetape
ovmquery-m000687
∙Deassignthetape
ovmquery-deassignbyid
ovmquery-deassignbyid00068740x0
∙Deletethetape
ovmdelete-m000687
InstallingtheNetbackupClient
∙/update_clients-ForceInstall-ClientList/tmp/
orequiresthatTMPDIRandTEMPDIRbesetcorrectly
Excludngfilesfrombackuponaclient
∙Create/usr/openv/netbackup/exclude_list
∙Putthefilespecificationsofthefiles/directoriestobeexcluded
o/mnt/directory/*
DisplayingInformationaboutaTape
∙vmquery-m -->Displaysattributesaboutaparticulartape
∙bpmedialist-U-mcontents-ev000687 -->Displaysmediacontents
∙bpmedialist-U-mlist -->Listofallmedia
∙bpmedialist-U-mlist-evCYM966 -->Listingofaparticularmediaid
∙bpimmedia-mediaid000687-L -->Listingofimagesonatape
RobtestCommands
∙Startingrobtest
orobtest
o1 -->toselectTLD0
∙Gettinghelp
o?
∙Lookingatcontentsofthetapedrives
osd
∙Lookingatthecontentsofthelibrary
oss
∙Movingatapefromadrivetoalibraryslot
osd -->toidentifydrivenumberthathastape(ContainsCartridge=yes,Barcode=XXXXXX)
oss -->toidentifyanemptyslotinthetapelibrary(Netbackupwillneedtobere-inventoried)
omd#s# -->fromfromdrive#toslot#
osd -->verifythetapedriveisempty
oss-->verifythelibraryslothasthetape
ConfigurationFiles
/usr/openv/netbackup/
∙configurationfile,setsbackupserverandbackupclients
∙forcestatementmustbecorrect
∙clienttobrowsefrom
∙clienttorestoreto
/usr/openv/volmgr/vmconf
Logfiles
Toutilizelogfiles,createthecorrespondingdirectoryin/usr/openv/netbackup/logs
ServerLogfiledirectories:
∙admin-adminstrativecommands
∙bpbrm-backupandrestoremanager
∙bpcd-clientdaemon
∙bpdbjobs-databasemanagerprogramprocess
∙bpdm-diskmanagerprocess
∙bpjava-msvc-Javaapplicationserverauthenticationservice
∙bpjava-usvc-processthatservicesJavarequests
∙bprd-requestdaemonprocess
∙bpsched-schedulerprocessthatrunsonmasterservers
∙bptm-tape/opticalmediamanagementprocess
∙user-ops-requireddirectoryforusebyJavaprograms
∙xbpadm-Xbasedadministrationutility
∙xbpmon-Xbasedjobmonitorprocess
ClientLogfiledirectories:
∙bp-clientuserinterfaceprocess
∙bparchive-archiveprogram
∙bpbackup-backupprogram
∙bpbkar-programthatgeneratesgoldenimages
∙bpcd-clientdaemon
∙bpjava-msvc-Javaapplicationserverauthenticationservice
∙bpjava-usvc-processthatservicesJavarequests
∙bplist-programthatlistsbackedupandarchivedfiles
∙bpmount-programthatdetermineslocalmountpoints andwildcardexpansionformultiplestreams
∙bphdb-Oracledatabasebackupprogramstartprocess
∙db_log-databasespecificextensionlog
∙tar-tarprocesslogduringrestores
∙user_ops
MediaManagerloggingautomaticallygoestothesystemlogusingsyslogdloggingfacility
.Loggingwillonlyoccurifthesedirectoriesarecreated. Thesedirectorieswillgeneratealotofdataandshouldbedeletedwhennolongernecessary.
ToincreasetheamountoflogginginformationsetVERBOSE=2in/usr/open/netbackup/ (defaultisVERBOSE=1)
Processes
ltid
acsd
vmd
UsefulCommands
bpcllist-listclasses
bpclinfo-L -->displaysinfoaboutaclass
vmpool-volumepools
vmpool-listall
vmpool-listscratch
bplabel-ev-dhcart
bpbackupdb -->backsupthecatalog
bpclclients -->liststheclientsforaparticularpolicy(class)
Troubleshooting
bperror-statuscode <--displaysinformationaboutthe netbackuperror.
NoBackupsarerunning:
∙Checksystemlogfileforerrormessages
∙Stopandrestartallthenetbackupprocesses
∙Lookforadowneddrive
o/usr/openv/volmgr/bin/vmoprcmd
o/usr/openv/volmgr/bin/vmoprcmd-up0 -->thiswillbringupdrive0ifit'scontrolshowsasdown
∙Lookforpendingrequests
o/usr/openv/volmgr/bin/vmoprcmdorgui-->devicemanagement
oIfthereisapendingrequesteitherre-assignittoadrive,ordenytherequest
Downeddrivedoesnotcomebackupordoesnotstayup
∙Checkforaha