XQuery Function Documentation

Search and Browse

http://exist-db.org/xquery/backups

java:org.exist.backup.xquery.BackupModule

A module for access to database backups available on the server file system

backups:list

backups:list($directory as xs:string) as node()

Returns an XML fragment listing all eXist backups found in a specified backup directory.

Parameters:
$directory The path to the directory to show the list of backups on.
Returns:
node() : an XML fragment listing all eXist backups found in the specified backup directory: <directory> <backup file="filename"> <key>value</key><key>value</key></backup> <backup file="filename"> <key>value</key><key>value</key></backup> </directory> Where key is a property name and value is a property value for the given .zip file.

backups:retrieve

backups:retrieve($directory as xs:string, $name as xs:string) as item()

Retrieves a zipped backup archive, $name, and directly streams it to the HTTP response. For security reasons, the function will only read .zip files in the specified directory, $directory.

Parameters:
$directory The path to the directory where the backup file is located.
$name The name of the file to retrieve.
Returns:
item()