Database Reference
In-Depth Information
Table 15-4. Command-line restore arguments
Argument
Description
Mandatory/optional
-u or --user
The username for connecting to the database. Typically, must be a
dba user when performing a backup.
Mandatory, but if omitted,
the default username
admin is used
The password for the user connecting to the database.
Mandatory, unless the user
does not have a password
-p or --password
-r or --restore
The location of the backup to restore. Either a folder path, or a
filename ending with .zip to restore a ZIP file backup.
Mandatory
-P or --dba-
password
The password of the admin user in the database backup that you
are restoring.
Mandatory, if the backup
includes the
collection /db/system/
security/exist
-o or --option
Any additional options for the backup client that are needed to
connect to the eXist server. For example, if using SSL: -ossl-
enable=true
-ouri=xmldb:exist://local
host:8443/exist/xmlrpc .
Optional
Ant backup task
You can use the Ant extension tasks for eXist (see “Using Ant with eXist” on page
381 ) for performing client-side data export backup and restore of the database.
Once you have the Ant extensions configured in your Ant script (typically build.xml ),
then you can configure the Ant backup extension using the Ant code shown in
Example 15-3 . Its parameters are listed in Table 15-5 .
Example 15-3. Backing up the entire database with Ant
<xdb:backup user= "admin" password= "some-password"
uri= "xmldb:exist://localhost:8080/exist/xmlrpc/db"
dir= "/export/backups/exist-db.201312271206.zip" />
Table 15-5. Ant backup task parameters
Parameter Description
user The username for connecting to the database. Typically, must be a dba user when performing a backup.
password The password for the user connecting to the database.
uri
The XML:DB API URI to the database collection that you wish to back up. For example, xmldb:exist://
localhost:8080/exist/xmlrpc/db would back up the entire database, while xmldb:exist://
localhost:8080/exist/xmlrpc/db/my-collection would back up the /db/my-collection
collection hierarchy.
The destination for the backup. Either a folder path, or a filename ending with .zip to create a ZIP file backup.
dir
 
Search WWH ::




Custom Search