bseltz-cohesity / scripts

Cohesity REST API examples in PowerShell and Python
Apache License 2.0
102 stars 41 forks source link

backupValidationTest unable to find file #110

Closed pandaflourishingfish closed 1 year ago

pandaflourishingfish commented 1 year ago

I am having an issue with the backupValidationTest script. I grabbed the script and edited for my environment. When I run the script, it says "connected" and creates the Temp directory, but is never able to find the file I tell it to look for. If I manually go into Cohesity and search for that same file name, I can see the file I want. I'm running this in Windows PowerShell 5.1 against Cohesity 6.8.1_u3 and the file I"m looking for is on a Windows 2022 Core VM.

PS C:\Scripts> .\backupValidationTest.ps1
Connected!
getting testfile.txt from VM-Test1...no files found
getting testfile2.txt from VM-Test2...no files found

Server     Validation   BackupAgeHours SLA
------     ----------   -------------- ---
VM-Test1 Check Failed N/A            N/A
VM-Test2 Check Failed N/A            N/A
bseltz-cohesity commented 1 year ago

Wow that script is really old I'm going to have to retire it or re-write it. I also have these more current scripts: https://github.com/bseltz-cohesity/scripts/tree/master/powershell/validateVMBackups, https://github.com/bseltz-cohesity/scripts/tree/master/powershell/validateServerBackup

pandaflourishingfish commented 1 year ago

I never thought to look at the date, oops. I can confirm that the other scripts you mentioned do work, I was just hoping to use the backup validation script because I could prove I was able to extract a file from the backup. If the others do the same and just do it in the background, that's fine with me.

bseltz-cohesity commented 1 year ago

Not quite the same. I will work on modernizing this script.