如何在marklogic中获取marklogic数据库备份文件的大小?
我想知道使用xdmp函数的marklogic db备份文件的大小?是否有任何xdmp功能可以使用如何在marklogic中获取marklogic数据库备份文件的大小?,marklogic,Marklogic,我想知道使用xdmp函数的marklogic db备份文件的大小?是否有任何xdmp功能可以使用 declare namespace forest = "http://marklogic.com/xdmp/status/forest"; declare function local:backup-size($db as xs:string) as xs:decimal { for $forests in xdmp:forest-status(xdmp:database
declare namespace forest = "http://marklogic.com/xdmp/status/forest";
declare function local:backup-size($db as xs:string)
as xs:decimal
{
for $forests in xdmp:forest-status(xdmp:database-forests(xdmp:database($db)))
let $backup-b := sum($forests/forest:backup-write-bytes)
return $backup-b
};
fn:concat("Database backup size is: ", local:backup-size("db-name"), " Bytes")
注意:调整XQuery以包括或排除副本
注意:调整XQuery以包括或排除副本