bseltz-cohesity / scripts

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

Filelist creating multiple restore jobs #168

Closed Sheeba86 closed 2 months ago

Sheeba86 commented 3 months ago

Hi Brian,

When i'm trying to restore multiple files added into text file and restoring, script is creating individual restore jobs instead of updating in single job is this behaviour is expected. Could you please check it.

Script Name: powershell/restoreFiles/restoreFiles.ps1

Command Used .\restorefiles.ps1 -sourceServer server1.local.net -targetServer server2.local.net -jobName backupjob1 -restorePath /app/testrestore/ -taskname testing_filerestore_script -fileList D:\RestoreTesting\filelist.txt

Restore Job Output Recovery Task Start Time Status Duration testing_filerestore_script Jul 3, 2024 6:39am Succeeded 6s 1 Objects

testing_filerestore_script Jul 3, 2024 6:38am Succeeded 6s 1 Objects

testing_filerestore_script Jul 3, 2024 6:38am Succeeded 6s 1 Objects

testing_filerestore_script Jul 3, 2024 6:38am Succeeded 6s 1 Objects

testing_filerestore_script Jul 3, 2024 6:38am Succeeded 6s 1 Objects

testing_filerestore_script Jul 3, 2024 6:38am Succeeded 6s 1 Objects

testing_filerestore_script Jul 3, 2024 6:38am Succeeded 6s 1 Objects

testing_filerestore_script Jul 3, 2024 6:38am Succeeded 6s 1 Objects

bseltz-cohesity commented 3 months ago

Yes this is expected behavior, as each selection may be located in different snapshots. To make it restore all in one task, use the -latest parameter or the -runId parameter.