SlideShare ist ein Scribd-Unternehmen logo
1 von 30
Downloaden Sie, um offline zu lesen
Vmbkp: An Online Backup Tool
   for VMware vSphere
          Oct 15, 2010
        HOSHINO Takashi
        Cybozu Labs, Inc.

                               1
What is Vmbkp?
• Backup software for Virtual Machines
  in VMware vSphere environment
   –   Online full/differential/incremental backup
   –   Multi-generation backup management
   –   Efficient archive access with sequential IO and reverse diff.
   –   Command-line I/F for scheduling by Cron




                                                                       2
Supported platform
• VMware vSphere 4
  – vCenter server managing several ESX(i)s
  – Single ESX(i) (not tested)
  – Free ESXi is not supported (snapshot fails)


• Backup server
  – Linux on x86_64 host.
  – CentOS 5.5 64bit is confirmed



                                                  3
Hardware Architecture
                          Control/GetInfo with
                         vSphere Soap Protocol       VMware vSphere
                                                      vCenter Server
         Vmbkp                     LAN
         Server

                                             VMware                  VMware
                                            ESX(i) Host             ESX(i) Host


                                    SAN

                  Data Transfer via SAN
                   with VDDK Protocol

        Backup                               VM             VM             VM
        Storage                            Storage        Storage        Storage

You can use NBD transfer without SAN.                                              4
Commands
• Update:
   – Get and save information of all available VMs
• Backup:
   – Execute backup of the specified vm/group or all
• Restore:
   – Execute restore of the specified archived generation as a new VM
• Check:
   – Check backup archives are valid
• Status:
   – Show status of backup archives



                                                                        5
Commands –cont.
• Destroy:
   – Remove a virtual machine from vSphere environment
• Clean:
   – Delete archives of virtual machines
• List:
   – Get a list of virtual machines satisfying specified conditions
• Help:
   – Show usage




                                                                      6
Workflow
      Backup                    Restore
    Prepare config              Prepare config
   (Register to cron)

  Read config/profiles       Read config/profiles
Get vSphere information      Restore target VMs
  Backup target VMs               Import ovf
Export ovf (without disks)   Add disks to new VM
     Create snapshot          Restore vmdk files
 (Get changed block info)
    Backup vmdk files
     Delete snapshot
  (Delete previous dump)
                                     User task
      Update profiles
                                     Vmbkp task

                                                    7
Configuration files
• Global (required)
   – Global configuration
      •   Backup directory
      •   Number of generations to keep
      •   Vmdkbkp path to backup/restore vmdk files
      •   vSphere authentication information


• Group (optional)
   – Group configuration for convenient use



                                                      8
Layout of Archive Files
• <backup dir>
  – AllVM profile

• <backup dir>/<vm>/
  – VM profile

• <backup dir>/<vm>/<generation>/
  – Generation profile
  – Ovf file for VM configuration
  – Dump/digest/rdiff/bmp files for each vmdk
                                                9
Profiles
• Allvm
   – Information/status of all VMs in the target vSphere environment
   – Updated by update command

• Vm
   – Information/status of archives of a VM
   – Created/updated by backup command and referred by restore
     command

• Generation
   – Information/status of each generation of backup of a VM
   – Created by backup command and referred by restore command


                                                                  10
Software Architecture
          Cron                             User


                  Command-line Interface

                 Backup/Restore Controller

Utility           Soap Wrapper         Vmdkbkp Wrapper
Library               Snapshot
                                         Vmdkbkp: Vmdk
                         Ovf             Backup/Restore
   Bitmap           Changed blocks
 XML (Ovf)                              Tool/Library (C++)
Config/Profile      VI Java Library        VDDK C Library



VMware vSphere         VMware ESX(i)                SAN
 vCenter Server           Host                    Storage
                                                             11
Required Tools and Libraries
• Java SE 1.6
   – Java, Javac, Jar comands
• VI-Java 2.1GA
   – soap wrapper


• G++ 4.4
• Boost 1.43
   – shared_ptr, scoped_array, thread, and iostreams
• VDDK 1.2.0
   – Virtual disk development kit by Vmware


                                                       12
