Performing incremental indexing of image backups
Techniques described herein relate to a method for performing backups of virtual machines on a host. The method includes obtaining an incremental image backup generation request associated with a virtual machine (VM) of the host; obtaining current file system metadata associated with the VM; obtaining previous backup metadata associated with the VM; generating updated file system metadata that includes status indicators associated with each file by comparing the current file system metadata with the previous backup metadata; obtaining a list of changed data blocks associated with the VM; writing changed data blocks associated with the VM to a backup storage; generating incremental backup metadata by associating portions of the updated file system metadata with each changed data block in the list of the changed data blocks; and writing the incremental backup metadata with the changed data blocks in the backup storage.
1 . A method for performing backups of virtual machines on a host, comprising:
obtaining, by a data protection agent of the host, an incremental image backup generation request associated with a virtual machine (VM) of the host from a data protection manager;
in response to obtaining the incremental image backup generation request:
obtaining current file system metadata associated with the VM from a file system metadata repository stored on a storage of the host, wherein for each file of the system repository, the current file system metadata comprises:
a current file identifier associated with the file;
a current file size associated with the file;
a current VM identifier associated with the file;
a current parent file identifier associated with the file; and
at least one current data run associated with the file;
obtaining previous backup metadata associated with the previous backup of the VM, wherein for each file of the system repository, the previous backup metadata comprises:
a previous file identifier associated with the file;
a previous file size associated with the file;
a previous VM identifier associated with the file;
a previous parent file identifier associated with the file; and
at least one previous data run associated with the file;
generating updated file system metadata that includes status indicators associated with each file in the current file system by comparing the at least one current data run associated with the file of the current file system metadata with at least one previous data run associated with the file of the previous backup metadata, wherein the status indicators specify whether a file is new, modified, deleted, or unmodified since the previous backup was generated;
obtaining a list of changed data blocks associated with the VM;
writing changed data blocks included in a storage volume associated with the VM to a backup storage using the updated file system metadata;
generating incremental backup metadata by associating portions of the updated file system metadata with each changed data block in the list of the changed data blocks; and
writing the incremental backup metadata with the changed data blocks in the backup storage to generate an incremental image backup, wherein the incremental backup metadata is used to perform indexing of the changed data blocks.
2 . The method of claim 1 , wherein the host comprises a Hyper-V hypervisor.
3 . The method of claim 1 , wherein the previous backup metadata comprises file system metadata associated with a point in time that the previous backup was generated.
4 . The method of claim 1 , wherein the previous backup comprises one selected from a group consisting of:
a full image backup; and
a virtual synthetic full image backup.
5 . A non-transitory computer readable medium comprising computer readable program code, which when executed by a computer processor enables the computer processor to perform a method for performing backups of virtual machines on a host, the method comprising:
obtaining, by a data protection agent of the host, an incremental image backup generation request associated with a virtual machine (VM) of the host from a data protection manager;
in response to obtaining the incremental image backup generation request:
obtaining current file system metadata associated with the VM from a file system metadata repository stored on a storage of the host, wherein for each file of the system repository, the current file system metadata comprises:
a current file identifier associated with the file;
a current file size associated with the file;
a current VM identifier associated with the file;
a current parent file identifier associated with the file; and
at least one current data run associated with the file;
obtaining previous backup metadata associated with the previous backup of the VM, wherein for each file of the system repository, the previous backup metadata comprises:
a previous file identifier associated with the file;
a previous file size associated with the file;
a previous VM identifier associated with the file;
a previous parent file identifier associated with the file; and
at least one previous data run associated with the file;
generating updated file system metadata that includes status indicators associated with each file in the current file system by comparing the at least one current data run associated with the file of the current file system metadata with at least one previous data run associated with the file of the previous backup metadata, wherein the status indicators specify whether a file is new, modified, deleted, or unmodified since the previous backup was generated;
obtaining a list of changed data blocks associated with the VM;
writing changed data blocks included in a storage volume associated with the VM to a backup storage using the updated file system metadata;
generating incremental backup metadata by associating portions of the updated file system metadata with each changed data block in the list of the changed data blocks; and
writing the incremental backup metadata with the changed data blocks in the backup storage to generate an incremental image backup, wherein the incremental backup metadata is used to perform indexing of the changed data blocks.
6 . The non-transitory computer readable medium of claim 5 , wherein the host comprises a Hyper-V hypervisor.
7 . The non-transitory computer readable medium of claim 5 , wherein the previous backup metadata comprises file system metadata associated with a point in time that the previous backup was generated.
8 . The non-transitory computer readable medium of claim 5 , wherein the previous backup comprises one selected from a group consisting of:
a full image backup; and
a virtual synthetic full image backup.
9 . A system for performing backups of virtual machines on a host, comprising:
a host; and
a data protection agent of the host, comprising a processor and memory, which when executed by the processor performs a method comprising:
obtaining, by the data protection agent, an incremental image backup generation request associated with a virtual machine (VM) of the host from a data protection manager;
in response to obtaining the incremental image backup generation request:
obtaining current file system metadata associated with the VM from a file system metadata repository stored on a storage of the host, wherein for each file of the system repository, the current file system metadata comprises:
a current file identifier associated with the file;
a current file size associated with the file;
a current VM identifier associated with the file;
a current parent file identifier associated with the file; and
at least one current data run associated with the file;
obtaining previous backup metadata associated with the previous backup of the VM, wherein for each file of the system repository, the previous backup metadata comprises:
a previous file identifier associated with the file;
a previous file size associated with the file;
a previous VM identifier associated with the file;
a previous parent file identifier associated with the file; and
at least one previous data run associated with the file;
generating updated file system metadata that includes status indicators associated with each file in the current file system by comparing the at least one current data run associated with the file of the current file system metadata with at least one previous data run associated with the file of the previous backup metadata, wherein the status indicators specify whether a file is new, modified, deleted, or unmodified since the previous backup was generated;
obtaining a list of changed data blocks associated with the VM;
writing changed data blocks included in a storage volume associated with the VM to a backup storage using the updated file system metadata;
generating incremental backup metadata by associating portions of the updated file system metadata with each changed data block in the list of the changed data blocks; and
writing the incremental backup metadata with the changed data blocks in the backup storage to generate an incremental image backup, wherein the incremental backup metadata is used to perform indexing of the changed data blocks.
10 . The system of claim 9 , wherein the host comprises a Hyper-V hypervisor.
11 . The system of claim 9 , wherein the previous backup metadata comprises file system metadata associated with a point in time that the previous backup was generated.