Hi, One more clarification,
When I run the below backup qry its working fine but backup-status saying that “In-Progress”. But if I separately run the backup-status query its says “Completed” same thing for Restore status as well. Qry --------- import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; let $forestID := admin:forest-get-id(admin:get-configuration(), "sample") let $restoreStatus := xdmp:database-backup(($forestID), "D:/backup_ML/ ") return xdmp:database-backup-status($restoreStatus) result: <job:job-status xsi:schemaLocation="http://marklogic.com/xdmp/job-status job-status.xsd" xmlns:job="http://marklogic.com/xdmp/job-status" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <job:forest> <job:forest-name> sample </job:forest-name> <job:forest-id>16701608223515833687</job:forest-id> <job:status>in-progress</job:status> <job:journal-archiving>false</job:journal-archiving> </job:forest> </job:job-status> Can you please help on this. Regards, Mohanraj From: [email protected] [mailto:[email protected]] On Behalf Of Danny Sokolsky Sent: Wednesday, March 27, 2013 9:07 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] ML Backup Through Xquery not working Hi Mohanraj, The function you called does not initiate a backup; it is a building block for for setting up scheduled backups. To backup a database from XQuery, use xdmp:database-backup: https://docs.marklogic.com/xdmp:database-backup This will start off a backup operation. It returns an id of the operation which you can use to check the status (with xdmp:database-backup-status, for example). -Danny From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Mohanraj Chozhan Sent: Tuesday, March 26, 2013 10:00 PM To: [email protected]<mailto:[email protected]> Subject: Re: [MarkLogic Dev General] ML Backup Through Xquery not working Hi, ML Database backup through admin api XQuery. My requirement is whenever I invoke the xqy it should take the back up of mentioned database. Same way I tried with Restore option its worked brilliantly. I don’t want to manually trigger with Admin (8001) screen. In the Admin manually its taking back up. But the below approach am unable to take the backups, my XQuery are, Approach 1: xquery version "1.0-ml"; import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; admin:database-one-time-backup("D:/backup_ML/ML5",xs:dateTime(fn:current-dateTime()),5,true(),true(),true()) Note: The directory already exists in my local Approach 2: xquery version "1.0-ml"; import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; let $config := admin:get-configuration() return admin:database-minutely-backup("D:/backup_ML/ML5", 1, 5, true(), true(), true()) Note: The directory already exists in my local Otherwise can you anyone suggest which way to take backup when I call the XQuery its should take the back up on current time. Regards, Mohanraj **************** CAUTION - Disclaimer ***************** This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system. ***INFOSYS******** End of Disclaimer ********INFOSYS***
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
