Database Reference
In-Depth Information
Conversely, you can configure the Ant restore extension using the Ant code shown in
Example 15-4 . Its parameters are outlined in Table 15-6 .
Example 15-4. Restoring a database backup with Ant
<xdb:restore user= "admin" password= "some-password"
uri= "xmldb:exist://localhost:8080/exist/xmlrpc"
file= "/export/backups/exist-db.201312271206.zip" />
Table 15-6. Ant restore task parameters
Parameter
Description
Mandatory/optional
The username for connecting to the database. Typically, must be a
dba user when restoring a backup.
Mandatory
user
The password for the user connecting to the database.
Mandatory
password
The XML:DB API URI to the database server (e.g., xmldb:exist://
localhost:8080/exist/xmlrpc/db ).
Mandatory
uri
The location of the backup to restore if it is a folder.
Mandatory, if the restore source
is a folder
dir
The location of the backup to restore if it is a ZIP file.
Mandatory, if the restore source
is a ZIP file
file
Mandatory, if the backup
includes the collection /db/
system/security/exist
The password of the admin user in the database backup that you are
restoring.
restorePass
word
Server-Side Data Export Backup
Server-side backups in eXist are always performed by the eXist Scheduler (see
“Scheduled Jobs” on page 435 ), which executes the backup as a system task . Whether
the job is scheduled in advance as a one-off or repeatable operation, or is triggered
directly at some point, it will always be managed by the Scheduler.
System tasks always ensure that the database is in protected mode . This means that
the database is in a consistent state because all pending transactions have completed,
the database journal has been flushed to persistent storage, and the system task will
execute in isolation, which blocks and queues all incoming transactions until the task
has finished executing.
As a server-side backup is executed in protected mode, the database is unavailable for
general use while the backup is performed. Server-side backups initially perform a
consistency and sanity check against the database, and this information is used to
inform the backup content. The consistency and sanity check can detect problems in
the database storage and still allow collections and documents that may have become
damaged to be exported in the backup, thus ensuring the most rigorous backup of
your data.
 
Search WWH ::




Custom Search