Changes

Jump to navigation Jump to search
7 bytes removed ,  17 June
no edit summary
| '''Errors'''
|The command fails if the database files could not be closed for some reason.
|}
 
==LIST==
 
{| width='100%'
|-
|width='130'|'''Syntax'''
|{{Code|LIST ([name] ([path]))}}
|-
| '''XML Syntax'''   
|<code><list (name='...' (path='...'))/></code><br/>
|-
| '''Permission'''
|''NONE''
|-
| '''Summary'''
|Lists all available databases. If {{Code|name}} is specified, the resources of a database are listed. The output can be further restricted to the resources matching the specified {{Code|path}}.<br/>If database resources are listed, the size is either the number of nodes (for XML resources) or the number of bytes (for binary resources).
 
|-
| '''Errors'''
|The command fails if the optional database cannot be opened, or if the existing databases cannot be listed for some other reason.
|}
|}
=AdministrationINSPECT==CREATE BACKUP== {{Mark|Updated with Version 10:}} Support for comments.
{| width='100%'
|-
|width='130'|'''Syntax'''
|{{Code|CREATE BACKUP [name] ([comment])INSPECT}}
|-
| '''XML&nbsp;Syntax'''&nbsp;&nbsp;&nbsp;
|<code><create-backup name='...' (comment='...')inspect/></code><br/>
|-
| '''Permission'''
|''CREATEREAD''
|-
| '''Summary'''
|Creates a zipped backup of Performs some integrity checks on the opened database specified by {{Code|name}} and an optional {{Code|comment}}. The backup file will be suffixed with the current timestamp and stored in the database directory. The [[#Glob Syntax|Glob Syntax]] can be used to address more than one database.|-| '''Errors'''|The command fails if the specified database does not exist, or if it could not be zipped for some other reason.|-| '''Examples'''|* {{Code|BACKUP db}}<br/>creates returns a zip archive of the database {{Code|db}} (e.g. {{Code|db-2014-04-01-12-27-28.zip}}) in the [[Configuration#Database_Directory|database directory]]brief summary.
|}
==DROP BACKUPINFO DB==
{| width='100%'
|-
|width='130'|'''Syntax'''
|{{Code|DROP BACKUP [name]INFO DB}}
|-
| '''XML&nbsp;Syntax'''&nbsp;&nbsp;&nbsp;
|<code><dropinfo-backup name='...'db/></code><br/>
|-
| '''Permission'''
|''CREATEREAD''
|-
| '''Summary'''
|Drops all backups of Shows general information and meta data on the database with the specified {{Code|name}}, or a specific backup file if the name ends with a date. The [[#Glob Syntax|Glob Syntax]] can be used to address more than one currently opened database.
|-
| '''ExamplesErrors'''|* {{Code|DROP BACKUP abc*}}<br/>deletes the backups of all databases starting with the characters {{Code|abc}}.* {{Code|DROP BACKUP factbook-2021-05-16-13-13-10}}<br/>deletes a specific backup fileThe command fails if no database is opened.
|}
==ALTER BACKUPINFO INDEX==
{| width='100%'
|-
|width='130'|'''Syntax'''
|{{Code|ALTER BACKUP INFO INDEX ([name] [newnameELEMNAME&#x7c;ATTRNAME&#x7c;PATH&#x7c;TEXT&#x7c;ATTRIBUTE&#x7c;TOKEN&#x7c;FULLTEXT])}}
|-
| '''XML&nbsp;Syntax'''&nbsp;&nbsp;&nbsp;
|<code><alterinfo-backup nameindex type='...' newname='...elemname&#x7c;attrname&#x7c;path&#x7c;text&#x7c;attribute&#x7c;token&#x7c;fulltext'/></code><br/>
|-
| '''Permission'''
|''CREATEREAD''
|-
| '''Summary'''
|Renames all backups of Shows information on the database with the specified {{Code|name}} to {{Code|new-name}}. If the name ends with a date, only the specified backup file will be renamed. The existing [[#Glob SyntaxIndexes|Glob Syntaxindex]] structures. The output can be used optionally limited to address more than one databasethe specified index.
|-
| '''ExamplesErrors'''|* {{Code|ALTER BACKUP logs logs-backup}}<br/>renames The command fails if no database is opened, or if the backups of the {{Code|logs}} database to {{Code|logs-backup}}specified index is unknown.
|}
==SHOW BACKUPSINFO STORAGE==
{| width='100%'
|-
|width='130'|'''Syntax'''
|{{Code|SHOW BACKUPSINFO STORAGE [start end]}}
|-
| '''XML&nbsp;Syntax'''&nbsp;&nbsp;&nbsp;
|<code><showinfo-backupsstorage (start='...') (end='...')/></code><br/>
|-
| '''Permission'''
|''CREATEREAD''
|-
| '''Summary'''
|Shows all the internal main table of the currently opened database backups. An integer range may be specified as argument.|-| '''Errors'''|The command fails if no database is opened, or if one of the specified arguments is invalid.
|}
=Backups=RESTORE ==CREATE BACKUP== {{Mark|Updated with Version 10:}} Support for comments.
{| width='100%'
|-
|width='130'|'''Syntax'''
|{{Code|RESTORE CREATE BACKUP [name]([comment])}}
|-
| '''XML&nbsp;Syntax'''&nbsp;&nbsp;&nbsp;
|<code><restore create-backup name='...'(comment='...')/></code><br/>
|-
| '''Permission'''
|-
| '''Summary'''
|Restores Creates a zipped backup of the database with the specified by {{Code|name}} and an optional {{Code|comment}}. The name may include backup file will be suffixed with the current timestamp of and stored in the backup filedatabase directory. The [[#Glob Syntax|Glob Syntax]] can be used to address more than one database.
|-
| '''Errors'''
|The command fails if the specified backup database does not exist, if the database to be restored is currently locked, or if it could not be restored zipped for some other reason.|-| '''Examples'''|* {{Code|BACKUP db}}<br/>creates a zip archive of the database {{Code|db}} (e.g. {{Code|db-2014-04-01-12-27-28.zip}}) in the [[Configuration#Database_Directory|database directory]].
|}
==INSPECTDROP BACKUP==
{| width='100%'
|-
|width='130'|'''Syntax'''
|{{Code|INSPECTDROP BACKUP [name]}}
|-
| '''XML&nbsp;Syntax'''&nbsp;&nbsp;&nbsp;
|<code><inspectdrop-backup name='...'/></code><br/>
|-
| '''Permission'''
|''READCREATE''
|-
| '''Summary'''
|Performs some integrity checks on Drops all backups of the opened database and returns with the specified {{Code|name}}, or a specific backup file if the name ends with a date. The [[#Glob Syntax|Glob Syntax]] can be used to address more than one database.|-| '''Examples'''|* {{Code|DROP BACKUP abc*}}<br/>deletes the backups of all databases starting with the characters {{Code|abc}}.* {{Code|DROP BACKUP factbook-2021-05-16-13-13-10}}<br/>deletes a brief summaryspecific backup file.
|}
==INFO DBALTER BACKUP==
{| width='100%'
|-
|width='130'|'''Syntax'''
|{{Code|INFO DBALTER BACKUP [name] [newname]}}
|-
| '''XML&nbsp;Syntax'''&nbsp;&nbsp;&nbsp;
|<code><infoalter-dbbackup name='...' newname='...'/></code><br/>
|-
| '''Permission'''
|''READCREATE''
|-
| '''Summary'''
|Shows general information and meta data on Renames all backups of the currently opened database with the specified {{Code|name}} to {{Code|new-name}}. If the name ends with a date, only the specified backup file will be renamed. The [[#Glob Syntax|Glob Syntax]] can be used to address more than one database.
|-
| '''ErrorsExamples'''|The command fails if no * {{Code|ALTER BACKUP logs logs-backup}}<br/>renames the backups of the {{Code|logs}} database is openedto {{Code|logs-backup}}.
|}
==INFO INDEXSHOW BACKUPS==
{| width='100%'
|-
|width='130'|'''Syntax'''
|{{Code|INFO INDEX ([ELEMNAME&#x7c;ATTRNAME&#x7c;PATH&#x7c;TEXT&#x7c;ATTRIBUTE&#x7c;TOKEN&#x7c;FULLTEXT])SHOW BACKUPS}}
|-
| '''XML&nbsp;Syntax'''&nbsp;&nbsp;&nbsp;
|<code><infoshow-index type='elemname&#x7c;attrname&#x7c;path&#x7c;text&#x7c;attribute&#x7c;token&#x7c;fulltext'backups/></code><br/>
|-
| '''Permission'''
|''READCREATE''
|-
| '''Summary'''
|Shows information on the existing [[Indexes|index]] structures. The output can be optionally limited to the specified index.|-| '''Errors'''|The command fails if no all database is opened, or if the specified index is unknownbackups.
|}
==INFO STORAGERESTORE==
{| width='100%'
|-
|width='130'|'''Syntax'''
|{{Code|INFO STORAGE RESTORE [start endname]}}
|-
| '''XML&nbsp;Syntax'''&nbsp;&nbsp;&nbsp;
|<code><info-storage (startrestore name='...') (end='...')/></code><br/>
|-
| '''Permission'''
|''READCREATE''
|-
| '''Summary'''
|Shows Restores a database with the internal main table specified {{Code|name}}. The name may include the timestamp of the currently opened database. An integer range may be specified as argumentbackup file.
|-
| '''Errors'''
|The command fails if no the specified backup does not exist, if the database to be restored is openedcurrently locked, or if one of the specified arguments is invalidit could not be restored for some other reason.
|}
= Querying =
 
==LIST==
 
{| width='100%'
|-
|width='130'|'''Syntax'''
|{{Code|LIST ([name] ([path]))}}
|-
| '''XML&nbsp;Syntax'''&nbsp;&nbsp;&nbsp;
|<code><list (name='...' (path='...'))/></code><br/>
|-
| '''Permission'''
|''NONE''
|-
| '''Summary'''
|Lists all available databases. If {{Code|name}} is specified, the resources of a database are listed. The output can be further restricted to the resources matching the specified {{Code|path}}.<br/>If database resources are listed, the size is either the number of nodes (for XML resources) or the number of bytes (for binary resources).
 
|-
| '''Errors'''
|The command fails if the optional database cannot be opened, or if the existing databases cannot be listed for some other reason.
|}
==XQUERY==
Bureaucrats, editor, reviewer, Administrators
12,951

edits

Navigation menu