Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

Restore Object from full backup does not work

Hi Vertica Community,
I am trying to restore a table, which has few "set default" columns, but it does not let me restore. It returns the below message, so I removed the "set default" by using the below alter table command (followed the hint provided by the return message) then tried again, but it still not working.
ALTER TABLE prd.table ALTER COLUMN column_names DROP { SET DEFAULT };
Can someone please help, I accidentally deleted some data, need to restore it back.
fyi - I am able to restore some other tables, but just not this table which has "set default".

----------return message--------------------
[[email protected] backups]$ vbr -t restore -c full_backup.ini --restore-objects=prd.table
Starting object restore of database DATABASE_XXX.
Restoring from restore point: full_backup_20201103_050005
Participating nodes: v_skypad_node0001,v_skypad_node0002,v_skypad_node0003,v_skypad_node0004.
Loading snapshot catalog from backup.
Objects to restore: prd.table
Preprocessing snapshot...
While preprocessing catalog: vertica-extract-snapshot failed:Table prd.dates2 is referenced by prd.table in a SET USING or DEFAULT expression, but is not included in the snapshot. HINT: Back up the tables together, or alter table removing SET USING/DEFAULT on attributes
...
Error: Preprocessing catalog failed.
Restore FAILED.

Tagged:

Best Answer

  • smasma
    Accepted Answer

    The prd.table has been restored by restoring it together with the table that has the SET DEFAULT relationship with.
    In this case:
    vbr -t restore -c full_backup.ini --restore-objects='prd.table,prd.dates2'

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.