首先登入
# mkdir vmbackup ########建立保存备份文件的目录
# vmfs-undelete ########运行备份磁盘文件的命令
########################################################
# VMFS Data Recovery and Backup #
# #
# This tool is NOT a replacement for regular backups #
# Please backup your data on a regular basis #
# There is absolutely no guarantee #
# Use at your own risk #
# #
# VMs with Raw Disks (virtual or physical) are #
# Not supported!!!! #
########################################################
--------------------------------------------------
Select ackup, [r]estore [q] to quit: b ########备份选择----b
------------------------------------------
0 ) /vmfs/volumes/48d70e5b-e8cf29c8-9c04-001e0b75d2d4/86_Redhat_as5_Backup/86_Redhat_as5_Backup.vmx
1 ) /vmfs/volumes/48d70e5b-e8cf29c8-9c04-001e0b75d2d4/87_Window2003/87_Window2003.vmx
2 ) /vmfs/volumes/48d70e5b-e8cf29c8-9c04-001e0b75d2d4/88_windowsXP_sp3/88_windowsXP_sp3.vmx
3 ) /vmfs/volumes/48ad2ec3-02689de1-a7a0-001e0b75d2d6/86_KT_LocalMachine/86_KT_LocalMachine.vmx
------------------------------------------
found 4 vms
Choose a VM to backup, [99] for all registered VMs or [q] to quit: 99
########全部都备份就选择99….部分备份,就按照0,1,2,3选择
Backing up all VMs on this host
number of vms to backup 4
Ready to write to data to disk
Enter path and filename of where to save the recover log to: vmbackup/all_vm_vmdk_backup
########目录必须是存在的,文件会自动生成,所以文件名必须是目前不存在的
________________________________________
working on VM: /vmfs/volumes/48d70e5b-e8cf29c8-9c04-001e0b75d2d4/86_Redhat_as5_Backup/86_Redhat_as5_Backup.vmx
Checking for VM Snapshots...
Creating Snapshot...
read block list for /vmfs/volumes/48d70e5b-e8cf29c8-9c04-001e0b75d2d4/86_Redhat_as5_Backup/86_Redhat_as5_Backup.vmdk
removing snapshot....
________________________________________
working on VM: /vmfs/volumes/48d70e5b-e8cf29c8-9c04-001e0b75d2d4/87_Window2003/87_Window2003.vmx
Checking for VM Snapshots...
Creating Snapshot...
read block list for /vmfs/volumes/48d70e5b-e8cf29c8-9c04-001e0b75d2d4/87_Window2003/87_Window2003.vmdk
removing snapshot....
________________________________________
working on VM: /vmfs/volumes/48ad2ec3-02689de1-a7a0-001e0b75d2d6/86_KT_LocalMachine/86_KT_LocalMachine.vmx
Checking for VM Snapshots...
Creating Snapshot...
read block list for /vmfs/volumes/48ad2ec3-02689de1-a7a0-001e0b75d2d6/86_KT_LocalMachine/86_KT_LocalMachine.vmdk
removing snapshot....
________________________________________
working on VM: /vmfs/volumes/48d70e5b-e8cf29c8-9c04-001e0b75d2d4/88_windowsXP_sp3/88_windowsXP_sp3.vmx
Checking for VM Snapshots...
Creating Snapshot...
read block list for /vmfs/volumes/48d70e5b-e8cf29c8-9c04-001e0b75d2d4/88_windowsXP_sp3/88_windowsXP_sp3.vmdk
removing snapshot....
Done...... ######## 备份完成
########################################################
# VMFS Data Recovery and Backup #
# #
# This tool is NOT a replacement for regular backups #
# Please backup your data on a regular basis #
# There is absolutely no guarantee #
# Use at your own risk #
# #
# VMs with Raw Disks (virtual or physical) are #
# Not supported!!!! #
########################################################
--------------------------------------------------
Select ackup, [r]estore [q] to quit: r ######## 还原
enter file name to restore from: vmbackup/all_vm_vmdk_backup ########选择还原文件的位置
----------------------------------------
1) /vmfs/volumes/48d70e5b-e8cf29c8-9c04-001e0b75d2d4/86_Redhat_as5_Backup/86_Redhat_as5_Backup.vmx
2) /vmfs/volumes/48d70e5b-e8cf29c8-9c04-001e0b75d2d4/87_Window2003/87_Window2003.vmx
3) /vmfs/volumes/48ad2ec3-02689de1-a7a0-001e0b75d2d6/86_KT_LocalMachine/86_KT_LocalMachine.vmx
4) /vmfs/volumes/48d70e5b-e8cf29c8-9c04-001e0b75d2d4/88_windowsXP_sp3/88_windowsXP_sp3.vmx
Found 4 VMs available to restore
select VM to restore [1 - 4] or 'q' to quit: 1 ########恢复第一台机器
Available VMDKs to restore:
----------------------------------------
1) /vmfs/volumes/48d70e5b-e8cf29c8-9c04-001e0b75d2d4/86_Redhat_as5_Backup/86_Redhat_as5_Backup.vmdk
select VMDK to restore [1 - 1 ]: 1
1) /vmfs/volumes/storage1 ------> [VMFS UUID: 48d70e5b-c460124a-d14c-001e0b75d2d4]
2) /vmfs/volumes/EMC_Lun ------> [VMFS UUID: 48ad2ec3-02689de1-a7a0-001e0b75d2d6]
3) /vmfs/volumes/Lun1 ------> [VMFS UUID: 48fc24ca-b04e7806-ed47-001e0b75d2d6]
4) /vmfs/volumes/Lun2 ------> [VMFS UUID: 48d6fbae-ba787635-6de1-001f29579480]
select VMFS DataStore to restore to [1 - 4] : 2
########还原的磁盘文件保存在哪?...这部尤其重要,还原出来的文件不能保存在相同的LUN上
Enter the directory to restore to: reconver_redhat
########还原的磁盘文件保存的位置—文件夹—该文件夹不允许为已经存在的目录
/vmfs/volumes/EMC_Lun/reconver_redhat created successfully.
Enter the file name to restore to: [ex: recovered.vmdk]: reconver_rehat.vmdk
########还原出来的磁盘文件的名字,随便改.
restoring VM: /vmfs/volumes/48d70e5b-e8cf29c8-9c04-001e0b75d2d4/86_Redhat_as5_Backup/86_Redhat_as5_Backup.vmx
Disk: /vmfs/volumes/48d70e5b-e8cf29c8-9c04-001e0b75d2d4/86_Redhat_as5_Backup/86_Redhat_as5_Backup.vmdk
to : /vmfs/volumes/EMC_Lun/reconver_redhat/reconver_rehat.vmdk
[>======================100%======================]
Restored Successfully ########还原完成. 这时候可以新建虚拟机, 使用现有的磁盘文件即可.
个人看法, 该磁盘文件备份手法确实是狠! 备份磁盘文件非常快速,并且保存出来的文件非常的小..
狠的第2个地方,备份后, 无论原来的磁盘文件怎么删除/破坏, 都可以完全还原!
狠的第3个地方,操作十分方便!
阅读(1312) | 评论(0) | 转发(0) |