HPUX系统备份及恢复策略课件.ppt

上传人:小飞机 文档编号:1285172 上传时间:2022-11-04 格式:PPT 页数:68 大小:332.36KB
返回 下载 相关 举报
HPUX系统备份及恢复策略课件.ppt_第1页
第1页 / 共68页
HPUX系统备份及恢复策略课件.ppt_第2页
第2页 / 共68页
HPUX系统备份及恢复策略课件.ppt_第3页
第3页 / 共68页
HPUX系统备份及恢复策略课件.ppt_第4页
第4页 / 共68页
HPUX系统备份及恢复策略课件.ppt_第5页
第5页 / 共68页
点击查看更多>>
资源描述

《HPUX系统备份及恢复策略课件.ppt》由会员分享,可在线阅读,更多相关《HPUX系统备份及恢复策略课件.ppt(68页珍藏版)》请在三一办公上搜索。

1、HP-UX系统备份及恢复策略,HP-UX系统备份及恢复策略,用户利益,最大程度减小数据恢复给业务带来的影响; 使您的备份与恢复策略更为有效; 减少您听到“我们恢复不了您的数据”的机会; 提供改进您的备份与恢复流程的建议; 图形表达备份与恢复流程;,用户利益 最大程度减小数据恢复给业务带来的影响;,备份数据策略,恢复数据策略,灾难恢复流程,故障报警,备份系统高可用性,数据库联机备份,备份管理,制定完善的备份管理流程,备份数据策略恢复数据策略灾难恢复流程故障报警备份系统高可用性,数据备份的忠告,选用适当的备份设备和备份软件尽可能使用多于一个的物理设备经常有规律的作备份至少保存两份最新的备份定义备份

2、进度:方式、频率、时序和保管备份权限的设定备份步骤信息的记录定时清洁和维护设备数据恢复和故障预演,数据备份的忠告选用适当的备份设备和备份软件,映像备份备份整个磁盘作为一个映像限制:恢复时要求作为一个映像,不可依据文件类型限制卷的大小适合灾难恢复基于文件的备份逐个文件的备份支持各种备份方式全备分增量备份差分备份备份和恢复的灵活性更慢,独立于文件存取的速度,数据备份的类型,映像备份数据备份的类型,level0全备份Full backup,level2差分备份Differential backup,level1增量备份Incremental backup,备份方式,level0level2level

3、1备份方式,恢复过程,仅需一盘磁盘,tape 1 + x tape,tape 1 + (x-1) tapes,level0全备份Full backup,level2差分备份Differential backup,level1增量备份Incremental backup,恢复过程仅需一盘磁盘tape 1 + x tapetape,Backup and Recovery Procedures,Backup and Recovery Procedures,Step 1 拜访用户对备份技术进行讲解,主要介绍备份与恢复的重要性和必要性,以及备份与恢复的内容,方法和策略。,Backup and Recov

4、ery Procedures 1,Step 1 拜访用户Backup and Recov,Objectives of Backup/RecoveryScope of Backup/RecoveryType of Backup SolutionSystem Backup/Recovery UtilitiesSystem Recovery ToolsTypical System Backup SolutionBackup Window,Backup and Recovery on HP-UX System,Objectives of Backup/RecoveryB,Why Backup?,Har

5、dware(Disk) Failure Database / Application Corruption Administrator Error User Error Site Disaster,“There are twotype of computer users, those that have lost data and those that will”,Why Backup? Hardware(Disk) Fai,What should be backed up?,Operating System files and configuration Disk layout inform

6、ation User profiles and home directories Application and database binaries and files The data from the application,The data includes:,What should be backed up? Oper,Type of Backup Solution,OS / Database Backup Incremental / Full Backup Online / Offline Backup Local / Network Backup,Type of Backup So

7、lution OS / D,System Backup/Recovery Utilities,Standard UNIX Utilitiestar, cpio , dump/restore , vxdump/vxrestore , dd , mtHP-UX Utilites (HP_UX only)fbackup / frecoverSAM UtilitiesCOPYUTILmake_recovery,System Backup/Recovery Utiliti,backup utilities introduce,fbackupRecommended system backup utilit

