You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
MANAGING BACKUPS<br />
MarkLogic supports online backups and restores, so you can protect and restore your<br />
data without bringing the system offline or halting queries or updates. Backups can be<br />
initiated via the administrative web console (as a push-button action or as a scheduled<br />
job), a server-side XQuery or JavaScript script, or the REST API. You specify a<br />
database to back up and a target location. Backing up a database saves copies of its<br />
configuration files, all the forests in the database, and the corresponding security and<br />
schema databases. It's particularly important to backup the security database because<br />
MarkLogic tracks role identifiers by numeric IDs rather than string names, and the<br />
backup forest data can't be read if the corresponding numeric role IDs don't exist in the<br />
security database.<br />
You can also choose to selectively back up an individual forest instead of an entire<br />
database. That's a convenient option if only the data in one forest is changing.<br />
TYPICAL BACKUP<br />
Most of the time, when a backup is running, all queries and updates proceed as usual.<br />
MarkLogic simply copies stand data from the source directory to the backup target<br />
directory, file by file. Stands are read-only except for the small Timestamps file, so this<br />
bulk copy can proceed without needing to interrupt any requests. Only at the very end<br />
of the backup does MarkLogic have to halt incoming requests briefly to write out a fully<br />
consistent view for the backup, flushing everything from memory to disk.<br />
A database backup always creates a new subdirectory for its data in the target backup<br />
directory. A forest backup writes to the same backup directory each time. If the target<br />
backup directory already has data from a previous backup (as is the case when old<br />
stands haven't yet been merged into new stands), MarkLogic won't copy any files that<br />
already exist and are identical in the target. This offers a nice performance boost.<br />
FLASH BACKUP<br />
MarkLogic also supports flash backups. Some filesystems support taking a snapshot of files<br />
as they exist at a certain point in time. The filesystem basically tracks the disk blocks in<br />
use and makes them read-only for the lifetime of the snapshot. Any changes to those<br />
files go to different disk blocks. This has the benefit of being pretty quick and doesn't<br />
require duplication of any disk blocks that aren't undergoing change. It's a lot like what<br />
MarkLogic does with MVCC updates.<br />
101