Question

Trying to restore file list from wmware guest in python

  • 6 February 2024
  • 7 replies
  • 95 views

Badge +1

Hello,

 

I’m trying to restore (out of place) a file list from a vmware guest in python but i got a failed job. client is installed on the machine for restore only.

Here is my code :

from cvpysdk.commcell import Commcell

webconsole_hostname = "v-commserve-1.xxxxx"
commcell_username = "xxxxx"
commcell_password = "xxxxx"
client_name = "v-xxx-2"
destination = "/tmp"
overwrite = False
restore_data_and_acl = True

commcell = Commcell(webconsole_hostname, commcell_username,commcell_password)
client = commcell.clients.get(client_name)
agent = client.agents.get("Virtual Server")
instance = agent.instances.get("vminstance")
backupset = instance.backupsets.get("defaultbackupset")
subclient = backupset.subclients.get("backup_bronze")


paths = [
"/etc/hostname",
"/etc/mailname"
]

restore_time = "2024-01-15 00:00:01"

job = subclient.restore_out_of_place(
client=client,
destination_path=destination,
paths=paths,
overwrite=overwrite,
restore_data_and_acl=restore_data_and_acl,
from_time=restore_time
)



Where am i wrong ?

Thx a lot


7 replies

Badge +1

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Machine : v-commserve-1
File    : StartRestore.log
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

28224 5b90  02/06 14:13:49 834619 CheckAndGetVSAProxyList() - Failback replication [False]
28224 5b90  02/06 14:13:49 834619 CheckAndGetVSAProxyList() - Source Client [375]/[v-50ans-2]    Destination Client [375]/[v-50ans-2]    Source Parent Client [15]/[a-vcenter-server-0.mgmt.uhb.fr]
28224 5b90  02/06 14:13:49 834619 CheckAndGetVSAProxyList() - Looking up proxy client for restore to virtualization client [375] using AppId [511]
28224 5b90  02/06 14:13:49 834619 PerformVMPowerOnOperation() - Powering on clients is enabled.
28224 5b90  02/06 14:13:49 834619 PerformVMPowerOnOperation() - Power Management is not enabled on client (OR) Powering on client [17]/[commvault-media-agent-villejean] succeeded.
28224 5b90  02/06 14:13:49 834619 After the retries => Total No. of clients : [1] No. of clients succeeded : [1] No of clients failed : [0]
28224 5b90  02/06 14:13:49 834619 StartNewVirtualServerRestore() - IndexingV2 is enabled. Using new restore
28224 5b90  02/06 14:13:49 834619 CheckVSAPermissions() - SECURITY: [canRestore()] returned true for subclientId (511). User (6), commCell (2), srcClientId (375), destClientId (0), appTypeId (106), instance (2), backupSet (459), outOfPlace = (true).
28224 5b90  02/06 14:13:49 834619 StartNewVirtualServerRestore() - Trying proxy client [17] for Restore
28224 5b90  02/06 14:14:06 834619 CheckAndGetVSAProxyList() - Failback replication [False]
28224 5b90  02/06 14:14:06 834619 CheckAndGetVSAProxyList() - Source Client [375]/[v-50ans-2]    Destination Client [375]/[v-50ans-2]    Source Parent Client [15]/[a-vcenter-server-0.mgmt.uhb.fr]
28224 5b90  02/06 14:14:06 834619 CheckAndGetVSAProxyList() - Looking up proxy client for restore to virtualization client [375] using AppId [511]
28224 5b90  02/06 14:14:07 834619 PerformVMPowerOnOperation() - Powering on clients is enabled.
28224 5b90  02/06 14:14:07 834619 PerformVMPowerOnOperation() - Power Management is not enabled on client (OR) Powering on client [17]/[commvault-media-agent-villejean] succeeded.
28224 5b90  02/06 14:14:07 834619 After the retries => Total No. of clients : [1] No. of clients succeeded : [1] No of clients failed : [0]
28224 5b90  02/06 14:14:07 834619 StartNewVirtualServerRestore() - IndexingV2 is enabled. Using new restore
28224 5b90  02/06 14:14:07 834619 CheckVSAPermissions() - SECURITY: [canRestore()] returned true for subclientId (511). User (6), commCell (2), srcClientId (375), destClientId (0), appTypeId (106), instance (2), backupSet (459), outOfPlace = (true).
28224 5b90  02/06 14:14:07 834619 StartNewVirtualServerRestore() - Trying proxy client [17] for Restore

 

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Machine : v-commserve-1
File    : JobManager.log
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