8、y. For each file transferred, the files contents and all relevant information necessary to restore it to an equivalent state are copied to output device, which can be raw magnetic tape drive, the standard output, DDS-format tape, rewritable magneto-optical disk or a file.frecoverReads media written

9、by fbackup, and copies specified files from this media to specified location.fbackup and frecover are proprietary utilities usable only on HP-UX systems.SAM uses fbackup and frecover as its backup programs.tarSaves and restores files on magnetic tape, flexible disk, or regular file.cpioSaves and res

10、tores archives of files on magnetic tape, other devices, or a regular file, and copies files from one directory to another while replicating the directory tree structure.ddAll-purpose utility that copies to/from raw devices. Data conversion is possible. It is often used to save or restore informatio

11、n disk-to-disk. Copies specified input file to specified output; usually, both input and output files are device files.,backup utilities introducefbac,tar - tape archive,Backup a directory:#cd /data#tar cvf /dev/rmt/0m . Restore all files from a tape:#cd /datatar xvf /dev/rmt/0mRestore one file from

12、 a tape:#cd /data#tar xvf /dev/rmt/0m ./file1.txtCreate a index of the file list on the tape:#tar tvf /dev/rmt/0m /tmp/index.txt,/data,/data,tar - tape archiveBackup a d,tar syntax,$ tar key arg. file | -C directoryKeys:cxvfmutrwhCommon keys:c Create archive.x Extract archive.t List names of all fil

13、es in archive.r Append file(s) to end of existing archive.If -C directory is specified, tar will change to directory and continue save or restore.,tar syntax$ tar key arg. ,对系统全备份#tarcvf/dev/rmt/0m/ 备份某目录#tarcvf/dev/rmt/0m/tmp改变文件的备份路径#tarcvf/dev/rmt/0m-C/tmp.Note:路径/tmp在磁带上的备份路径变为./#cd/tmp#tarcvf/d

