Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space ML1 and version 9.1

...

Restore SQL Syntax
sql> RESTORE identifier [AS identifier] [, identifier [AS identifier]] [EXCLUDING excluded_identifier] FROM target [LAZY PROTECT] [REPLICAS=N]

Both the identifer and excluded_identifer should refer to valid system objects. This can be a fully qualified name, or include wildcards (*) for the database, object, or both. For example:

...

Triggers, views, and foreign keys that reference an object excluded from the backup will be successfully restored only if the object exists in the restored environment.

LAZY PROTECT

This option causes the RESTORE command to create only a single replica of each slice before returning. Once the RESTORE completes, the Rebalancer will automatically create additional requested number of replicas.

This option will greatly reduce the run time of RESTORE, but the cluster will not have full data protection until the Rebalancer has finished making the additional replicas.

Example:

sql> RESTORE * FROM 'ftp://storage01/uploads/johndoe.kibbles.jun01' LAZY PROTECT;

This example will create a single replica for each table. After the restore is completed, additional replicas will be created according to each table's specification. 

REPLICAS = N 

The number of replicas for a table or index is recorded within the backups. Normally when RESTORE is run, tables and indexes are restored with the same number of replicas as the original. This option allows you to explicitly specify the number of replicas that should be created as part of the RESTORE operation.

...

sql> RESTORE * FROM 'ftp://storage01/uploads/johndoe.kibbles.jun01' REPLICAS = 2;

This option may be combined with LAZY PROTECT.  For example, the following command would create the same table as above, but only the first replica would be created before returning.  After the RESTORE completes, the Rebalancer will create one additional replica for each slice.

sql> RESTORE * FROM 'ftp://storage01/uploads/johndoe.kibbles.jun01' LAZY PROTECT REPLICAS = 2;

See more on specifying the number of replicas in a table in the section on Managing Data Distribution.

...