9240  26cc  02/06 14:13:48 834619 CVTHREADSTART newRstRequestThread(void *inArgs) Got userId [6] in request.
9240  26cc  02/06 14:13:48 834619 Servant    [---- IMMEDIATE RESTORE REQUEST ----] Task id [834619] Clnt[v-50ans-2] AppType[Virtual Server][106]
9240  71b4  02/06 14:13:49 834619 Scheduler  Restore request successfully sent
9240  71b4  02/06 14:13:49 834619 Scheduler  Phase [2-Restore] (0,0) started on [v-commserve-1] in [1] second(s) - startRestore.exe 834619 834619  
9240  3080  02/06 14:13:50 834619 Servant    Reg [Control] received. Client [commvault-media-agent-villejean] plattype = 4
9240  3080  02/06 14:14:05 834619 Scheduler  Reset pending cause received for RCID [0], ReservationId [0] from client [commvault-media-agent-villejean] and application [vsrst].  Level [0] flags [0] id [0] overwrite [0] append [0] CustId[0].
9240  5584  02/06 14:14:05 834619 Database   JMFailureReasonUtils::insertFailureReason(), Stored Procedure to insert the failure reason returned error. Event Id [1526727112]. Number of Parameters [1]. Error = [-1], [Too Many parameters].
9240  5584  02/06 14:14:05 834619 Scheduler  Set pending cause []::Client [commvault-media-agent-villejean] Application [vsrst] Message Id [1526727112] Error code [91:456] RCID [0] ReservationId [0].  Level [0] flags [0] id [0] overwrite [0] append [0] CustId[0].
9240  3080  02/06 14:14:05 834619 Scheduler  Job [Failed] message received from [commvault-media-agent-villejean.backup.uhb.fr] Module [vsrst] Token [] restartPhase [0]
9240  3080  02/06 14:14:05 834619 ArchiveMgr JMArMgr::releaseAllJobStreams() Calling CvResourceManager::releaseJobStreams(jobType=2,appType=106,logicalRelease=true, retainStreamsForIndex=false)
9240  3080  02/06 14:14:05 834619 JobSvr Obj Phase [2-Restore] has failed. Restore will continue with phase [Client Cleanup] before failing.
9240  71b4  02/06 14:14:06 834619 Scheduler  Restore request successfully sent
9240  71b4  02/06 14:14:06 834619 Scheduler  Phase [6-Client Cleanup] (1,0) started on [v-commserve-1] in [1] second(s) - startRestore.exe  -j 834619  -cleanup  
9240  3080  02/06 14:14:07 834619 Servant    Reg [Control] received. Client [commvault-media-agent-villejean] plattype = 4
9240  1cc8  02/06 14:14:09 834619 processXMLRequest Failed to get AppId.
9240  1cc8  02/06 14:14:09 834619 AppManager Invalide appId [0].
9240  3080  02/06 14:14:09 834619 Scheduler  Phase [Completed] message received from [commvault-media-agent-villejean.backup.uhb.fr] Module [vsrst] Token [] restartPhase [0]
9240  3080  02/06 14:14:09 834619 ArchiveMgr JMArMgr::releaseAllJobStreams() Calling CvResourceManager::releaseJobStreams(jobType=2,appType=106,logicalRelease=true, retainStreamsForIndex=false)
9240  3080  02/06 14:14:09 834619 JobSvr Obj Phase [6-Client Cleanup] has succeeded. The restore job has failed.
9240  3080  02/06 14:14:09 834619 JobSvr Obj Error: Failed to update status for all VMs in APP_VMProp. ErrorCode [100], ErrorStr []
9240  4c68  02/06 14:14:09 834619 JobSvr Obj Job is abruptly killed or Failed. Prepare to launch Application Cleanup
9240  3080  02/06 14:14:09 834619 JMGUIReport2::sendJobCompleted Sent job completed message to GUI.
9240  3080  02/06 14:14:09 834619 Scheduler   -> FAILED <-

 

Sees to be a mismatch between SDK and the DB. What versions are you using?

Badge +1

commserve is in 11.34

 

Badge +1

I tryied with cvpydsk (via pip, via github master and github dev).

Same problem

Sorry for delay. Let me check it for you further.

We’ll need the vsrst.logs from commvault-media-agent-villejean. But I’m concerned about the below line:
9240  5584  02/06 14:14:05 834619 Database   JMFailureReasonUtils::insertFailureReason(), Stored Procedure to insert the failure reason returned error. Event Id [1526727112]. Number of Parameters [1]. Error = [-1], [Too Many parameters].
This may indicate a mismatch (unfinished update) between the binaries and the database, so my recommendation would be to open a ticket with Support.

Badge +1

ok i’ll open a ticket.

 

Thx a lot !

Reply