From BaseX Documentation
Revision as of 14:59, 17 January 2016 by CG (talk | contribs) (Text replace - "\[\[Category:Internals\]\]" to "")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page is part of the Advanced User's Guide. The following two paragraphs demonstrate how to create a backup and restore the database within BaseX.

GUI Example[edit]

  1. Start the BaseX GUI and create a new database in DatabaseNew... with your XML document.
  2. Go to DatabaseManage... and create a backup of your database. The backup will be created in the database directory.
  3. Go to DatabaseAdd... and add another document.
  4. Go to DatabaseManage... and restore your database. The database will be restored from the latest backup of to the database found in the database directory.

Console Example[edit]

  1. Start the BaseX Standalone client from a console.
  2. Create a new database via the CREATE DB command.
  3. Use the CREATE BACKUP command to back up your database.
  4. Add a new document via ADD: ADD AS newdoc.xml <newdoc/>
  5. Use the RESTORE command to restore the original database.
  6. Type in XQUERY / to see the restored database contents.

The same commands can be used with a BaseX client connected to a remote Database Server.