Links

Content Skeleton

This Page

Previous topic

BACKUP ANT BUILD

Next topic

exist

LOW LEVEL EXIST USAGE FUNCTIONSΒΆ

CAUTION other exist functions related to building exist live in env/exist.bash

exist_running
report yes/no exist running on
exist_running_
return code
exist_dir
cd to it

exist_url relative/path host

For the default host : “localhost” the port of the server is included in the URL, for other hosts the port is not specified.:

exist_url /servlet/db/                : $(exist_url /servlet/db/)
exist_url /servlet/db/ $HEPREZ_SERVER : $(exist_url /servlet/db/ $HEPREZ_SERVER)

The behaviour is due to the usual configuration of directing all remote access thru apache on :80

exist_put

usage (no trailing slash):

exist_put /tmp/dummy.xml /db/here/in/a/deeeeep/folder

results in the dbpath /db/here/in/a/deeeeep/folder/dummy.xml

exist_putt
similar to exist_put but with filesystem modtime diddling expect that cannot diddle the modtime in the database, so do it in the filesystem, following the put and then can check the timestamps prior to the put to avoid PUTing an unchanged file into db
exist_putt_test [force]
upload tmpfile to /db/test ... with “force” do filesystem touch first
exist_fstamp <path>
modtime OOPS DARWINISM HERE

exist_rm <dbp> <host:localhost>

delete a resource or collection from the database CAUTION YOU CAN DELETE THE ENTIRE DB WITH THIS:

exist_rm /db/cache/hfagc/20080401/rez-classify-key.xml
exist_rm /db/cache/hfagc/20080401/credits

takes more than a minute/ages? sometimes, suspect a timeout , but seemed to succeed,perhaps need:

--connect-timeout
--max-time

exist_gett <dbp> <fsdir> <host:localhost> <port:9090>

GETs from database with modification time alignment to that of the database

exist_exists

exist_cq_ <desription of query to lookup in examples.xml>

exist_cq_ last modified files beneath /db/hfagc  --host=cms01.phys.ntu.edu.tw
exist_cq_ last --host=cms01.phys.ntu.edu.tw
## query with the 1st matching description is used

Example output:

{'{http://exist.sourceforge.net/NS/exist}start': '1', '{http://exist.sourceforge.net/NS/exist}count': '10', '{http://exist.sourceforge.net/NS/exist}hits': '218'}
    <activity><lastmod>2011-11-28T13:41:00.985+08:00</lastmod><name>belle_psiketac.xml</name><col>/db/hfagc/belle/andrzej</col><uri>/db/hfagc/belle/andrzej/belle_psiketac.xml</uri><base>/db/hfagc/belle/andrzej/belle_psiketac.xml</base></activity>
    <activity><lastmod>2011-11-24T10:21:28.461+08:00</lastmod><name>belle_bs_jpif0.xml</name><col>/db/hfagc/belle/andrzej</col><uri>/db/hfagc/belle/andrzej/belle_bs_jpif0.xml</uri><base>/db/hfagc/belle/andrzej/belle_bs_jpif0.xml</base></activity>
    <activity><lastmod>2011-11-23T08:00:33.718+08:00</lastmod><name>belle_DS1D.xml</name><col>/db/hfagc/belle/andrzej</col><uri>/db/hfagc/belle/andrzej/belle_DS1D.xml</uri><base>/db/hfagc/belle/andrzej/belle_DS1D.xml</base></activity>

exist_is_directly_accessible_

Checking accessibility of eXist XMLRPC port (the backdoor) using netcat Called by exist_is_directly_accessible, exist_assert_directly_accessible