+ All Categories
Home > Documents > LAB003 Virtual Infrastructure in Production: Backup and...

LAB003 Virtual Infrastructure in Production: Backup and...

Date post: 27-Mar-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
27
LAB003 Virtual Infrastructure in Production: Backup and Disaster Recovery Tobin Edwards Curtis Pope
Transcript
Page 1: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

LAB003Virtual Infrastructure

in Production: Backup and

Disaster RecoveryTobin Edwards

Curtis Pope

Page 2: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

Special thanks to…

IBM for supplying hardware

Altiris for supplying Deployment Server

Page 3: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

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.

Page 4: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

Today’s Agenda

GoalsConceptsLab proceduresGet started with lab…

Page 5: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

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

Page 6: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

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

Page 7: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

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

Page 8: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

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

Page 9: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

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

Page 10: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

Restoring a Virtual Machine

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

Page 11: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

Exporting Virtual Disks

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

VMFS VolumeVMFS Volume

A.vmdk Exported virtual disk

Page 12: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

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

Page 13: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

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

Page 14: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

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

Page 15: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

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

Page 16: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

Committing REDO Log Files

Virtual disk restored to persistent mode

VMFS VolumeVMFS Volume

A.vmdk

VM writes VM writes to diskto disk

Page 17: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

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

Page 18: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

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

Page 19: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

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

Page 20: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

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

Page 21: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

Archiving Options

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

Page 22: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

Archiving Options

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

Page 23: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

Archiving Options

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

Page 24: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

Archiving Options

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

Page 25: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

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

Page 26: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

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

Page 27: LAB003 Virtual Infrastructure in Production: Backup and ...download3.vmware.com/vmworld/2005/lab003.pdf · Adds REDO log to virtual disk Useful as pre-command for backup agent vmCommit.pl

Let’s get started…


Recommended