亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 8430 | 回復(fù): 5
打印 上一主題 下一主題

Solaris10 文件系統(tǒng)備份和恢復(fù)II [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2008-07-21 10:42 |只看該作者 |倒序?yàn)g覽
  Solaris10 文件系統(tǒng)備份和恢復(fù)II

5、恢復(fù)增量備份(/export/home)
     非交互式恢復(fù)增量備份:
      (1)查看/etc/dumpdates中關(guān)于/export/home的信息:
       # more /etc/dumpdates|grep c0t0d0s7
          /dev/rdsk/c0t0d0s7 0 Wed Apr 07 09:55:34 2007
/dev/rdsk/c0t0d0s7 1 Web Apr 07 09:57:30 2007
         (2)重新構(gòu)建c0t0d0s7的文件系統(tǒng),再掛載到/export/home目錄:
             #newfs /dev/rdsk/c0t0d0s7
             #mount /dev/rdsk/c0t0d0s7 /export/home
         (3)插入最低級別(0級)備份磁帶,并執(zhí)行恢復(fù)操作:
             #cd /export/home
             # ufsrestore rvf /dev/rmt/0
Verify volume and initialize maps
Media block size is 64
Dump date: Wed Apr 07 09:55:34 2004
Dumped from: the epoch
Level 0 dump of /export/home on sys41:/dev/dsk/c0t0d0s7
Label: none
Begin level 0 restore
Initialize symbol table.
Extract directories from tape
Calculate extraction list.
Make node ./directory1
Make node ./directory2
Make node ./directory3
Extract new leaves.
Check pointing the restore
extract file ./file1
extract file ./file2
extract file ./file3
Add links
Set directory mode, owner, and times.
Check the symbol table.
Check pointing the restore
      (4)放入最新的第2級別的磁帶:
         # ufsrestore rvf /dev/rmt/0
Verify volume and initialize maps
Media block size is 64
Dump date: Wed Apr 07 09:57:30 2004
Dumped from: Wed Apr 07 09:55:34 2004
Level 1 dump of /export/home on sys41:/dev/dsk/c0t0d0s7
Label: none
Begin incremental restore
Initialize symbol table.
Extract directories from tape
Mark entries to be removed.
Calculate node updates.
Make node ./directory4
Make node ./directory5
Make node ./directory6
Find unreferenced names.
Remove old nodes (directories).
Extract new leaves.
Check pointing the restore
extract file ./file4
extract file ./file5
extract file ./file6
Add links
Set directory mode, owner, and times.
Check the symbol table.
Check pointing the restore
重復(fù)上一次操作,逐級恢復(fù)。
交互式恢復(fù)增量備份:
(1)進(jìn)入交互式恢復(fù)模式,v表示輸出詳細(xì)信息:
#ufsrestore iv /dev/rmt/0
Verify volume and initialize maps
Media block size is 64
Dump date: Mon Oct 11 13:10:12 2004
Dumped from: the epoch
Level 0 dump of /export/home on sys41:/dev/dsk/c0t0d0s7
Label: none
Extract directories from tape
Initialize symbol table.
ufsrestore > ls
.:
2 *./ 8 directory2 5 file2
2 *../ 9 directory3 6 file3
7 directory1 4 file1 3 lost+found/
The system lists files from the last Level 0 backup.
ufsrestore > add *
Warning: ./lost+found: File exists
ufsrestore > extract
Extract requested files
You have not read any volumes yet.
Unless you know which volume your file(s) are on you should start
with the last volume and work towards the first.
Specify next volume #: 1 –程序提示放入下一個(gè)磁帶庫
extract file ./file1
extract file ./file2
extract file ./file3
extract file ./directory1
extract file ./directory2
extract file ./directory3
Add links
Set directory mode, owner, and times.
set owner/mode for ’.’? [yn] n –因?yàn)槭腔謴?fù)增量備份,原目錄肯定存在
Directories already exist, set modes anyway? [yn] n –不覆蓋原目錄的權(quán)限設(shè)置。
ufsrestore > q
(2)根據(jù)/etc/dumpdates文件中的信息顯示0級備份后有一個(gè)增量備份,放入下一個(gè)磁帶:
# ufsrestore iv
Verify volume and initialize maps
Media block size is 64
Dump date: Wed Apr 07 09:57:30 2004
Dumped from: Wed Apr 07 09:55:34 2004
Level 1 dump of /export/home on sys41:/dev/dsk/c0t0d0s7
Label: none
Extract directories from tape
Initialize symbol table.
ufsrestore > ls
.:
2 *./ 13 directory4 15 directory6 11 file5
2 *../ 14 directory5 10 file4 12 file6
ufsrestore > add *
ufsrestore > extract
Extract requested files
You have not read any volumes yet.
Unless you know which volume your file(s) are on you should start
with the last volume and work towards the first.
Specify next volume #: 1
extract file ./file4
extract file ./file5
extract file ./file6
extract file ./directory4
extract file ./directory5
extract file ./directory6
Add links
Set directory mode, owner, and times.
set owner/mode for ’.’? [yn] n
ufsrestore > q