Source Code Overview (Java)
• control/*                       • config/*
   – Command-line I/F                – Config/profile parser and
   – Backup/restore Controller         accessor
   – Vmdkbkp wrapper
                                  • profile/*
• soap/*                             – Semantic-level config/profile
   – Soap (VI-Java) wrapper            managers


• utility/*
   – Utilities for Ovf, Bitmap,
     Command line, etc.

                                                                   13
VmdkBkp (C++ code)
What is VmdkBkp?
• Online backup software
  for remote/local vmdk files
  in VMware vSphere environments.
  – Currently support vSphere version 4.


• Written in C++
• Uses VDDK Library by Vmware
• Used by Vmbkp (java) tool
Archive Files
• Dump/Rdiff
  – VMDK metadata and blocks archive
    without zero-blocks
  – Dump is full archive,
    Rdiff is reverse differential one
  – Dump + Rdiff = Previous dump

• Digest
  – MD5 digest data for all blocks of VMDK
  – Used to check equality of blocks,
    and validate corresponding dump/rdiff files
Supported Commands
• Dump
   – Execute full/differential/incremental dump
• Restore
   – Execute restore with dump/rdiff
• Check
   – Validate dump/rdiff with digest data
• Print
   – Print dump/rdiff/digest for human read
• Digest
   – Make digest from dump
• Merge
   – Make past dump from current dump and past rdiff(s)
How to Backup Remote Vmdk
• Command line:
  – vmdkbkp dump [connect options] --mode [full/diff/incr]
    --vm [vm moref] --snapshot [snapshot moref]
    --remote [disk path]
    --dumpin [previous dump] --dumpout [current dump]
    --digestin [previous digest] --digestout [current digest]
    --bmpin [changed block bitmap]
    --rdiffout [current-previous rdiff]

• Inputs/Outputs:
  – Full: Just --dumpout and --digestout are required
  – Diff: All options except --bmpin are required
  – Incr: All options are required
Full Backup
     VM             Virtual Disk
Configuration         (vmdk)           • Ovf
                       All blocks        – VM configuration data
                                           (without disk information)
         Vmbkp Tool
                                       • Dump
                     Non-zero blocks     – Full data of vmdk
                                           (without zero-blocks)
        Backup files
                                       • Digest
             Dump                        – Digest data of all blocks

       Ovf      Digest

                                                                        19
Differential Backup
     VM            Virtual Disk       • Rdiff
Configuration        (vmdk)
                                             – Reverse difference
                      All blocks               data of vmdk
                                             – Dump’ + Rdiff’ = Dump
         Vmbkp Tool
                                                 • You can delete dump of previous
                                                   generation after current backup
         Non-zero blocks

   Backup files of                   Backup files of
previous generation                current generation

        Dump                         Dump’          Rdiff’


  Ovf     Digest              Ovf’     Digest’
                                                                                20
Incremental Backup
     VM            Virtual Disk       Changed Block
Configuration        (vmdk)            Information

                   Changed blocks
                                       • Changed Block Information
         Vmbkp Tool                          – The set of address of changed
                                               blocks after previous backup
         Non-zero blocks

   Backup files of                  Backup files of
previous generation               current generation

        Dump                         Dump’        Rdiff’


  Ovf     Digest              Ovf’     Digest’
                                                                          21
Vmdk Archives Relationships
                          Write some data on the 1st vm.
          0.vmdk                                            1.vmdk

           Full                                               Full
          dump                                               dump
                                    Diff
                                   dump
          0.dump                                            1.dump
          0.digest                                          1.digest

                                    Incr
                                   dump                     1-0.rdiff

Check the all dump/digest files                            rdiff2bmp
from all possible paths are the same
using check_dump_and_dump and                              1.bitmap
check_digest_and_digest.
Vmdk Archives Relationships –cont.
               Write some data on the 1st vm.
    0.vmdk                                          1.vmdk


    Restore                                         Restore

                        Merge
    0.dump                                          1.dump
    0.digest                                        1.digest


                Restore to 0.dump
                                                   1-0.rdiff
    Digest       Full dump 0.vmdk to 0r.dump
                 Check 0.dump and 0r.dump are the same.
                Merge 1.dump and 1-0.rdiff to 0m.dump
                 Digest 0m.dump to 0m.digest
                 Check 0.{dump,digest} and 0m.{dump.digest} are the same.
Software Architecture of vmdkbkp
                           Command                      Command executor

              Util           Header      Manager        Specific components

           Exception        Serialize    Bitmap         General components


• Command                                 • Manager
   – Parse command-line and execute it        – Manage (1) VDDK connection,
• Util                                          (2) vmdk file access, and (3)
                                                dump/rdiff/digest file access
   – Configuration, Time, etc.
                                          • Serialize
• Header                                     – StringMap/Integers data serializer
   – Manage header/blocks of
     dump/rdiff/digest files              • Bitmap
• Exception                                  – Bitmap data serializer
   – Exceptions and related macros.
VDDK Control with Fork
• Solves the problem that VDDK re-initialization
  for SAN transfer due to SCSI reservation
  conflict error inevitably fails and falls back to
  NBD transfer.




                                                      25
VDDK Control with Fork –cont.
Main process


                                              Provide the same interface
                        VddkController        with Vddk/Vmdk Manager


                      VddkWorker(parent)      Manage processes and
                                              communicate with child


Forked process
                                              Wrapper of Vddk/Vmdk
                       VddkWorker(child)      manager and communicate
                                              with parent


                 VddkManager    VmdkManager
Multi-threaded Archive Manager
• Improves performance with gziped multi-
  stream dump/restore/check/merge
  operations
      Archive Managers       Interface of archive accesses
                             specialized for each command

     Archive IO Managers     Multi-threaded/Single-threaded
                             stream access for each archive file

    DataReader, DataWriter   Worker thread and its controller for
                             Gzip compresson/decompression

           Queue             Thread-safe FIFO

                                                                    27
Restore/Check with MultiArchiveManager


  Archive Manager       Full dump       Rdiff       Rdiff
                                    waiting     waiting




                        Full dump

Multi Archive Manager     Rdiff

                          Rdiff
Restore with SAN
• Problem in restore with SAN
  – Failed auto-allocation for thin vmdk
  – Auto-allocation is too slow for thick vmdk
  – There is no efficient allocation API.


• If zero-block restore with NBD is faster, use it
  as allocation method
  –  not fast…
Future Work
• Improve parallelism
  – Solving SCSI reservation conflict problem
  – Multi-threaded compression
• Restore with SAN
  – Depends on VDDK’s efficient block allocation API




                                                       30

Weitere ähnliche Inhalte

Was ist angesagt?

Visão geral sobre Citrix XenServer 6 - Ferramentas e Licenciamento
Visão geral sobre Citrix XenServer 6 - Ferramentas e LicenciamentoVisão geral sobre Citrix XenServer 6 - Ferramentas e Licenciamento
Visão geral sobre Citrix XenServer 6 - Ferramentas e Licenciamento
Lorscheider Santiago
 
Kvm performance optimization for ubuntu
Kvm performance optimization for ubuntuKvm performance optimization for ubuntu
Kvm performance optimization for ubuntu
Sim Janghoon
 
Virtualization - Kernel Virtual Machine (KVM)
Virtualization - Kernel Virtual Machine (KVM)Virtualization - Kernel Virtual Machine (KVM)
Virtualization - Kernel Virtual Machine (KVM)
Wan Leung Wong
 
S4 xen hypervisor_20080622
S4 xen hypervisor_20080622S4 xen hypervisor_20080622
S4 xen hypervisor_20080622
Todd Deshane
 
12 christian ferber xen_server_advanced
12 christian ferber xen_server_advanced12 christian ferber xen_server_advanced
12 christian ferber xen_server_advanced
Digicomp Academy AG
 
Windsor: Domain 0 Disaggregation for XenServer and XCP
	Windsor: Domain 0 Disaggregation for XenServer and XCP	Windsor: Domain 0 Disaggregation for XenServer and XCP
Windsor: Domain 0 Disaggregation for XenServer and XCP
The Linux Foundation
 
Hyper-V Best Practices & Tips and Tricks
Hyper-V Best Practices & Tips and TricksHyper-V Best Practices & Tips and Tricks
Hyper-V Best Practices & Tips and Tricks
Amit Gatenyo
 
VMware Performance Troubleshooting
VMware Performance TroubleshootingVMware Performance Troubleshooting
VMware Performance Troubleshooting
glbsolutions
 
Building a Distributed Block Storage System on Xen
Building a Distributed Block Storage System on XenBuilding a Distributed Block Storage System on Xen
Building a Distributed Block Storage System on Xen
The Linux Foundation
 
Windows server 2012 failover clustering new features
Windows server 2012 failover clustering new featuresWindows server 2012 failover clustering new features
Windows server 2012 failover clustering new features
Joseph D'Antoni
 

Was ist angesagt? (20)

Configuring and Using the New Virtualization Features in Windows Server 2012
Configuring and Using the New Virtualization Features in Windows Server 2012Configuring and Using the New Virtualization Features in Windows Server 2012
Configuring and Using the New Virtualization Features in Windows Server 2012
 
QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?
 
Hyper V And Scvmm Best Practis
Hyper V And Scvmm Best PractisHyper V And Scvmm Best Practis
Hyper V And Scvmm Best Practis
 
Visão geral sobre Citrix XenServer 6 - Ferramentas e Licenciamento
Visão geral sobre Citrix XenServer 6 - Ferramentas e LicenciamentoVisão geral sobre Citrix XenServer 6 - Ferramentas e Licenciamento
Visão geral sobre Citrix XenServer 6 - Ferramentas e Licenciamento
 
Kvm performance optimization for ubuntu
Kvm performance optimization for ubuntuKvm performance optimization for ubuntu
Kvm performance optimization for ubuntu
 
Virtualization - Kernel Virtual Machine (KVM)
Virtualization - Kernel Virtual Machine (KVM)Virtualization - Kernel Virtual Machine (KVM)
Virtualization - Kernel Virtual Machine (KVM)
 
Dealing with Hardware Heterogeneity Using EmbeddedXEN, a Virtualization Frame...
Dealing with Hardware Heterogeneity Using EmbeddedXEN, a Virtualization Frame...Dealing with Hardware Heterogeneity Using EmbeddedXEN, a Virtualization Frame...
Dealing with Hardware Heterogeneity Using EmbeddedXEN, a Virtualization Frame...
 
S4 xen hypervisor_20080622
S4 xen hypervisor_20080622S4 xen hypervisor_20080622
S4 xen hypervisor_20080622
 
12 christian ferber xen_server_advanced
12 christian ferber xen_server_advanced12 christian ferber xen_server_advanced
12 christian ferber xen_server_advanced
 
The kvm virtualization way
The kvm virtualization wayThe kvm virtualization way
The kvm virtualization way
 
4. v sphere big data extensions hadoop
4. v sphere big data extensions   hadoop4. v sphere big data extensions   hadoop
4. v sphere big data extensions hadoop
 
Windsor: Domain 0 Disaggregation for XenServer and XCP
	Windsor: Domain 0 Disaggregation for XenServer and XCP	Windsor: Domain 0 Disaggregation for XenServer and XCP
Windsor: Domain 0 Disaggregation for XenServer and XCP
 
Hyper-V Best Practices & Tips and Tricks
Hyper-V Best Practices & Tips and TricksHyper-V Best Practices & Tips and Tricks
Hyper-V Best Practices & Tips and Tricks
 
VMware Performance Troubleshooting
VMware Performance TroubleshootingVMware Performance Troubleshooting
VMware Performance Troubleshooting
 
BACD July 2012 : The Xen Cloud Platform
BACD July 2012 : The Xen Cloud Platform BACD July 2012 : The Xen Cloud Platform
BACD July 2012 : The Xen Cloud Platform
 
Building a Distributed Block Storage System on Xen
Building a Distributed Block Storage System on XenBuilding a Distributed Block Storage System on Xen
Building a Distributed Block Storage System on Xen
 
Windows server 2012 failover clustering new features
Windows server 2012 failover clustering new featuresWindows server 2012 failover clustering new features
Windows server 2012 failover clustering new features
 
XCP: The Art of Open Virtualization for the Enterprise and the Cloud
XCP: The Art of Open Virtualization for the Enterprise and the CloudXCP: The Art of Open Virtualization for the Enterprise and the Cloud
XCP: The Art of Open Virtualization for the Enterprise and the Cloud
 
VMware vSphere Performance Troubleshooting
VMware vSphere Performance TroubleshootingVMware vSphere Performance Troubleshooting
VMware vSphere Performance Troubleshooting
 
Virtualization Best Practices-Tips and Tricks From Expert
Virtualization Best Practices-Tips and Tricks From ExpertVirtualization Best Practices-Tips and Tricks From Expert
Virtualization Best Practices-Tips and Tricks From Expert
 

Ähnlich wie Vmbkp: VMware vSphere Incremental Backup Tool

Turning OpenStack Swift into a VM storage platform
Turning OpenStack Swift into a VM storage platformTurning OpenStack Swift into a VM storage platform
Turning OpenStack Swift into a VM storage platform
OpenStack_Online
 
i//:squared Business Continuity Event
i//:squared Business Continuity Eventi//:squared Business Continuity Event
i//:squared Business Continuity Event
Jonathan Allmayer
 
VMware Backups That Work—Lessons Learned From VADP Performance Benchmark Testing
VMware Backups That Work—Lessons Learned From VADP Performance Benchmark TestingVMware Backups That Work—Lessons Learned From VADP Performance Benchmark Testing
VMware Backups That Work—Lessons Learned From VADP Performance Benchmark Testing
Symantec
 
TSM og virtualisering
 TSM og virtualisering TSM og virtualisering
TSM og virtualisering
Solv AS
 
Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0
guest72e8c1
 
V sphere 5.1-storage-features-&-futures
V sphere 5.1-storage-features-&-futuresV sphere 5.1-storage-features-&-futures
V sphere 5.1-storage-features-&-futures
subtitle
 
Presentation oracle rac on vsphere 5
Presentation   oracle rac on vsphere 5Presentation   oracle rac on vsphere 5
Presentation oracle rac on vsphere 5
solarisyourep
 
20 christian ferber xen_server_6_workshop
20 christian ferber xen_server_6_workshop20 christian ferber xen_server_6_workshop
20 christian ferber xen_server_6_workshop
Digicomp Academy AG
 

Ähnlich wie Vmbkp: VMware vSphere Incremental Backup Tool (20)

Veeamvpower
VeeamvpowerVeeamvpower
Veeamvpower
 
Denver VMUG nov 2011
Denver VMUG nov 2011Denver VMUG nov 2011
Denver VMUG nov 2011
 
VMware vSphere Version Comparison 4.0 to 6.5
VMware  vSphere Version Comparison 4.0 to 6.5VMware  vSphere Version Comparison 4.0 to 6.5
VMware vSphere Version Comparison 4.0 to 6.5
 
What’s New in VMware vCenter Site Recovery Manager v5.0
What’s New in VMware vCenter Site Recovery Manager v5.0What’s New in VMware vCenter Site Recovery Manager v5.0
What’s New in VMware vCenter Site Recovery Manager v5.0
 
Turning OpenStack Swift into a VM storage platform
Turning OpenStack Swift into a VM storage platformTurning OpenStack Swift into a VM storage platform
Turning OpenStack Swift into a VM storage platform
 
vSphere
vSpherevSphere
vSphere
 
i//:squared Business Continuity Event
i//:squared Business Continuity Eventi//:squared Business Continuity Event
i//:squared Business Continuity Event
 
VMware Backups That Work—Lessons Learned From VADP Performance Benchmark Testing
VMware Backups That Work—Lessons Learned From VADP Performance Benchmark TestingVMware Backups That Work—Lessons Learned From VADP Performance Benchmark Testing
VMware Backups That Work—Lessons Learned From VADP Performance Benchmark Testing
 
Turning OpenStack Swift into a VM storage platform
Turning OpenStack Swift into a VM storage platformTurning OpenStack Swift into a VM storage platform
Turning OpenStack Swift into a VM storage platform
 
TSM og virtualisering
 TSM og virtualisering TSM og virtualisering
TSM og virtualisering
 
VMUGIT UC 2013 - 06 Mike Laverick
VMUGIT UC 2013 - 06 Mike LaverickVMUGIT UC 2013 - 06 Mike Laverick
VMUGIT UC 2013 - 06 Mike Laverick
 
RMLL / LSM 2009
RMLL / LSM 2009RMLL / LSM 2009
RMLL / LSM 2009
 
Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0
 
A32 Database Virtulization Technologies
A32 Database Virtulization TechnologiesA32 Database Virtulization Technologies
A32 Database Virtulization Technologies
 
Setting up Storage Features in Windows Server 2012
Setting up Storage Features in Windows Server 2012Setting up Storage Features in Windows Server 2012
Setting up Storage Features in Windows Server 2012
 
V sphere 5.1-storage-features-&-futures
V sphere 5.1-storage-features-&-futuresV sphere 5.1-storage-features-&-futures
V sphere 5.1-storage-features-&-futures
 
Presentation oracle rac on vsphere 5
Presentation   oracle rac on vsphere 5Presentation   oracle rac on vsphere 5
Presentation oracle rac on vsphere 5
 
Windows server 8 and hyper v
Windows server 8 and hyper vWindows server 8 and hyper v
Windows server 8 and hyper v
 
20 christian ferber xen_server_6_workshop
20 christian ferber xen_server_6_workshop20 christian ferber xen_server_6_workshop
20 christian ferber xen_server_6_workshop
 
A day in the life of a VSAN I/O - STO7875
A day in the life of a VSAN I/O - STO7875A day in the life of a VSAN I/O - STO7875
A day in the life of a VSAN I/O - STO7875
 

Mehr von Takashi Hoshino

10分で分かるバックアップとレプリケーション
10分で分かるバックアップとレプリケーション10分で分かるバックアップとレプリケーション
10分で分かるバックアップとレプリケーション
Takashi Hoshino
 
10分で分かるLinuxブロックレイヤ
10分で分かるLinuxブロックレイヤ10分で分かるLinuxブロックレイヤ
10分で分かるLinuxブロックレイヤ
Takashi Hoshino
 
10分で分かるデータストレージ
10分で分かるデータストレージ10分で分かるデータストレージ
10分で分かるデータストレージ
Takashi Hoshino
 
Suffix Array 構築方法の紹介
Suffix Array 構築方法の紹介Suffix Array 構築方法の紹介
Suffix Array 構築方法の紹介
Takashi Hoshino
 

Mehr von Takashi Hoshino (20)

Serializabilityとは何か
Serializabilityとは何かSerializabilityとは何か
Serializabilityとは何か
 
Isolation Level について
Isolation Level についてIsolation Level について
Isolation Level について
 
データベースシステムにおける直列化可能性と等価な時刻割り当てルールの提案 rev.3
データベースシステムにおける直列化可能性と等価な時刻割り当てルールの提案 rev.3データベースシステムにおける直列化可能性と等価な時刻割り当てルールの提案 rev.3
データベースシステムにおける直列化可能性と等価な時刻割り当てルールの提案 rev.3
 
WalB Driver Internals
WalB Driver InternalsWalB Driver Internals
WalB Driver Internals
 
トランザクションの並行実行制御 rev.2
トランザクションの並行実行制御 rev.2トランザクションの並行実行制御 rev.2
トランザクションの並行実行制御 rev.2
 
トランザクションの並行処理制御
トランザクションの並行処理制御トランザクションの並行処理制御
トランザクションの並行処理制御
 
Effective Modern C++ 勉強会#8 Item38
Effective Modern C++ 勉強会#8 Item38Effective Modern C++ 勉強会#8 Item38
Effective Modern C++ 勉強会#8 Item38
 
Effective Modern C++ 勉強会#6 Item25
Effective Modern C++ 勉強会#6 Item25Effective Modern C++ 勉強会#6 Item25
Effective Modern C++ 勉強会#6 Item25
 
Effective Modern C++ 勉強会#1 Item3,4
Effective Modern C++ 勉強会#1 Item3,4Effective Modern C++ 勉強会#1 Item3,4
Effective Modern C++ 勉強会#1 Item3,4
 
WALをバックアップとレプリケーションに使う方法
WALをバックアップとレプリケーションに使う方法WALをバックアップとレプリケーションに使う方法
WALをバックアップとレプリケーションに使う方法
 
メモリより大きなデータの Sufix Array 構築方法の紹介
メモリより大きなデータの Sufix Array 構築方法の紹介メモリより大きなデータの Sufix Array 構築方法の紹介
メモリより大きなデータの Sufix Array 構築方法の紹介
 
WalBの紹介
WalBの紹介WalBの紹介
WalBの紹介
 
10分で分かるバックアップとレプリケーション
10分で分かるバックアップとレプリケーション10分で分かるバックアップとレプリケーション
10分で分かるバックアップとレプリケーション
 
10分で分かるLinuxブロックレイヤ
10分で分かるLinuxブロックレイヤ10分で分かるLinuxブロックレイヤ
10分で分かるLinuxブロックレイヤ
 
10分で分かるデータストレージ
10分で分かるデータストレージ10分で分かるデータストレージ
10分で分かるデータストレージ
 
Intel TSX 触ってみた 追加実験 (TTAS)
Intel TSX 触ってみた 追加実験 (TTAS)Intel TSX 触ってみた 追加実験 (TTAS)
Intel TSX 触ってみた 追加実験 (TTAS)
 
Intel TSX HLE を触ってみた x86opti
Intel TSX HLE を触ってみた x86optiIntel TSX HLE を触ってみた x86opti
Intel TSX HLE を触ってみた x86opti
 
Suffix Array 構築方法の紹介
Suffix Array 構築方法の紹介Suffix Array 構築方法の紹介
Suffix Array 構築方法の紹介
 
An Efficient Backup and Replication of Storage
An Efficient Backup and Replication of StorageAn Efficient Backup and Replication of Storage
An Efficient Backup and Replication of Storage
 
ログ先行書き込みを用いたストレージ差分取得の一手法
ログ先行書き込みを用いたストレージ差分取得の一手法ログ先行書き込みを用いたストレージ差分取得の一手法
ログ先行書き込みを用いたストレージ差分取得の一手法
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

Vmbkp: VMware vSphere Incremental Backup Tool

  • 1. Vmbkp: An Online Backup Tool for VMware vSphere Oct 15, 2010 HOSHINO Takashi Cybozu Labs, Inc. 1
  • 2. What is Vmbkp? • Backup software for Virtual Machines in VMware vSphere environment – Online full/differential/incremental backup – Multi-generation backup management – Efficient archive access with sequential IO and reverse diff. – Command-line I/F for scheduling by Cron 2
  • 3. Supported platform • VMware vSphere 4 – vCenter server managing several ESX(i)s – Single ESX(i) (not tested) – Free ESXi is not supported (snapshot fails) • Backup server – Linux on x86_64 host. – CentOS 5.5 64bit is confirmed 3
  • 4. Hardware Architecture Control/GetInfo with vSphere Soap Protocol VMware vSphere vCenter Server Vmbkp LAN Server VMware VMware ESX(i) Host ESX(i) Host SAN Data Transfer via SAN with VDDK Protocol Backup VM VM VM Storage Storage Storage Storage You can use NBD transfer without SAN. 4
  • 5. Commands • Update: – Get and save information of all available VMs • Backup: – Execute backup of the specified vm/group or all • Restore: – Execute restore of the specified archived generation as a new VM • Check: – Check backup archives are valid • Status: – Show status of backup archives 5
  • 6. Commands –cont. • Destroy: – Remove a virtual machine from vSphere environment • Clean: – Delete archives of virtual machines • List: – Get a list of virtual machines satisfying specified conditions • Help: – Show usage 6
  • 7. Workflow Backup Restore Prepare config Prepare config (Register to cron) Read config/profiles Read config/profiles Get vSphere information Restore target VMs Backup target VMs Import ovf Export ovf (without disks) Add disks to new VM Create snapshot Restore vmdk files (Get changed block info) Backup vmdk files Delete snapshot (Delete previous dump) User task Update profiles Vmbkp task 7
  • 8. Configuration files • Global (required) – Global configuration • Backup directory • Number of generations to keep • Vmdkbkp path to backup/restore vmdk files • vSphere authentication information • Group (optional) – Group configuration for convenient use 8
  • 9. Layout of Archive Files • <backup dir> – AllVM profile • <backup dir>/<vm>/ – VM profile • <backup dir>/<vm>/<generation>/ – Generation profile – Ovf file for VM configuration – Dump/digest/rdiff/bmp files for each vmdk 9
  • 10. Profiles • Allvm – Information/status of all VMs in the target vSphere environment – Updated by update command • Vm – Information/status of archives of a VM – Created/updated by backup command and referred by restore command • Generation – Information/status of each generation of backup of a VM – Created by backup command and referred by restore command 10
  • 11. Software Architecture Cron User Command-line Interface Backup/Restore Controller Utility Soap Wrapper Vmdkbkp Wrapper Library Snapshot Vmdkbkp: Vmdk Ovf Backup/Restore Bitmap Changed blocks XML (Ovf) Tool/Library (C++) Config/Profile VI Java Library VDDK C Library VMware vSphere VMware ESX(i) SAN vCenter Server Host Storage 11
  • 12. Required Tools and Libraries • Java SE 1.6 – Java, Javac, Jar comands • VI-Java 2.1GA – soap wrapper • G++ 4.4 • Boost 1.43 – shared_ptr, scoped_array, thread, and iostreams • VDDK 1.2.0 – Virtual disk development kit by Vmware 12
  • 13. Source Code Overview (Java) • control/* • config/* – Command-line I/F – Config/profile parser and – Backup/restore Controller accessor – Vmdkbkp wrapper • profile/* • soap/* – Semantic-level config/profile – Soap (VI-Java) wrapper managers • utility/* – Utilities for Ovf, Bitmap, Command line, etc. 13
  • 15. What is VmdkBkp? • Online backup software for remote/local vmdk files in VMware vSphere environments. – Currently support vSphere version 4. • Written in C++ • Uses VDDK Library by Vmware • Used by Vmbkp (java) tool
  • 16. Archive Files • Dump/Rdiff – VMDK metadata and blocks archive without zero-blocks – Dump is full archive, Rdiff is reverse differential one – Dump + Rdiff = Previous dump • Digest – MD5 digest data for all blocks of VMDK – Used to check equality of blocks, and validate corresponding dump/rdiff files
  • 17. Supported Commands • Dump – Execute full/differential/incremental dump • Restore – Execute restore with dump/rdiff • Check – Validate dump/rdiff with digest data • Print – Print dump/rdiff/digest for human read • Digest – Make digest from dump • Merge – Make past dump from current dump and past rdiff(s)
  • 18. How to Backup Remote Vmdk • Command line: – vmdkbkp dump [connect options] --mode [full/diff/incr] --vm [vm moref] --snapshot [snapshot moref] --remote [disk path] --dumpin [previous dump] --dumpout [current dump] --digestin [previous digest] --digestout [current digest] --bmpin [changed block bitmap] --rdiffout [current-previous rdiff] • Inputs/Outputs: – Full: Just --dumpout and --digestout are required – Diff: All options except --bmpin are required – Incr: All options are required
  • 19. Full Backup VM Virtual Disk Configuration (vmdk) • Ovf All blocks – VM configuration data (without disk information) Vmbkp Tool • Dump Non-zero blocks – Full data of vmdk (without zero-blocks) Backup files • Digest Dump – Digest data of all blocks Ovf Digest 19
  • 20. Differential Backup VM Virtual Disk • Rdiff Configuration (vmdk) – Reverse difference All blocks data of vmdk – Dump’ + Rdiff’ = Dump Vmbkp Tool • You can delete dump of previous generation after current backup Non-zero blocks Backup files of Backup files of previous generation current generation Dump Dump’ Rdiff’ Ovf Digest Ovf’ Digest’ 20
  • 21. Incremental Backup VM Virtual Disk Changed Block Configuration (vmdk) Information Changed blocks • Changed Block Information Vmbkp Tool – The set of address of changed blocks after previous backup Non-zero blocks Backup files of Backup files of previous generation current generation Dump Dump’ Rdiff’ Ovf Digest Ovf’ Digest’ 21
  • 22. Vmdk Archives Relationships Write some data on the 1st vm. 0.vmdk 1.vmdk Full Full dump dump Diff dump 0.dump 1.dump 0.digest 1.digest Incr dump 1-0.rdiff Check the all dump/digest files rdiff2bmp from all possible paths are the same using check_dump_and_dump and 1.bitmap check_digest_and_digest.
  • 23. Vmdk Archives Relationships –cont. Write some data on the 1st vm. 0.vmdk 1.vmdk Restore Restore Merge 0.dump 1.dump 0.digest 1.digest Restore to 0.dump 1-0.rdiff Digest  Full dump 0.vmdk to 0r.dump  Check 0.dump and 0r.dump are the same. Merge 1.dump and 1-0.rdiff to 0m.dump  Digest 0m.dump to 0m.digest  Check 0.{dump,digest} and 0m.{dump.digest} are the same.
  • 24. Software Architecture of vmdkbkp Command Command executor Util Header Manager Specific components Exception Serialize Bitmap General components • Command • Manager – Parse command-line and execute it – Manage (1) VDDK connection, • Util (2) vmdk file access, and (3) dump/rdiff/digest file access – Configuration, Time, etc. • Serialize • Header – StringMap/Integers data serializer – Manage header/blocks of dump/rdiff/digest files • Bitmap • Exception – Bitmap data serializer – Exceptions and related macros.
  • 25. VDDK Control with Fork • Solves the problem that VDDK re-initialization for SAN transfer due to SCSI reservation conflict error inevitably fails and falls back to NBD transfer. 25
  • 26. VDDK Control with Fork –cont. Main process Provide the same interface VddkController with Vddk/Vmdk Manager VddkWorker(parent) Manage processes and communicate with child Forked process Wrapper of Vddk/Vmdk VddkWorker(child) manager and communicate with parent VddkManager VmdkManager
  • 27. Multi-threaded Archive Manager • Improves performance with gziped multi- stream dump/restore/check/merge operations Archive Managers Interface of archive accesses specialized for each command Archive IO Managers Multi-threaded/Single-threaded stream access for each archive file DataReader, DataWriter Worker thread and its controller for Gzip compresson/decompression Queue Thread-safe FIFO 27
  • 28. Restore/Check with MultiArchiveManager Archive Manager Full dump Rdiff Rdiff waiting waiting Full dump Multi Archive Manager Rdiff Rdiff
  • 29. Restore with SAN • Problem in restore with SAN – Failed auto-allocation for thin vmdk – Auto-allocation is too slow for thick vmdk – There is no efficient allocation API. • If zero-block restore with NBD is faster, use it as allocation method –  not fast…
  • 30. Future Work • Improve parallelism – Solving SCSI reservation conflict problem – Multi-threaded compression • Restore with SAN – Depends on VDDK’s efficient block allocation API 30