資源描述:
《Linux下如何整系統(tǒng)備份恢復》由會員上傳分享,免費在線閱讀,更多相關內容在工程資料-天天文庫。
1、Linux下如何整系統(tǒng)備份/恢復2009-11-0213:012009-12-2615:22Linux下如何整系統(tǒng)備份/恢復2009-11-0213:01(分類:linux)本文對象:對linux下的fdiskgrub文件系統(tǒng)有一定了解很多人都說Linux下沒有一個和Win下Ghost功能類似的軟件,要實現(xiàn)類似win系統(tǒng)的整系統(tǒng)備份幾乎沒有辦法,經過多次試驗使用tar完成這個功能,只是過程有點復雜。日后有空使用dd試試,或許效果能更好。注:要備份系統(tǒng),最好使用光盤或者其它系統(tǒng)盤啟動(和win下的進入dos再作備份類似),把系統(tǒng)的文件系統(tǒng)按照/etc
2、/fstab里面的文件結構掛載到現(xiàn)有文件系統(tǒng)中。本文以FC4為例,直接在系統(tǒng)中對正在運行的系統(tǒng)進行備份:首先查看系統(tǒng)文件結構:[root@FC4/root]#mount/dev/sda6on/typeext3(rw)noneon/proctypeproc(rw)noneon/dev/ptstypedevpts(rw,gid=5,mode=620)usbdevfson/proc/bus/usbtypeusbdevfs(rw)/dev/sda1on/boottypeext3(rw)/dev/sda7on/hometypeext3(rw)noneon/d
3、ev/shmtypetmpfs(rw)/dev/sda3on/usrtypeext3(rw)/dev/sda2on/vartypeext3(rw)[root@FC4/root]#[root@FC4/root]#fdisk/dev/sdaThenumberofcylindersforthisdiskissetto4425.Thereisnothingwrongwiththat,butthisislargerthan1024,andcouldincertainsetupscauseproblemswith:1)softwarethatrunsatboo
4、ttime(e.g.,oldversionsofLILO)2)bootingandpartitioningsoftwarefromotherOSs(e.g.,DOSFDISK,OS/2FDISK)Command(mforhelp):pDisk/dev/sda:36.4GB,36401479680bytes255heads,63sectors/track,4425cylindersUnits=cylindersof16065*512=8225280bytesDeviceBoot???Start??????End???Blocks??Id?System
5、/dev/sda1??*????????1???????13???104391??83?Linux/dev/sda2???????????14?????3200?25599577+?83?Linux/dev/sda3?????????3201?????3722??4192965??83?Linux/dev/sda4?????????3723?????4425??5646847+??f?Win95Ext'd(LBA)/dev/sda5?????????3723?????3853??1052226??82?Linuxswap/dev/sda6?????
6、????3854?????3984??1052226??83?Linux/dev/sda7?????????3985?????4425??3542301??83?LinuxCommand(mforhelp):q[root@FC4/root]#more/etc/fstabLABEL=/????????????????/??????????????????????ext3???defaults???????11LABEL=/boot????????????/boot??????????????????ext3???defaults???????12no
7、ne???????????????????/dev/pts???????????????devpts?gid=5,mode=620?00LABEL=/home????????????/home??????????????????ext3???defaults???????12none???????????????????/proc??????????????????proc???defaults???????00none???????????????????/dev/shm???????????????tmpfs??defaults???????0
8、0LABEL=/usr?????????????/usr???????????????????ext3???default