lab003 virtual infrastructure in production: backup and...

Post on 27-Mar-2020

0 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

LAB003Virtual Infrastructure

in Production: Backup and

Disaster RecoveryTobin Edwards

Curtis Pope

Special thanks to…

IBM for supplying hardware

Altiris for supplying Deployment Server

This presentation may contain VMware confidential information.

Copyright © 2005 VMware, Inc. All rights reserved. All other marks and names mentioned herein may be trademarks

of their respective companies.

Today’s Agenda

GoalsConceptsLab proceduresGet started with lab…

Goals

Today you will:Back up a running virtual machine from Service Console

ManuallyUsing vmsnap.pl

Restore a virtual machine from Service ConsoleManuallyUsing vmres.pl

Archive snapshots to remote server

Backup Strategies for Virtual Machines

VMVM

Backup Agent

VMVM

Backup Agent

VMVM

Backup Agent Backup

ServerB.vmdk

A.vmdk

VMFS VolumeVMFS Volume

From Guest OS From Service Console

Export to Export to archive archive mediummedium

Comparing Backup Strategies

Agents not requiredAgents installed in each VM

Can boot from restored imageRestore requires running VM

Best for system imageBest for application data

VM may be powered on or offBackup only from running VM

Full disk image onlyIncremental/differential backup

From Service ConsoleFrom Guest OS

Virtual Machine Backups from Service Console

Virtual machines are encapsulated in files:/home/vmware/vm_name

vm_name.vmxnvramvmware.log

/vmfs/<volume>virtual_disk_name.vmdkvirtual_disk_name.vmdk.REDOvirtual_disk_name.vmss

Backing Up a Virtual Machine

When virtual machine is powered off…1. Copy configuration & log files2. Export virtual disks

When virtual machine is powered on…1. Copy configuration & log files2. Add REDO logs to virtual disks3. Export virtual disks4. Commit REDO logs

Restoring a Virtual Machine

1. Delete old virtual machine from disk2. Restore configuration & log files3. Import virtual disks4. Register virtual machine5. Power it on

Exporting Virtual Disks

Use vmkfstools in Service ConsoleResults in multiple files each < 2GB

VMFS VolumeVMFS Volume

A.vmdk Exported virtual disk

Adding REDO Log Files

Cannot export an active virtual disk

VMFS VolumeVMFS Volume

A.vmdkDevice is busy!Device is busy!VM writes VM writes

to diskto disk

Adding REDO Log Files

Cannot export an active virtual diskMust first add REDO log file

VMFS VolumeVMFS Volume

Now we can Now we can export base diskexport base disk

Exported virtual disk

VM writes VM writes to diskto disk

A.vmdk

A.vmdk.REDO

Committing REDO Log Files

Add a second REDO before committing first onePrevents delays while committing first REDO

VMFS VolumeVMFS Volume

A.vmdk

A.vmdk.REDO

A.vmdk.REDO.REDO

Commit first Commit first REDO log fileREDO log file

VM writes VM writes to diskto disk

Committing REDO Log Files

Committing second REDO is quickGuest OS sees < 1 sec delay if any

VMFS VolumeVMFS Volume

A.vmdk

A.vmdk.REDOCommit second Commit second REDO log fileREDO log file

VM writes VM writes to diskto disk

Committing REDO Log Files

Virtual disk restored to persistent mode

VMFS VolumeVMFS Volume

A.vmdk

VM writes VM writes to diskto disk

Scripts Used in Lab

vmAddRedo.plvmCommit.plvmsnap.plvmres.pl

Note: the scripts used in this lab are from ESX 2.5.2,earlier versions may behave differently

Scripts Used in Lab

vmAddRedo.plAdds REDO log to virtual diskUseful as pre-command for backup agent

vmCommit.plAdds second REDO log to virtual diskCommits first REDOCommits second REDOUseful as post-command for backup agent

Scripts Used in Lab

vmsnap.plPerforms end-to-end snapshot of running virtual machine

Copies virtual machine configuration and log filesAdds REDO log to virtual disksExports virtual disksAdds second REDO log to virtual disksCommits first REDO Commits second REDO

Scripts Used in Lab

vmres.plRestores virtual machine from vmsnap backup image

Restores configuration and log filesImports virtual disksRegisters virtual machine(Optionally) Powers on virtual machine

Archiving Options

Three approaches to archivingSecure Copy (scp)Network File System (NFS)Samba

Archiving Options

Secure Copy (scp)Utilizes sshConsumes more CPUTwo-step process can take longerRequires local storage for stagingTrusted authentication recommendedSee Lab Manual - Appendix C

Archiving Options

Network File System (NFS)Used with NAS and unix file serversNo local-storage staging requiredData transfer is unencrypted

Archiving Options

SambaUsed with NAS and Windows file serversNo local-storage staging requiredData transfer is unencrypted

Lab Procedures

1. Preparation2. Backup virtual machine manually3. Restore virtual machine manually4. Backup / Restore to local storage5. Backup / Restore to remote storage

a. Secure Copy (scp)b. NFSc. Samba

Lab Manual FTP SiteVMworld Hands-on Lab Manuals are available on-line.

site: ftp.vmwarealliances.com/pub/vmworld05user: anonymouspass: <your email address>

file: vmworld.05.lab.manuals.v1.zip

Let’s get started…

top related