五、快照備份:
快照命令的語法:
/usr/sbin/fssnap -F FSType -V -o special_option(s) mount-point | special
選項(xiàng)如下所示:

-d
刪除和文件系統(tǒng)相關(guān)的快照,如果建立快照時(shí)使用-o選項(xiàng),則備份恢復(fù)文件也會(huì)一起刪除,否則,備份恢復(fù)文件要手工刪除。
-F FSTYPE
指定要使用的文件系統(tǒng)類型
-I
顯示指定類型的文件系統(tǒng)的快照狀態(tài)
-V
顯示完整的命令,但不執(zhí)行命令
-o
特殊的選項(xiàng),指定備份文件的位置和大小等
要?jiǎng)?chuàng)建一個(gè)快照,通常使用如下命令:
# fssnap -F ufs -o bs=backing_store_path /file-system
backing_store_path可以是一個(gè)裸設(shè)備,也可以是已存在的目錄。
下面的命令將在/var/tmp目錄中創(chuàng)建/export/home文件系統(tǒng)的快照,快照文件名默認(rèn)為snapshot0.
#fssnap -F ufs -o bs=/var/tmp /export/home
#ls -l /var/tmp
    Snapshot0
快照子系統(tǒng)把文件系統(tǒng)的數(shù)據(jù)存儲(chǔ)在一個(gè)備份恢復(fù)文件(backing-store file)中,具有如下特點(diǎn):
1、快照文件是一個(gè)bit-mapped文件,會(huì)一直占用磁盤空間知道刪除快照。
2、快照文件的大小隨著被拍照的文件系統(tǒng)的活動(dòng)次數(shù)而改變。
3、快照文件的位置不能和被拍照的文件系統(tǒng)處于同一文件系統(tǒng)。
4、快照文件可以存在不同類型的文件系統(tǒng)上,比如ufs或nfs文件系統(tǒng)。
Fssnap命令,創(chuàng)建了1個(gè)快照文件和2個(gè)只讀的虛擬設(shè)備:塊虛擬設(shè)備/dev/fssnap/0,裸虛擬設(shè)備/dev/rfssnap/0,虛擬設(shè)備可以像其他設(shè)備一樣使用備份工具對其進(jìn)行備份。從一個(gè)虛擬設(shè)備中創(chuàng)建的備份實(shí)際上是源文件系統(tǒng)的備份(ufs snapshot所拍照的哪個(gè)文件系統(tǒng)).
當(dāng)一個(gè)UFS snapshot創(chuàng)建時(shí),文件系統(tǒng)會(huì)暫時(shí)鎖定,用戶在這個(gè)文件系統(tǒng)寫數(shù)據(jù)時(shí),可能會(huì)感覺到輕微的停滯,該文件系統(tǒng)越大,停滯的時(shí)間越長,寫數(shù)據(jù)沒有任何影響。
命令用法示例:
(1),限定快照恢復(fù)文件的大。
   -o maxsize=n(k,m,g)
   -o minsize=n(k,m,g)
如果一個(gè)快照文件用完了磁盤空間,系統(tǒng)會(huì)自動(dòng)刪除ufs snapshot,不會(huì)影響源文件系統(tǒng),可查看/var/adm/messages中關(guān)于snapshot的錯(cuò)誤消息。
如果強(qiáng)行卸載一個(gè)活動(dòng)的文件系統(tǒng)(如umount -f),如果該文件系統(tǒng)有快照存在,系統(tǒng)會(huì)自動(dòng)刪除該快照。
(2)實(shí)例演示:
   創(chuàng)建/opt快照:
    #fssnap -o maxsize=500m,bs=/var/tmp /export/home
      /dev/fssnap/0
    查看快照的內(nèi)容:
     #ls -lh /var/tmp/snapshot0
    顯示快照的詳細(xì)信息:
     #fssnap -i
       0  /opt
         #/usr/lib/fs/ufs/fssnap -i /export/home只能用這個(gè)命令才能看詳細(xì)信息
