Backups

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

 * 1) Start the BaseX GUI and create a new database in Database → New... with your XML document.
 * 2) Go to Database → Manage... and create a backup of your database. The backup will be created in the database directory.
 * 3) Go to Database → Add... and add another document.
 * 4) Go to Database → Manage... and restore your database. The database will be restored from the latest backup of to the database found in the database directory.

Console Example

 * 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:
 * 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.