bseltz-cohesity / scripts

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

python/restoreUDA/restoreUDA.py - trying to restore the lastest INC or Full and its going back to the oldest avaiable #160

Closed amhaats1 closed 3 months ago

amhaats1 commented 4 months ago

Executing /udb_backup/cohesity/TESTcluster/reg_testing/restoreUDA.py \ -v "{{ clustername }}" \ -u "{{ generic_username }}" \ -d corp.mutualofomaha.com \ -pwd "{{ genericpassword }}" \ -s "{{ sourceserver}}""{{ instance }}"_"{{ dbname }}" \ -n "{{ dbname }}" \ -a 'logtarget-path=/log1/restore --new-log-path=/log1/{{ instance }}/{{ dbname }} --new-data-path="'/data1/{{ instance }}/{{ dbname }}/data1' dbpath on '/data1/{{ instance }}/{{ dbname }}/'"' \ -cc 16 \ -o \ -w

The restore is going back to the oldest INC or FULL backup versus the most recent

The notes say by leaving out the

By default (if both --latest and --logtime are omitted), the latest full/incremental snapshot time will be used for the restore.

bseltz-cohesity commented 4 months ago

I have made an update to the script. Please try the updated version: https://github.com/cohesity/community-automation-samples/tree/main/python/restoreUDA

amhaats1 commented 3 months ago

Thank you, tested and it worked!!