PowerShell script exchange
Post Reply
Sindhuja
Influencer
Posts: 21
Liked: never
Joined: Jan 22, 2018 11:01 pm
Full Name: Sindhuja Balasubramanian
Contact:

Backup Storage - Is attribute "Id" not unique?

Post by Sindhuja »

Hello All,

I am working on backup reporting, when notice that Backup Storage "Id" does not uniquely identify the storage file!

Usecase:
Using Powershell Cmdlets, retrieve past 5 days of backups and their related storage information on 9-Apr-2018 and 10-Apr-2018 subsequently.
Expected Result:
Powershell Cmdlets should return exactly the same information (backup storage id, file path , creation time) for the overlapped 4 days.
Actual Result:
Same Backup Storage Id has different CreationTime and FilePath on 9-Apr-2018 and 10-Apr-2018.

Code: Select all

# Get backups of a job
$backup = Get-VBRBackup | ? {$_.JobId -eq 'a939cf44-f13d-49b9-b0b0-5c776d2661ad'}

# Get backup storage details from the backup. Here, I am just filtering on the backup storage id which has the issue.
# In the actual code, the filtering happens based on the CreationTime.
$backup.GetAllStorages() | ? {($_.Id -eq 'f5900c66-0c08-42b3-9812-9a10035a73ce') -or ($_.Id -eq '84ac452d-e940-4d87-bf8c-0fadab600494')}
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# When the above code is executed on 9-Apr-2018, below result is obtained.
Info                    : Veeam.Backup.Model.CStorageInfo
Id                      : 84ac452d-e940-4d87-bf8c-0fadab600494
FilePath                : \\nas01.corp\Veeam_Agent_Backups\VeeamAgentUserfec31b42-5380-6a44-6975-6af42d5cf257\dc02 Agent Backup Policy 2 - dc02\dc02 
                          Agent Backup Policy 2_2018-04-07T000009.vib
BackupId                : 124b464f-4b0e-4478-8ae6-7194a64eaef0
CreationTime            : 4/7/2018 12:00:09 AM
IsAvailable             : True
HasVbk                  : False
.....
Info                    : Veeam.Backup.Model.CStorageInfo
Id                      : f5900c66-0c08-42b3-9812-9a10035a73ce
FilePath                : \\nas01.corp\Veeam_Agent_Backups\VeeamAgentUserfec31b42-5380-6a44-6975-6af42d5cf257\dc02 Agent Backup Policy 2 - dc02\dc02 
                          Agent Backup Policy 2_2018-04-06T060009.vbk
BackupId                : 124b464f-4b0e-4478-8ae6-7194a64eaef0
CreationTime            : 4/6/2018 6:00:09 AM
IsAvailable             : True
HasVbk                  : True
.....
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# When the same code is executed on 10-Apr-2018, below result is obtained (only one item is found, with a different CreationTime and FilePath)
Info                    : Veeam.Backup.Model.CStorageInfo
Id                      : f5900c66-0c08-42b3-9812-9a10035a73ce
FilePath                : \\nas01.corp\Veeam_Agent_Backups\VeeamAgentUserfec31b42-5380-6a44-6975-6af42d5cf257\dc02 Agent Backup Policy 2 - dc02\dc02 
                          Agent Backup Policy 2_2018-04-07T000009.vbk
BackupId                : 124b464f-4b0e-4478-8ae6-7194a64eaef0
CreationTime            : 4/7/2018 12:00:09 AM
IsAvailable             : True
HasVbk                  : True
...
You can see that Backup Storage information (FilePath and CreationTime) for "f5900c66-0c08-42b3-9812-9a10035a73ce" Id is different on 9-Apr-2018 and 10-Apr-2018.

Questions:
Isn't 'Id' used to uniquely identify the backup storage file?
Is this a known issue?

So far, I see this issue for a job with the job type as "Linux Agent Policy" in VBR 9.5 Console.

Any help regarding this is greatly appreciated.

