''s profileKT' Cheung's Space 【 张智波...PhotosBlogListsMore ![]() | Help |
|
|
November 01 VISBU又在 epie 那找到好东西咯, 当然就是 [ VISBU ]...
引用 epie :
****************************************************************************************
一款vmware的备份软件,此软件是安装在service console上的,那基本上就代表了无法集中管理,适合小规模Vm环境 但是它是Free的,而且支持schedule task,应该比VCB强。国外有人推荐,我顺便贴出来share下 具体效果如何,目前比较忙,没时间测试。等测试完,再分享下原理和优缺点 VISBU is free backup software that is run from the Service Console that provides VMDK level backups of any VM on storage accessible by the host. The script can be targeted at any ESX server or VC server. The script is designed to be easy to use and offers all features from a simple menu driven interface, so a non-Linux administrator can use it with the minimum of fuss. It provides email reports, automated restoration for every backed up VM, scheduling, is DRS aware, and supports backups to SMB, NFS, EXT3, iSCSI and SAN based volumes. http://engineering.xtravirt.com/products/visbu.html ***************************************************************************************** 测试了一下,确实很不错,速度和在ESX下用VCB一样的,log提示也很清晰. 不过该备份软件仅限于热备,对于power off的VM,似乎是无法backup的. 另外,对于epie的"代表无法集中管理,适合小规模环境",本人发表以下看法(该看法只是与epie兄弟做学术交流): 该软件也可以集中式管理,虽然有点别扭,但是确实可行.本人亲测. 192.168.1.100 virtual_center.vmware.com virtual_center 在备份的时候,输入备份的hostname时,输入virtual_center.vmware.com, 帐号密码当然就是VC的ID和PWD啦. 这时候,是可以备份VC中全部POWER ON状态的VM到本地的. 当然,如果VC管理的ESX都是FC连接的存储,再从存储来一个BACK UP的LUN连接到这台ESX, 那么就是一件美事了. 不知道epie兄弟有何看法?
October 24 VCB故障排错转载于epie's blog:
July 14 变通式VMware Consolidated Backup方法应该值得开心一下!
因为终于使用VCB有点体会了.
楼下丹麦哥们备份的shell写的不错,如果在整个过程中加上echo,会更完美些..
不过总体而言,速度还是不错的,毕竟在本地上进行备份,可以避免不少的麻烦,但是备份后再scp?虽然这是官方推荐,但是我觉得有些恶心,毕竟这就是蜗牛的速度了.
这也是没有共享存储,而又想体验一下VCB的方法.
总觉得VCB不能鱼和熊掌兼得.如果在本机上做备份,即使虚拟机是Linux,那么也照样备份,这确实很理想,如果是远程的VCB PROXY,那么就等于废了,对于使用Linux的用户简直就是噩梦..
不过,还是想尝试尝试,结合Tooms的bash.
1)在远程机器Windows 2003上共享一文件夹,命名"vcb_remote"
2)在ESX内挂载该文件夹.
[root@esx102 tmp]# mkdir vcb_remote
[root@esx102 tmp]# mount -t smbfs -o username=administrator,password=VMware.com //192.168.11.22/vcb_remote /tmp/vcb_remote (注意端口是否开放)
3)在Tooms的bash上将备份路径修改为/tmp/vcb_remote即可.
4)备份:
执行 ./backup
=======================================================
整个过程还是很安静,很缓慢的过程.毕竟这和先备份再scp没分别..出奇的慢, 每秒5M的速度,备份一个15G的Virtual machine要老半天,怎么混..
=======================================================
不过庆幸的是,各种各样的方法总是有的...在多方面的约束下还能实现,才是最重要的...
VMware ESX 3.0 VM Backup script by ToomsI was looking around the internet for a backup script to backup the VM guests on a standalone ESX 3.0 and was not finding any so I start to make my own. Things I need the script to-do was.
and yes I know esxRanger 2.0 for ESX 3.0 can do all this, but that product was not finish and public when I start to make this script, maybe I will change to esxRanger but that will time tell or maybe I will use them both
3. make a folder for the backup script
5. Make it a script run this command "chmod 777 /etc/esxbackup/backup.bash" to make it a script there can be run from the commandline 6. When to run the backup edit the crontap fil with the command "nano /etc/crontap" to run the script at 21:00 every evening Add the line mark with blue
7. Try the script Try the script by running the command "/etc/esxbackup/backup.bash" 8. Look at the backup log Look at the backup log with the command "nano /vmfs/volumes/storage1/backup/20060905-1800/log/backup.log" note that the path will offcource not be the same when you use it... 9. Backup to tape Now setup your remote backup server to backup any thing in the /vmfs/volumes/storage1/backup folder, I use Backup Exec 10D on a windows server with the backup exec 9.1 linux agent installed in the ESX 3.0 server COS. That works very well with backup speed at around 1500mb/min over a 1gbit network with a LTO3 24 tape autoloader from Dell on the windows server. And yes before you ask how to restore a VM from the backup folder...... First turn off the VM there need to be restore and do like this
Now turn on the VM that is just restore and verify it is working.
June 01 VMware VI3 虚拟机热备份的几种方法VM 热备份有几种方式: May 28 Consolidate Backup备份出现错物提示:Error:Failed to export the disk: I/O Operation failed.很经典的问题,在使用VCB备份时出现
Error:Failed to export the disk: I/O Operation failed
的错误提示,搜索了一下VMTN,也大有人在..
解决方案:
修改/etc/vmware/hostd/config.xml文件.
找到以下语句,并添加高亮部分:
<blklistsvc>
<enable>true</enable>
<leaseTimeSecs>180</leaseTimeSecs>
</blklistsvc> May 12 用vcbRestore將VM回復到另一台ESX上修改catalog文件:
vi 虛擬機器中的catalog file
version= esx-3.0
state= poweredOn display_name= "Win2000Pro" uuid= "564d617f-26af-80b9-a93b-1c542015b355" disk.scsi0:0.filename= "scsi0-0-0-Win2000Pro.vmdk" disk.scsi0:0.diskname= "[ESX02-storage1] Win2000Pro/Win2000Pro.vmdk" config.vmx= "[ESX02-storage1] Win2000Pro/Win2000Pro.vmx" host= ESX02.tw.fedex.com timestamp= "Mon Sep 3 08:54:36 2007" config.suspenddir= "[ESX02-storage1] Win2000Pro/." config.snapshotdir= "[ESX02-storage1] Win2000Pro" config.file0= "Win2000Pro.vmsd" config.file1= "Win2000Pro.vmxf" config.file2= "Win2000Pro.nvram" config.logdir= "[ESX02-storage1] Win2000Pro" config.log0= "vmware-7.log" config.log1= "vmware-8.log" config.log2= "vmware-9.log" config.log3= "vmware-10.log" config.log4= "vmware-11.log" config.log5= "vmware-6.log" config.log6= "vmware.log" folderpath= "/ha-folder-root/ha-datacenter/vm" resourcepool= "/ha-folder-root/ha-datacenter/host/ESX02-Server/Resources/Production" 基本上只要修改3種設定 [ESX02-storage1] -> 改成 另一台ESX storage name ESX02-Server -> 改成 另一台 ESX Server Name Production -> 改成 另一台 你想要存放的 Resource Pool Name May 10 VCB Backup RHEL严重挫折历程--哭吖
崩溃,怎么又会出错,hosufull解释: 因为你是在vm运行的情况下做vcb, 在做vcb时,先要freeze冰冻vm,然后做snapshot, 看来VCB对Linux的Backup还真是有点不足.没法,尝试关闭VM OS,对关闭的VM做Backup吧,使用: [root@esx102 root]# vcbMounter -h 10.3.131.80 -u root -p vmware -a name:"in red hat4" -r /vmfs/volumes/lun2/vcb_linux Copying "[storage1] in red hat4/in red hat4.nvram": Copying "[storage1] in red hat4/vmware-1.log": Copying "[storage1] in red hat4/vmware-2.log": Copying "[storage1] in red hat4/vmware.log": Converting "/vmfs/volumes/lun2/vcb_linux/scsi0-0-0-in red hat4.vmdk" (compact file): 舒服,总算可以备份了..OK,尝试破坏该虚拟机的配置文件和.vmdk文件,都删除掉,启动时,提示错误--不提示才怪..>.< 尝试恢复,使用以下命令: [root@esx102 vcb_linux]# vcbRestore -h 10.3.131.80 -u root -p vmware -s /vmfs/volumes/lun2/vcb_linux/ OK,还原成功.. 后来又尝试修改虚拟磁盘,再做VCB备份,谁知道我自己把磁盘乱改一通后,最后连kernel文件也在启动的时候找不到了.. 被迫使用第3台RHEL5-SERVER进行备份,嘿嘿~~我只是抱着尽管试一试的心情,没安装VM-TOOLS,只改了IP后,直接使用: [root@esx102 lun2]# vcbMounter -h 10.3.131.80 -u root -p vmware -a name:"RHEL5-SERVER-I386" -r /vmfs/volumes/lun2/vcb_backup_rhel5 忽然....备份成功了....而且此时RHEL5状态为online...此时此刻证明了上面所写的一切都有所保留..出现freeze错误提示的,是因为我用了ipaddr:而导致的问题? 不过无论如何,Consolidated Backup对LINUX的online备份还是可以的,而且如果使用-a name:去备份的话,屡试不爽...也抛开了vm-tools的麻烦.. March 09 [Kt'Cheong原创]VMware Consolidated Backcp教程(一) Backing Up With VMware Infrastructure備份,恢復和災難恢復時數據管理當中最常見的處理方法。VMware Infrastructure和VMware ESX Server提供了很多不同的解決方案,他們各自適用于不同的環境,以用來執行備份和還原的任務。 這個介紹説明了ESX Server那些資源會被備份,和解釋備份時哪些選項會被使用到。 包括以下章節: ◆備份的概念 ◆備份什麽 ◆備份的組成和途徑 ◆使用傳統的備份模式 ◆使用VMware Consolidated Backup
備份的概念 ◆差量備份(Differential backup)--備份最近一次“全備份”后被修改過的文件的備份模式。 ◆文件等級備份(File‐level backup)--一种被指定文件或者文件夾等級的備份類型。 ◆全備份(Full backup)--備份或有被選定的文件。 ◆所有虛擬機備份(Full virtual machine backup)--備份所有的文件包括整個完整的虛擬機。這些文件包括磁盤鏡像,.vmdk文件等等。 ◆鏡像(卷)等級備份(Image‐level (volume‐level) backup)--備份整個完整的存儲邏輯卷。 ◆增量備份(Incremental backup)--只備份上一次備份后改變的文件,無論上次是全備份或者增量備份。 ◆停頓(Quiescing)--A process of bringing the on‐disk data of a physical or virtual computer into a state suitable for backups. This process might include such operations such as flushing dirty buffers from the operating systemʹs in‐memory cache to disk, or other higher‐level application‐specific tasks. ◆VCB代理(VCB proxy)--在〈VMware Consolidated Backup〉中,VCB代理是一個運行在物理機或者虛擬機的Microsoft Windows 2003,加固備份和第三方備份軟件。使用于執行文件等級和鏡像登記的虛擬機備份。
備份什麽 在ESX Server的環境裏,你需要備份以下主要的項目: ◆虛擬機内容(Virtual machine contents)--虛擬機數據的備份包括虛擬磁盤或者Raw Device Mappings (RDMs),配置文件,等等。 類似有些虛擬機,你必須週期性地備份虛擬機的數據,防止由於人爲或者技術上潛在的損害和丟失。 一般,為你的虛擬機使用以下的備份進度表: ◆鏡像等級,週期性地為Windows和每夜地為Linux執行備份。舉例:每星期備份一次Windows虛擬機的啓動磁盤鏡像。 ◆文件等級,每天執行一次備份任務。舉例,每天晚上執行備份D,E等等分區上的文件。 ◆Service Console (ESX Server 3 only)--服務控制臺,一種定制版本的LINUX,是ESX SERVER3上命令行的管理界面。他為直接管理ESX Server3提供了工具和命令提示符。使用VI Clint是ESX Server 3主機主要的界面,使用Service Console只是提供高級的管理操作。
虛擬機目錄 儲存虛擬機,ESX Server使用了VMware Virtual Machine File System (VMFS).VMFS是物理磁盤或者LUNs存儲能力上的巨大文件,高性能文件系統。例如ESX Server的虛擬機的虛擬磁盤鏡像,或者虛擬機暫時的内存鏡像。 自從ESX Server3.0開始,VMFS3支持目錄。也就代表,VMFS上一個分離的子目錄被使用于每個虛擬機。這個目錄包括虛擬機組成所有的文件,類似.vmdk虛擬磁盤文件,虛擬機配置.vmx文件,log文件,等等。 An alternative to a virtual disk is a raw device mapping (RDM) that connects your virtual machine to a raw SAN LUN. RDMs can exist in two modes, virtual compatibility and physical compatibility.
訪問和管理虛擬磁盤文件 代表性的,你可以使用VMware Infrastructure Client (VI Client)在虛擬機上執行多樣性的操作。 直接操作VMFS上虛擬磁盤文件可能通過服務控制臺(ESX Server 3),和命令行界面(ESX Server 3i),儘管使用VI Cliemnt是首選的方式。 從服務控制臺或者遠程命令行界面,你可以使用類似“ls”或者“cp”查看和控制/vmfs/volumes目錄下的文件。 額外的文件操作是通過vmkfstools命令行去激活。使用命令行去執行以下的操作。 Creating, extending, and deleting disk images.
備份的組成和途徑 儅你執行備份,在過程中以下備份軟件的三個成分會被涉及到: Backup Client (Backup Agent).一個可以掃描虛擬機文件系統和遷移被備份的數據到備份服務器的軟件。在恢復的操作,Backup Client將數據寫道文件系統中。 Backup Server.被backup client所推動,作爲備份中介,寫入數據的程序。在還原的操作,backup server從備份中介讀取數據,和推動他到backup client。 Scheduler.允許你有規律的安排備份工作和等同他們執行的程序。 Each of the backup software components can be run in a virtual machine, on the service console (only with ESX Server 3), or on a VCB proxy running Microsoft Windows 2003. While the location of the scheduler is not important, the locations of the backup server and backup client are important. 依賴于在什麽地方你需要運行哪些組成構件,選擇以下其中一個途徑: Traditional backup approach. You deploy a backup client to every system that requires backup services. You can then regularly schedule automatic backups.With this approach, several methodologies exist. Choose a method that better suitsyour needs and requirements. 使用傳統的備份模式 使用傳統的備份模式,你可以在各自數據需要保護的主機上展開一個備份的代理。規則化的備份是被自動化的管理。 The backup agent scans the file system for changes during periods of low system utilization and sends the changed information across the network to a backup server that writes the data to a backup medium, such as a robotic tape library. 使用傳統式的備份方式,當你使用ESX Server 3和 service console的時候,你可以備份你的虛擬機。 傳統式備份的考慮 當你使用傳統備份模式去備份你的系統的時候,留意以下幾點; To be able to capture the data in its consistent state, perform backups at the times of the lowest activity on the network and when your computer resources are mostly idle. While performing backups, you might need to take critical applications off line. Backing Up the ESX Server 3 Service Console Because the ESX Server 3 service console does not experience major changes during its lifetime and its state is easily recoverable in case of a failure, you might decide against backing it up. If you choose to back up the service console, you do not need to do it frequently. Use the following methods when backing up service console: 基於文件(File‐Based.)Treat the service console as a physical machine with a deployed backup agent. To restore the service console, reinstall it, reinstall the agent, and then restore the files that you backed up. This approach makes sense if management agents that are hard to set up have been deployed in the service console. Otherwise, this approach provides no advantage over not backing up the service console. 基於鏡像(Image‐Based.)Use third‐party software to create a backup image that you can restore quickly. Use your boot CD or whatever the backup software created to restore the service console. Backing Up Virtual Machines 依賴于你的需求和可用性的資源,你可能選擇一個傳統式方法去備份你的虛擬機。傳統式的備份方法無法使用加固備份(Consolidated Backup.) 傳統式的備份方式提佛以下的操作: 在虛擬機裏運行備份客戶端,和執行“文件等級”或者“鏡像等級”備份。只要你是通過網絡備份,不需要兼容性支持。 在ESX Server 3 service console下運行備份客戶端,備份VMFS文件系統中虛擬機的所有文件。 備份虛擬機數據通過在虛擬機内運行一個backup server,連接到磁帶驅動器或者其它基於SCSI的備份媒體,把它們放在物理系統上。 當虛擬機文件放在共享存儲,使用在存儲上類似SAN,NAS,或者iSCSI或者一個獨立的備份服務器去執行基於存儲的鏡像的方式去備份虛擬機。
虛擬機中運行備份客戶端 因爲虛擬機其實也是一個“物理機”,你可以備份他使用同樣的習慣方式就類似一個物理機,在虛擬機内使用備份的軟件。 以下方法一和方法二舉例説明,你如何在每一個虛擬機内安裝備份代理,和通過網絡備份數據和備份服務器,展開所有其他的虛擬機或者在物理機内。 方法一:在虛擬機内備份服務器 使用這種方法,展開你備份客戶端在其中一個虛擬機當備份的服務器在其他的虛擬機上。VMware推薦你運行虛擬機在同樣的ESX Server系統。這樣子,數據通過這兩個虛擬機移動通過虛擬以太網連接到這些虛擬機,但是不需要將數據轉移通過物理的以太網連接上。 當你使用方法一時,備份代理會執行停頓當虛擬機被備份完畢后。 方法一普遍的被使用在虛擬機磁盤鏡像裏執行文件等級備份數據存儲。 Table 1-1. Backup Client in One Virtual Machine, Backup Server in Another Virtual
方法二:備份服務器在物理機 使用方法二,你展開備份客戶端在虛擬機内當備份服務器運行在服務器上時。 使用方法二因爲數據存儲的文件等級備份在虛擬機的磁盤鏡像裏面。
Table 1-2. Backup Client in a Virtual Machine, Backup Server in a Physical Machine
Running the Backup Client in the ESX Server 3 Service Console 因爲一個完整的虛擬機被壓縮在少數量的文件内,你可以把虛擬機看作是ESX Server3主機内的文件,和從服務器控制臺備份這些文件。通過方法三和方法四舉例説明,通過這些步驟,你可以在你的服務控制臺展開備份客戶端,以備份這些文件達到備份服務器的目的,在其他服務器或者物理機种展開。 當你在服務控制臺中運行備份客戶端,執行以下其中之一去備份你的虛擬機: 關閉虛擬機電源 使用快照去備份正在運行中的虛擬機
方法三:備份服務器在一虛擬機内 使用方法三,你展開備份客戶端在一ESX Server 3的服務控制臺當備份服務器運行在虛擬機种時。 方法三倍使用于執行鏡像等級備份或者整個虛擬機的備份 Table 1-3. Backup Client in a ESX Server 3 Service Console, Backup Client in a Virtual Machine
Method 4: Backup Server in a Physical Machine 方法四倍使用在執行鏡像登記備份。 Table 1-4. Backup Client in an ESX Server 3 Service Console, Backup Server in a Physical Machine
Running the Backup Server in a Virtual Machine 你可以備份虛擬機數據通過在一臺虛擬機裏面運行一個備份服務器,連接到磁帶驅動器位,或者其他基於SCSI附屬在物理系統的備份媒體。 使用這種方法,留意一下幾點: VMware supports attaching SCSI drives to the ESX Server using Adaptec SCSI adapters. Using other adapters, such as LSI MPT‐Fusion SCSI, is not supported.
Treating Virtual Machines as Files on Shared Storage When virtual machine files reside on shared storage, it is possible to use storage‐based imaging on storage such as SAN, NAS, or iSCSI, or an independent backup server (a proxy backup server or NDMP) to back up virtual machine files without creating an additional load on the ESX Server host that runs the virtual machines. SAN Backups If your virtual disk files are stored on a SAN, use features supplied by your SAN vendor to create a copy of your production LUN containing all virtual disk files and then send these copies to your backup media. With this method, you do not have to use virtual machine snapshot functionality during the backup process because the SAN hardware 使用SAN的快照去備份你的數據時,注意以下幾點: 很多產商為VMFS和RDMs支持快照。如果他們兩者都支持,你可以為你的主機選擇其中之一給他裏面整個虛擬機文件系統進行快照,或者為他們單獨的虛擬機做快照。 一些廠商只為使用RDMs設置的進行快照。如果只有DRMs支持快照,那麽你可以單獨地為虛擬機做快照。 NFS Backups 如果你的虛擬機被存儲在額外使用NFS協議的網絡存儲系統上,你為虛擬機可以執行鏡像等級備份。
Using VMware Consolidated Backup Reduce the load on your ESX Server systems by moving the backup tasks to one or more dedicated backup proxies. Eliminate the need for a backup window by moving to a snapshot‐based backup approach.
關於Using VMware Consolidated Backup,下一章節開始持續三個章節,作詳細的講解,包括備份,還原,Troubleshooting等等,請關注。
copyleft(r)Kt.Cheong March 07 谈论 VM 热备份的几种办法 (更新完毕) - VMWARE企业高级应用 - 中国VMWARE - 中国虚拟化先锋
引用 VM 热备份的几种办法 (更新完毕) - VMWARE企业高级应用 - 中国VMWARE - 中国虚拟化先锋 |
|
|