Database Reference
In-Depth Information
Parameter
Description
Mandatory/
optional
If performing an incremental backup, should a consistency check be
performed first? Disabling the Consistency Check task for incremental
backups can lead to faster backup times, but has the downside of creating a
less rigorous backup of the database. Either yes or no .
Optional, default is
yes
incremental-
check
The maximum number of incremental backups before another full backup
should be created.
Optional, default is 5
max
Should the backup be written to a ZIP file? Either yes for a ZIP file or no for
a full folder export.
Optional, default is
yes
zip
Backups from XQuery
It is also possible to almost immediately request a server-side data export backup of
the database on an ad hoc basis from XQuery, by triggering the Consistency Check
system task. We describe this as almost immediately because, as you may recall from
earlier, server-side backups are always scheduled, and the database may need to finish
processing any other current requests before it can enter protected mode to perform
the backup. You can trigger the Consistency Check system task from XQuery by
using the system:trigger-system-task function (see Example 15-6 ). For further
details of the system XQuery extension module, see system . The function takes the
same parameters as described in Table 15-7 .
Example 15-6. Triggering a full server-side data export backup from XQuery
let $ parameters :=
<parameters>
<param name = " output " value = " /export/backups " />
<param name = " backup " value = " yes " />
<param name = " incremental " value = " no " />
<param name = " zip " value = " no " />
</parameters>
return
system:trigger-system-task ( "org.exist.storage.ConsistencyCheckTask" , $ parameters )
Conversely, you can restore a database backup from XQuery by calling the sys
tem:restore function, as Example 15-7 shows.
Example 15-7. Restoring a backup from XQuery
system:restore ( "/export/backups/full20131228-1035" , "some-password" , "some-password" )
Dashboard Backup app
Recently, a simple backup application has been added to the eXist dashboard that
allows you to see previously created backups, and also to trigger a new immediate
 
Search WWH ::




Custom Search