Restoring Individual Objects
You can use
vbr to restore individual tables and schemas from a full or object-level backup: qualify the
restore task with
‑‑restore-objects, and specify the objects to restore as a comma-delimited list:
$ vbr --task=restore --config-file=filename --restore-objects='objectname[,...]' [--archive=archive-id]
The following requirements and restrictions apply:
- The database must be running, and nodes must be UP.
- Tables must include their schema names.
- Do not embed spaces before or after comma delimiters of the
vbrinterprets the space as part of the object name.
Object-level restore is not supported for HDFS storage locations. To restore an HDFS storage location you must do a full restore.
‑‑restore-objects restores the specified objects from the most recent backup. You can restore from an earlier backup with the
The following example uses the
db.ini configuration file, which includes the database administrator's password:
> vbr --task restore --config-file=db.ini --restore-objects=salesschema,public.sales_table,public.customer_info Preparing... Found Database port: 5433 Copying... [==================================================] 100% All child processes terminated successfully. All extract object child processes terminated successfully. Copying... [==================================================] 100% All child processes terminated successfully. restore done!
When you restore an object, Vertica does not always restore dependent objects. For example, if you restore a schema containing views, Vertica does not automatically restore the tables of those views. One exception applies: if database tables are linked through foreign keys, you must restore them together, unless
drop_foreign_constraints is set in the
vbr configuration file to true.
You must also set
coexist, otherwise Vertica ignores
You can specify how restore operations handle duplicate objects by configuring
objectRestoreMode. By default, it is set to
createOrReplace, so if a duplicate object exists, the restore operation overwrites it with the archived version.
Eon Mode Considerations
Restoring objects to an Eon Mode database can leave unneeded files in cloud storage. These files have no effect on database performance or data integrity. However, they can incur extra cloud storage expenses. To remove these files, restart the database and call CLEAN_COMMUNAL_STORAGE with an argument of true.