12.07.2015 Views

Committing REDO Log Files - VMware

Committing REDO Log Files - VMware

Committing REDO Log Files - VMware

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

LAB003Virtual Infrastructurein Production:Backup andDisaster RecoveryTobin EdwardsCurtis Pope


Special thanks to…IBM for supplying hardwareAltiris for supplying Deployment Server


This presentation may contain<strong>VMware</strong> confidential information.Copyright © 2005 <strong>VMware</strong>, Inc. All rights reserved.All other marks and names mentioned herein may be trademarksof their respective companies.


Today’s Agenda• Goals• Concepts• Lab procedures• Get started with lab…


GoalsToday you will:• Back up a running virtual machine from ServiceConsole• Manually• Using vmsnap.pl• Restore a virtual machine from Service Console• Manually• Using vmres.pl• Archive snapshots to remote server


Backup Strategies for Virtual MachinesFrom Guest OSFrom Service ConsoleBackupAgentBackupAgentVMBackupAgentVMVMBackupServerA.vmdkB.vmdkExport toarchivemediumVMFS Volume


Comparing Backup StrategiesFrom Guest OSFrom Service ConsoleIncremental/differential backupFull disk image onlyBackup only from running VMVM may be powered on or offRestore requires running VMCan boot from restored imageAgents installed in each VMAgents not requiredBest for application dataBest for system image


Virtual Machine Backups from ServiceConsoleVirtual machines are encapsulated in files:• /home/vmware/vm_name• vm_name.vmx• nvram• vmware.log• /vmfs/• virtual_disk_name.vmdk• virtual_disk_name.vmdk.<strong>REDO</strong>• virtual_disk_name.vmss


Backing Up a Virtual MachineWhen virtual machine is powered off…1. Copy configuration & log files2. Export virtual disksWhen virtual machine is powered on…1. Copy configuration & log files2. Add <strong>REDO</strong> logs to virtual disks3. Export virtual disks4. Commit <strong>REDO</strong> logs


Restoring a Virtual Machine1. 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 Console• Results in multiple files each < 2GBA.vmdkExportedvirtual diskVMFS Volume


Adding <strong>REDO</strong> <strong>Log</strong> <strong>Files</strong>• Cannot export an active virtual diskVM writesto diskA.vmdkDevice is busy!VMFS Volume


Adding <strong>REDO</strong> <strong>Log</strong> <strong>Files</strong>• Cannot export an active virtual disk• Must first add <strong>REDO</strong> log fileVM writesto diskA.vmdk.<strong>REDO</strong>A.vmdkNow we canexport base diskExportedvirtual diskVMFS Volume


<strong>Committing</strong> <strong>REDO</strong> <strong>Log</strong> <strong>Files</strong>• Add a second <strong>REDO</strong> before committing first one• Prevents delays while committing first <strong>REDO</strong>VM writesto diskA.vmdk.<strong>REDO</strong>.<strong>REDO</strong>A.vmdk.<strong>REDO</strong>A.vmdkCommit first<strong>REDO</strong> log fileVMFS Volume


<strong>Committing</strong> <strong>REDO</strong> <strong>Log</strong> <strong>Files</strong>• <strong>Committing</strong> second <strong>REDO</strong> is quick• Guest OS sees < 1 sec delay if anyVM writesto diskA.vmdk.<strong>REDO</strong>Commit second<strong>REDO</strong> log fileA.vmdkVMFS Volume


<strong>Committing</strong> <strong>REDO</strong> <strong>Log</strong> <strong>Files</strong>• Virtual disk restored to persistent modeVM writesto diskA.vmdkVMFS Volume


Scripts Used in LabvmAddRedo.plvmCommit.plvmsnap.plvmres.plNote: the scripts used in this lab are from ESX 2.5.2,earlier versions may behave differently


Scripts Used in LabvmAddRedo.pl• Adds <strong>REDO</strong> log to virtual disk• Useful as pre-command for backup agentvmCommit.pl• Adds second <strong>REDO</strong> log to virtual disk• Commits first <strong>REDO</strong>• Commits second <strong>REDO</strong>• Useful as post-command for backup agent


Scripts Used in Labvmsnap.pl• Performs end-to-end snapshot of runningvirtual machine• Copies virtual machine configuration and log files• Adds <strong>REDO</strong> log to virtual disks• Exports virtual disks• Adds second <strong>REDO</strong> log to virtual disks• Commits first <strong>REDO</strong>• Commits second <strong>REDO</strong>


Scripts Used in Labvmres.pl• Restores virtual machine from vmsnap backupimage• Restores configuration and log files• Imports virtual disks• Registers virtual machine• (Optionally) Powers on virtual machine


Archiving OptionsThree approaches to archiving• Secure Copy (scp)• Network File System (NFS)• Samba


Archiving OptionsSecure Copy (scp)• Utilizes ssh• Consumes more CPU• Two-step process can take longer• Requires local storage for staging• Trusted authentication recommendedSee Lab Manual - Appendix C


Archiving OptionsNetwork File System (NFS)• Used with NAS and unix file servers• No local-storage staging required• Data transfer is unencrypted


Archiving OptionsSamba• Used with NAS and Windows file servers• No local-storage staging required• Data transfer is unencrypted


Lab Procedures1. Preparation2. Backup virtual machine manually3. Restore virtual machine manually4. Backup / Restore to local storage5. Backup / Restore to remote storagea. Secure Copy (scp)b. NFSc. Samba


Lab Manual FTP SiteVMworld Hands-on Lab Manuals areavailable on-line.site: ftp.vmwarealliances.com/pub/vmworld05user: anonymouspass: file:vmworld.05.lab.manuals.v1.zip


Let’s get started…

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!