Database Reference
In-Depth Information
Documents that still exist in the database but through some issue
have become
detached
from a collection—and so are effectively
invisible—may still be exported as part of the backup content.
These documents will be placed into the special collection
/db/
lost_and_found
. Details of the consistency check are logged into
the same folder as the destination of the backup.
Scheduled backups
If you wish to create a scheduled backup—either as a one-off task or a periodic opera‐
tion—you can configure this in eXist's configuration file (
$EXIST_HOME/conf.xml
)
within the
scheduler
element indicated by the XPath
/exist/scheduler
, by enabling
and configuring the
org.exist.storage.ConsistencyCheckTask
scheduled job (see
Example 15-5
and
Table 15-7
). For more information on scheduling jobs and the job
configuration syntax, see
“Scheduling Jobs” on page 436
. This configuration has to be
set before the eXist server is started, or you have to restart eXist after making
changes. If you wish to schedule a new backup job without restarting eXist, you can
do so using the XQuery
scheduler
extension module (see
scheduler
). Any sched‐
uled backup will back up the entire database.
Example 15-5. Scheduled backup configuration: daily 1 a.m., fortnightly incremental
backup
<job
type=
"system"
name=
"daily-backup"
class=
"org.exist.storage.ConsistencyCheckTask"
cron-trigger=
"0 0 01 * * ?"
>
<parameter
name=
"output"
value=
"/export/backups"
/>
<parameter
name=
"backup"
value=
"yes"
/>
<parameter
name=
"incremental"
value=
"yes"
/>
<parameter
name=
"incremental-check"
value=
"yes"
/>
<parameter
name=
"max"
value=
"14"
/>
</job>
Table 15-7. Scheduled consistency check and backup job parameters
Parameter
Description
Mandatory/
optional
The destination folder for the logfiles of the Consistency Check task; if
performing a backup, also the location for backup files. If you're using a
relative path, it is interpreted relative to
$EXIST_HOME/webapp/WEB-INF/
data
.
Mandatory
output
After the consistency check, should a backup of the database be performed?
Either
yes
or
no
.
Optional, default is
no
backup
If performing a backup, should a full backup or an incremental backup (just
documents that have changed since the last backup) be performed? Either
yes
for an incremental backup, or
no
for a full backup.
Optional, default is
no
incremental
Search WWH ::
Custom Search