Regards,
Sindhuja
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Backup Storage - Is attribute "Id" not unique?

Post by veremin »

Are you using forward forever incremental mode by any chance? The one implies a regular transformation of the oldest restore point - full backup. Thanks.
Sindhuja
Influencer
Posts: 21
Liked: never
Joined: Jan 22, 2018 11:01 pm
Full Name: Sindhuja Balasubramanian
Contact:

Re: Backup Storage - Is attribute "Id" not unique?

Post by Sindhuja »

Thanks for pointing me to "forward forever incremental".
But for some reason I can't see these settings in this job (Linux Agent Policy - type).
Edit -> Storage -> Advanced -> Here I see only Storage and Scripts tab.

Is all the jobs of "Linux Agent Policy" by default configured to "forward incremental"?

I see that "*.vib" files are rolled up to "*.vdk" consistently and the older files are deleted.
Concern here is, why are we changing the value of "Id" attribute - isn't this supposed to be unique?

Most scripts use "Id" attribute to pullout and verify their data.
Do you suggest not to use "Id" for retrieving backup storage details?

Regards,
Sindhuja
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Backup Storage - Is attribute "Id" not unique?

Post by veremin »

Is all the jobs of "Linux Agent Policy" by default configured to "forward incremental"?
Correct.
Concern here is, why are we changing the value of "Id" attribute - isn't this supposed to be unique?
Could you elaborate on what restore point are talking about? Because the oldest one (the one being transformed regularly) preserves its ID - f5900c66-0c08-42b3-9812-9a10035a73ce.

Thanks.
tsightler
VP, Product Management
Posts: 6009
Liked: 2843 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: Backup Storage - Is attribute "Id" not unique?

Post by tsightler »

Sindhuja wrote:I see that "*.vib" files are rolled up to "*.vdk" consistently and the older files are deleted.
Concern here is, why are we changing the value of "Id" attribute - isn't this supposed to be unique?
The thing is, the VBK really is the same file, it's just had some changes written to it (the blocks from the VIB file that was deleted) and been renamed to reflect the newer date, but it's still the very same file, thus the same ID.
Sindhuja
Influencer
Posts: 21
Liked: never
Joined: Jan 22, 2018 11:01 pm
Full Name: Sindhuja Balasubramanian
Contact:

Re: Backup Storage - Is attribute "Id" not unique?

Post by Sindhuja »

Thank you all for your responses.
Yes, after analyzing few days of data, I find that *.vdk file maintains its "Id".

While, it was kind of strange when I first saw,
"dc02 Agent Backup Policy 2_2018-04-07T000009.vib" file had '84ac452d-e940-4d87-bf8c-0fadab600494' Id on 9-Apr,
"dc02 Agent Backup Policy 2_2018-04-07T000009.vbk" file had 'f5900c66-0c08-42b3-9812-9a10035a73ce' Id on 10-Apr - and '84ac452d-e940-4d87-bf8c-0fadab600494' Id is not found!

The confusion was that the creation time for both the files were same on both 9-Apr and 10-Apr. So, it kind of indicates that the Id has been changed when the file is updated (with extension).

It would have been better, if we actually had created another "Id" for the new *.vdk file updated with correct creation date (when this new file got created), rather than reusing the same "Id".

To resolve issues at our end, I have found a workaround by not using the "Id" for now.

Regards,
Sindhuja
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Backup Storage - Is attribute "Id" not unique?

Post by veremin »

It would have been better, if we actually had created another "Id" for the new *.vdk file updated with correct creation date (when this new file got created), rather than reusing the same "Id".
As Tom's said, it's still the very same backup file, thus, the ID stays the same even after backup file transformation.

Anyway, good to know that we've clarified your confusion.

Thanks.
Sindhuja
Influencer
Posts: 21
Liked: never
Joined: Jan 22, 2018 11:01 pm
Full Name: Sindhuja Balasubramanian
Contact:

Re: Backup Storage - Is attribute "Id" not unique?

Post by Sindhuja »

Thank you!
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests