• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

OS Backup Commands

发布: 2007-7-04 12:06 | 作者: admin | 来源:  网友评论 | 查看: 13次 | 进入软件测试论坛讨论

领测软件测试网 This article contains a summary of the operating system backup commands you might encounter whilst backing up Oracle databases:
  • ntbackup
  • tar
  • cpio
  • dd
  • vdump, rvdump, vrestore and rvrestore

ntbackup

Under WindowsNT and Windows2000 filesystem backups are done using the ntbackupprogram. This is a GUI tool with easy touse wizards to get you started, but it is also accessible from thecommand line. The command line parameters differ between WindowsNTand Windows2000. Under WindowsNT a typical backup command would looklike:
ntbackup backup c:\ /d "Daily Backup" /hc:on /l "C:\backup.log" /e /t normal /v

c:\ : The drive to backup.
/d "Daily Backup" : The name of the backup set.
/hc:on : Harware compression on.
/l "C:\backup.log" : Location of the logfile.
/e : Log exceptions only.
/t normal : Backup type normal.
/v : Verify backup.
Under Windows2000 a similar command would look like:
ntbackup backup c:\ /D "Daily Backup" /HC:on /L:s /M normal /P DLT /V:yes /UM

c:\ : The drive to backup.
/D "Daily Backup" : The name of the backup set.
/HC:on : Harware compression on.
/L:s : Summary data only in log.
/M normal : Backup type normal.
/P DLT : Media pool assignment (Backup/DLT).
/V:yes : Verify backup.
/UM : Unmanaged.
The Windows2000 backup logs always appear in:

C:\Documents and Settings\<user-name>\Local Settings\Application Data\Microsoft\Windows NT\NTbackup\Data

Where user-name is the user who ran ntbackup.

The Windows2000 is rather troublesome regarding reuse of tapes. Usingthe following procedure should alleviate most of these problems:
  • From the task bar click "Start" -> "Run..."
  • Enter "ntbackup" and click "OK".
  • From the ntbackup menu select "Tools" -> "Options" and click on the "General" tab.
  • Check the "Always move new import mediato the Backup media pool" option and click "OK".
  • Exit ntbackup.
If there are still issues you must right-click the appropriate tape drive in "Computer Management" and select the"Mark as clean" option. At this point the tape should be reused properly.

tar

The tar command can be used to backup and restore files to another filesystem or an offile storage device:
# Create archive.
cd /u01/app/oracle
tar -cvf /tmp/admin.tar admin

# Restore archive.
cd /tmp
tar -xvf admin.tar
If a full path is used during the archive creation the extract locations are fixed rather than relative. The process is similarwhen accessing a tape device except the destination is the mounted device:
# Mount and rewind the tape.
mt -f /dev/rmt/2m rew

# Create archive.
tar -cvf /dev/rmt/2m /u01/*

# Restore archive.
tar -xvf /dev/rmt/2m

dd

The dd command is similar to the tar command:
# Mount and rewind the tape.
mt -f /dev/rmt/2m rew

# Create archive.
dd if=/u01/app/oracle/* of=/dev/rmt/2m BS=32K

# Restore archive.
dd if=/dev/rmt/2m of=/u01/app/oracle BS=32K

cpio

The cpio command deals with the standard input so filesystem paths must be piped to it:
# Create archive.
cd /u01/app/oracle
find admin | cpio -oc > /tmp/admin.cpio

# Restore archive.
cd /tmp
cpio -idmv < admin.cpio
If a full path is used during the archive creation the extract locations are fixed rather than relative:
find /u01/app/oracle/admin | cpio -oc > /tmp/admin.cpio

vdump, rvdump, vrestore and rvrestore

Full level 0 backup of a local filesystem (/u01) to a local device (/dev/tape/tape1_d6):
/sbin/vdump -0 -u -f /dev/tape/tape1_d6 /u01
Full level 0 backup of a local filesystem (/u01) to a remote device (server2:/dev/tape/tape1_d6):
/sbin/rvdump -0 -u -f server2:/dev/tape/tape1_d6 /u01
Restore a vdump or rvdump archive from a local device (/dev/tape/tape1_d6) to a local filesystem (/u01):
/sbin/vrestore -xf /dev/tape/tape1_d6 -D /u01
Restore a vdump or rvdump archive from a remote device (server2:/dev/tape/tape1_d6) to a local filesystem (/u01):
/sbin/rvrestore -xf server2:/dev/tape/tape1_d6 -D /u01

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备2023014753号-2
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网