Skip to main content

Query backup data

On top of NineData's computing storage engine, backup service provide an unique capability that user can query backup data at any point in time. When data loss occurs in the business database, this function can be used to quickly complete data query and recovery.

Prerequisite

A complete logical backup has been completed. For more information, see Performing Logical Backups.

Restrictions

  • VIEW are not supported.
  • Only queries on logical backup data are supported.

Steps

  1. Log in to NineData console.

  2. In the left navigation bar, click Backup > Backup Query.

  3. On the Backup Query tab, configure according to the following table, and click Query.

    Parameters
    Description
    Select a data sourceBackup objects. User can quickly find the Backup Set by selecting the data source.
    Query Mode
    • Full Backup Set : This method is based on full backup data, and supports querying all data at the point of the time when the full backup completed, excluding incremental data after that.
    • By Time : This method is based on full backup data and data logs, and can query full data and subsequent incremental data. For the specific recovery time period, see the console.
    Backup SetConfigurable when the Query Mode is Full Backup Set, select full backup set.
    Query by TimeIt is configurable when Query Mode is By Time and it is used to select which time period data to query.
    • Logical backup: When the second-level RPO is reached, the data at any point in time between the start of the backup and the current point in time can be queried.
    • Physical backup: Minute-level RPO, which can query data from a few minutes to 30 minutes before the backup starts to the current time point.
  4. The page jumps to the SQL console, where user can query the contents of the backup data through query statements. User can click the backup set or point-in-time to switch the query method.

    data_query

    tip
    • For the usage of SQL console, please refer to SQL console.

    • After querying the required data, user can export and restore the data to the target database through the Export in the result set.

      export

Appendix: Supported Query Syntax

The currently supported query syntax is as follows.

StatementOptions
SELECT (query)ALL | DISTINCT
FROM
WHERE
GROUP BY
HAVING
WINDOW AS
ORDER BY
ASC | DESC
LIMIT
SHOW (view object list)TABLES
SHOW CREATE (view object structure definition syntax)TABLE
VIEW
FUNCTION
PROCEDURE
TRIGGER
EVENT
statementOptions
SELECT (query)ALL | DISTINCT | DISTINCTROW
FROM
WHERE
GROUP BY
HAVING
WINDOW AS
ORDER BY
ASC | DESC
LIMIT
SHOW (view object list)TABLES
FUNCTIONS
PROCEDURES
TRIGGERS
VIEWS
SYNONYMS
ASSONBLIES
SHOW CREATE (view object structure definition syntax)TABLE
VIEW
FUNCTION
PROCEDURE
TRIGGER
EVENT
DATA TYPE
SYNONYM