14、ev/rmt/0m./*恢复数据#tarxvf/dev/rmt/0m(磁带上所有数据)#tarxvf/dev/rmt/0m/tmp(恢复目录/tmp)查看磁带上的数据#tartvf/dev/rmt/0m,tar命令应用,对系统全备份tar命令应用,dd example,To copy an entire disk drive to another identically-sized device:# dd if=/dev/rdsk/c0t1d0 of=/dev/rdsk/c3t3d0 bs=4096,dd exampleTo copy an entire di,dd syntax,# dd i

15、f=input_file of=output_file bs=block_sizeWarning:Data will be destroyed on the output file location.Ensure that the correct output file is designated to prevent unintentional data destruction.,dd syntax# dd if=input_file o,cpio example,To use with the find command to backup all files and sub-directo

16、ries of the /home directory:$ find /home -print | cpio -ocB /dev/rmt/0mTo print a listing of files stored on a backup created by cpio:$ cpio -itBv /dev/rmt/0m,cpio exampleTo use with the fi,cpio syntax,$ cpio -o -e extarg achvxABC$ cpio -i bodfmrstuvxBPRSU6 pattern$ cpio -p -e extarg adlmruvxU direc

17、toryCommon options:o Copy out (export) specified files to archivei Copy in (import) specified files from archivep Duplicate directory tree (passthrough)c Write or read header information in ASCII character format for portabilityd Create directories as neededt Print table of contents only.B Block inp

18、ut/output at 5120 bytes to record.Use only with data directed to or from devices that support variable-length records.v Print file characteristics (numeric-mode, owner, blocks, date, filename)pattern Only files that match pattern are saved/restoreddirectory Destination directory tree,cpio syntax$ cp

19、io -o -e extar,fbackup/frecover,Backup a directory:#fbackup -f /dev/rmt/0m -i /dataRestore all files from a tape:#frecover -orf /dev/rmt/0mRestore one file from a tape:#frecover -oxf /dev/rmt/0m -i /data/file1.txtCreate a index of the file list on the tape:#frecover -f /dev/rmt/0m -I /tmp/index.txt,

20、/data,/data,fbackup/frecoverBackup a direc,fbackup syntax,# fbackup -f devicefile -0-9 optionsWhere:-f devicefile Identifies backup device-0-9 Backup level (0=full backup; 1-9 indicates incremental)Common options:-i filename Informs fbackup to include file filename.-e filename Informs fbackup to exc

21、lude file filename.-I filename Creates an index in filename.-g filename The filename specifies an ASCII file which contains file trees to include or exclude.,fbackup syntax# fbackup -f dev,fbackup命令应用一,1进入单用户#shutdown-y0 #/etc/mount-a2系统全备份#fbackupf/dev/rmt/0m-0iv/-I/tmp/sysbk.index -f:设备文件名(suchasD

22、DStapedriver) -i:要包含的目录 -e:不包含的目录 -I:备份内容检索目录 -v:备份内容详细列表 -0:零级备份 #fbackupf/dev/rmt/0m-i/-e/home 备份除了目录/home的所有目录3说明1)该命令方式对系统当前”mounted“的文件系统进行备份 2)备份级别说明 备份级别有09个级别,如果当前系统采用零级备份,当下一次采用5级 备份时,系统仅将会对有变化的文件进行备份,fbackup命令应用一1进入单用户,1#mkdir-p/tmp/fbackupfiles/index #mkdir-p/tmp/fbackupfiles/log 2#touch/

23、tmp/fbackupfiles/index/full.date+%y%m%d.%H:%M 3进入单用户 #shutdowny0 #/etc/mount-a 4对系统进行全备份 #fbackup0vi/-f/dev/rmt/0m -I/tmp/fbackupfiles/index/full.date+%y%m%d.%H:%M 2/tmp/fbackupfiles/log/full.date+%y%m%d.%H:%M 5说明 通过该方式可以知到系统备份需要的时间,fbackup命令应用二,1#mkdir-p/tmp/fbackupfile,fbackup命令应用三,1进入单用户 #shutdow

24、ny0 #/etc/mount-a 2对系统进行全备份 #fbackup0uv/-f/dev/rmt/0m -g/tmp/fbackupfiles/mygraph -I/tmp/fbackupfiles/index/full.date+%y%m%d.%H:%M 2/tmp/fbackupfiles/log/full.date+%y%m%d.%H:%M 3说明 a.文件mygraph:包含需要备份的目录,格式如下: i/users/data i/home/app e/oracle/sql b.参数u: 当备份系统成功时,系统将更新/var/adm/fbackupfiles/dates.,fbac

25、kup命令应用三1进入单用户,fbackup命令应用四,备份远程系统 1登录在本地系统时 #remshbackup_sysname”fbackupfDDS_sysname:/dev/rmt/0m-0vi/” 2登录在远程系统时 #fbackupfbackup_sysname:/dev/rmt/0m0vi/,fbackup命令应用四备份远程系统 1登录在本,fbackup命令应用五,压缩方式备份(不建议使用、影响系统性能) 1压缩方式备份 #fbackup0vi/dir-f-|compress|ddof=/dev/rmt/0mobs=10k “”:指向标准输出 2查看备份内容 #ddif=/de

26、v/rmt/0mibs=10k|uncompress|frecoverI-f-,fbackup命令应用五压缩方式备份(不建议使用、影响系统,frecover syntax,# frecover -r -hmosvyAFNOX -f device -c config -S skip -E extarg# frecover -x -hmosvyAFNOX -f device -c config -S skip -E extarg -e path -i path -g graph# frecover -I path vy -f device -c config# frecover -V path v

27、y -f device -c configCommon options:-r Recover all files on backup tape.-x Files identified by -i (include), -e (exclude) or g (graph file) are extracted/not extracted.-V path Write volume header to path.-o Recover files regardless of age.-X Recover files relative to current working directory.,freco

28、ver syntax# frecover -r ,恢复磁带机上所有内容:1进入单用户: #shutdown-y0 #/etc/mount-a 2恢复数据 #frecoverrf/dev/rmt/0m 恢复磁带上的所有数据 -f:设备文件名 -r:恢复磁带上的所有数据 -I:将磁带上文件索引存到指定的文件中 #frecoverI/tmp/index.txt-f/dev/rmt/0m,frecover命令应用一,恢复磁带机上所有内容:frecover命令应用一,frecover命令应用二,恢复某一目录:#frecover-xi/directory #frecoverx-i/dir1-i/dir2

29、#frecover-xoi/dir -o:覆盖/dir下已有的、相同名称的文件#frecover-xvXi/dir -X:按磁带上目录恢复数据 #cd/tmp/local;frecoverxvYi/dir -Y:按磁带上文件名恢复数据 例如: #cd/tmp/local #frecoverxvF-i/home/filename 恢复结果/tmp/local/filename不是/home/filename,frecover命令应用二恢复某一目录:,frecover命令应用三,从远程磁带机上恢复数据到本地: #frecoverxi/dirfremote_name:/dev/rmt/0m,frec

30、over命令应用三从远程磁带机上恢复数据到本地:,frecover命令应用四,从本地磁带机上恢复数据到远地系统: #remshremote_name”frecoverxi/dir-flocal_name: /dev/rmt/0m”,frecover命令应用四从本地磁带机上恢复数据到远地系统:,Internal of fbackup,/data, record record record record record record ,.,fbackuprdr,fbackuprdr,fbackuprdr,fbackupwtr,fbackup,In-MemoryArea,Internal of fba

31、ckup/data reco,SAM- Backup and Recovery,Automated Backupsproduces log and index filesE-Mail results to specified userInteractive Backup and Restoreincremental file system backup and restore,SAM- Backup and RecoveryAutom,1. Run SAM.2. Select SAM area Backup and Recovery.3. Select area Automated Backu

32、ps.4. Select menu option Actions.Add an Automated Backup.5. Choose whether it is a local or remote backup.The “Add an Automated Backup” window or screen displays.6. Choose Select Backup Scope.The “Select Backup Scope” window or screen displays.7. Specify which are included files (files to backup) an

33、d which are excluded files (optionalwhich files not to backup). Select Backup Scope of:o Specified Files, which must be typed in by file or directory name explicitly.o Local File Systems Only (No NFS)o All File Systems (Includes NFS), which includes all file systems recognized by the system, no matt

34、er what type.8. Choose Specify Backup Device from options.9. Select the backup device from list. It may be necessary to indicate tape device options, also.,setup automated backup using SAM,1. Run SAM.setup automated bac,10. Choose Select Backup Time from options. The “Select Backup Time” window or s

35、creen displays, as in this example:o Enter the time and day(s) for the full and incremental (if enabled) backups to be performed.o The time must be entered in HH:MM format. Therefore, 2:00 is unacceptable, but 02:00 is acceptable.o Note that day is entered by either day of week or day of month (whic

36、h lists the numbers 1 - 31 for selection). You can select more than one day for the backup to be performed.11. Optionally, select Set Additional Parameters.Specify email address of user to notify of backups, for example.12. When the “Add an Automated Backup” window or screen next displays, select OK

37、, and the “Backup and Recovery” window or screen displays. It lists all configured automatic backups for the system, for viewing and verification, as necessary.,setup automated backup using SAM,10. Choose Select Backup Time,SAM备份方法,1)备份数据 #sam -Select“BackupandRecovery“ -Select“InteractiveBackupandR

38、ecovery“ -Select“BackupDevice“ -Select“BackupFilesInteractively“(FromActionmenus) -SelectBackupScope -SelectLocalFileSystemsOnly(noNFS) -Select“OK“ 2)检查备份的数据 1检查文件/var/sam/log/br_log - Fullbackupstartedonhost1:Wedoct1615:10:09EAT1998 (ScheduledBackup) fbackup0uvg/etc/sam/br/graphDCAa04366I/var/sam/l

39、og/br_indext.full-c/etc/sam/br/fbackup_configd/var/adm/fbackupfiles/datesf/dev/rmt/c1td0d0 BEST2&1 Fullbackupcompletedonhost1:WedOct1616:44:01EAT1998 Exitcode=0 - Notes:ifExitcode=2,thereisproblemonbackupprocedure. 2查看磁带上有那些文件 #frecoverrNsvf/dev/rmt/0m,SAM备份方法1)备份数据 #sam -,backup disk using COPYUTIL

40、,1. Boot to ISL.2. Run the Copy Utility.ISL ode copyutilODE copyright message and COPYUTIL copyright message display.It then scans the device busses and displays information about thestorage devices it has detected on the system.Example:Ty Indx Path Product ID Bus Size Rev- - - - - - -D 0 2/0/1.0.0

41、QUANTUMLPS270S disc drive SCSI 258 MB 5909D 1 2/0/1.1.0 SEAGATEST3600N disc drive SCSI 499 MB 9686D 2 2/0/1.3.0 HPC2244 disc drive SCSI 1.0 GB 0B04T 3 2/0/1.5.0 HPC1504X/HPC1521B DDS tape SCSI N/A 1009D 4 2/0/1.6.0 QUANTUMLPS270S disc drive SCSI 258 MB 59093. Run backup.COPYUTIL backup4. Specify the

42、 disk index number from which the backup will come, and then the tape index number to which the backup will go.Example:To copy data off the last Quantum disk drive (disk index 4) onto the DDS tape drive (tape index 3).Enter the Disk Index (q/?): 4Enter the Tape Index (q/?): 35. Follow instructions t

43、o load the tape into the tape drive, if not already done, and enter “y” to continue. The backup begins to the tape, with screen output indicating what percentage has been backed up to the tape. This may take an hour or more.6. Exit COPYUTIL.,backup disk using COPYUTIL1. B,COPYUTIL备份方法,1)如何启动“Copyuti

44、l“1从CDboot,进入ISL BOOT_ADMINbootscsi.n.m(pathofCDROMdrive-suchasscsi.4.0) 2ISLodecopyutil Typehelpforcommandinformation 3ISL_CMDcopyutil pleasewaitwhilescandevicebussess TYIndxPathProductIDBusSizeRev D016/5.6.0SEAGATEST31230NdiskdriveSCSI1.0GBHPM4 D116/5.5.0SEAGATEST31230NdiskdriveSCSI1.0GBHPM4 T216/

45、5.0.0HPC1504X/HPC1521BDDStapeSCSIn/a10092)备份系统硬盘上的所有数据COPYUTILbackup Enterthediskindex(q/?):0 EntertheTapeindex(q/?):2 Usedatacompression?(y/n)?Y Whenbackupfinished,systemwillshow:DONE! COPYUTILexit3)恢复数据到指定的系统硬盘上COPYUTILrestore EntertheTapeindex(q/?):2 Enterthediskindex(q/?):0 Usedatacompression?(y

46、/n)?Y Aftersystemdisplay:RestoredSuccessful,thatmeansrestoreisfinished! COPYUTILexit4)注意:当用copyutil备份RootDisk到相应的磁带时,该磁带可以作为bootable磁带使用,COPYUTIL备份方法1)如何启动“Copyutil,Needs for System Recovery,Failed boot/root diskCorrupt OS ( ie: non bootable)Backout path from upgradeDisaster Recovery,HP-UX 11.00,HP-

47、UX 10.20,Needs for System RecoveryFaile,System Setup for Easier Recovery,How a system is setup can greatly effect ease and ability to recover:SINGLE disk in root Volume Group, mirrored if possible.Dedicated to Operating System.,VG00,Only need to recover one disk!,System Setup for Easier Recove,Possi

48、ble Root Disk Layouts,/stand48MBprimary swap=memory/100MBsecondary swap+dump?/usr400MB/opt200MB/var300MB/tmp100MB/home?Spare spacerest of disk,Possible Root Disk Layouts/sta,Methods to Recover System,Reinstallation COPYUTILmake_recovery,Methods to Recover SystemReins,What is “make_recovery”?,Restore

49、 a non-bootable system with little or no manual interventionRestore a system after replace the corrupted root diskClone the software from one system to another- migration, disaster recoveryConvert from hfs to vxfs file systemsModify root file system or primary swap space size,An easy to use system a

50、dministration tool to create a System Recovery Tape. Part of Ignite-UX. Can be used to:,What is “make_recovery”?Restor,How to use make_recovery?- backup,/opt/ignite/bin/make_recovery -AprvC -d destination -b boot_destination -AInclude the entire root disk volume group-pPreview mode/creates files but

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号