Snapshot number : 0
Block Device : /dev/fssnap/0
Raw Device : /dev/rfssnap/0
Mount point : /export/home
Device state : idle
Backing store path : /var/tmp/snapshot0
Backing store size : 0 KB
Maximum backing store size : 512000 KB
Snapshot create time : Mon Oct 11 08:58:33 2004
Copy-on-write granularity : 32 KB
     掛載和卸載快照設(shè)備:
     #mkdir /tmp/tmp.snap
     #mount -o ro /dev/fssnap/0 /tmp/tmp.snap
     #umount /dev/fssnap/0
     刪除快照:
     #fssnap -d /export/home
     #rm /var/tmp/snapshot0
(3),備份快照:
1、對UFS快照進(jìn)行備份:
   創(chuàng)建快照并掛載新添加的快照虛擬設(shè)備:
   #fssnap -F ufs -o bs=/export/home /opt
   #fssnap -i
   #/usr/lib/fs/ufs/fssnap -i /opt
   #mkdir /tmp/optsnap
   #mount -o ro /dev/fssnap/0 /tmp/optsnap
   使用tar命令進(jìn)行備份:
   #cd /tmp/optsnap
   #tar cvf /dev/rmt/0
   使用ufsdump命令進(jìn)行備份:
   #ufsdump 0uf /dev/rmt/0 /dev/fssnap/0
   #ufsrestore tf /dev/rmt/0
2、對UFS進(jìn)行增量備份:
   命令示例:
   #ufsdump 1ufN /dev/rmt/0 /dev/rdsk/c0t1d0s0 /dev/rfssnap/0
   #ufsrestore tf /dev/rmt/0
   快照的增量備份實(shí)例:
   創(chuàng)建快照:
   #fssnap -o bs=/var/tmp /extra
   #fssnap -i
   #/usr/lib/fs/ufs/fssnap -i /extra
   #mkdir /extrasnap
   #mount -o ro /dev/fssnap/0 /extrasnap
   #df -k|grep extra
    /dev/dsk/c1t0d0s0 1294023 9 1242254 1% /extra
/dev/fssnap/0 1294023 9 1242254 1% /extrasnap
  #touch file1
  #df -k|grep extra 查看可用空間的不同
    /dev/dsk/c1t0d0s0 1294023 20 1242243 1% /extra
/dev/fssnap/0 1294023 9 1242254 1% /extrasnap
  執(zhí)行全備:
  # ufsdump 0ufN /dev/rmt/0 /dev/rdsk/c1t0d0s0 /dev/rfssnap/0
  # ufsrestore tf /dev/rmt/0 -檢查備份
刪除快照:
   #umount /extrasnap
   #fssnap -d /extra
   # rm /var/tmp/snapshot0
增量備份:
  #cp file1 file5
  #cp file1 file6
  #fssnap -o bs=/var/tmp/extra
  #mount -o ro /dev/fssnap/0 /extrasnap
  #df -k|grep extra
    /dev/dsk/c1t0d0s0 1294023 46 1242217 1% /extra
/dev/fssnap/0 1294023 46 1242217 1% /extrasnap
  #ufsdump 1ufN /dev/rmt/0 /dev/rdsk/c1t0d0s0 /dev/rfssnap/0
  #ufsrestore tf /dev/rmt/0
3、從UFS快照的備份中恢復(fù)數(shù)據(jù):
   例:從磁帶備份中恢復(fù)/usr文件系統(tǒng)的demo目錄:
       #cd /usr
          #ufsrestore if /dev/rmt/0
ufsrestore > add demo
ufsrestore > extract
Specify next volume #: 1
set owner/mode for ’.’? [yn] n
ufsrestore > quit


本文來自ChinaUnix博客,如果查看原文請點(diǎn):http://blog.chinaunix.net/u1/36549/showart_1087374.html

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2009-01-14 11:34 |只看該作者
嚴(yán)重支持!

論壇徽章:
0
3 [報(bào)告]
發(fā)表于 2009-05-06 15:23 |只看該作者
ding

論壇徽章:
0
4 [報(bào)告]
發(fā)表于 2009-11-20 18:23 |只看該作者
頂起。!

論壇徽章:
0
5 [報(bào)告]
發(fā)表于 2010-10-11 15:33 |只看該作者
頂起:wink:

論壇徽章:
0
6 [報(bào)告]
發(fā)表于 2010-12-23 16:21 |只看該作者
回復(fù) 1# jacky.lee


    太好啦,太需要這些資料,學(xué)習(xí)學(xué)習(xí)!
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP