Skip to content

Commit

Permalink
Veeam: set backed_volumes for each backup (#9898)
Browse files Browse the repository at this point in the history
  • Loading branch information
weizhouapache authored Feb 18, 2025
1 parent 6a3314c commit 21b5e4d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import com.cloud.hypervisor.vmware.VmwareDatacenterZoneMap;
import com.cloud.dc.dao.VmwareDatacenterDao;
import com.cloud.hypervisor.vmware.dao.VmwareDatacenterZoneMapDao;
import com.cloud.storage.dao.VolumeDao;
import com.cloud.user.User;
import com.cloud.utils.Pair;
import com.cloud.utils.component.AdapterBase;
Expand Down Expand Up @@ -109,6 +110,8 @@ public class VeeamBackupProvider extends AdapterBase implements BackupProvider,
private AgentManager agentMgr;
@Inject
private VirtualMachineManager virtualMachineManager;
@Inject
private VolumeDao volumeDao;

protected VeeamClient getClient(final Long zoneId) {
try {
Expand Down Expand Up @@ -378,6 +381,7 @@ public void doInTransactionWithoutResult(TransactionStatus status) {
backup.setAccountId(vm.getAccountId());
backup.setDomainId(vm.getDomainId());
backup.setZoneId(vm.getDataCenterId());
backup.setBackedUpVolumes(BackupManagerImpl.createVolumeInfoFromVolumes(volumeDao.findByInstance(vm.getId())));

logger.debug("Creating a new entry in backups: [id: {}, uuid: {}, name: {}, vm_id: {}, external_id: {}, type: {}, date: {}, backup_offering_id: {}, account_id: {}, "
+ "domain_id: {}, zone_id: {}].", backup.getId(), backup.getUuid(), backup.getName(), backup.getVmId(), backup.getExternalId(), backup.getType(), backup.getDate(), backup.getBackupOfferingId(), backup.getAccountId(), backup.getDomainId(), backup.getZoneId());
Expand Down

0 comments on commit 21b5e4d

Please sign in to comment.