Restoring from local storage file

Hii , I am new to cockroachdb , I want to restore a cockroachdb from dump from my local , when I tried running RESTORE FROM '/home/fortelogic/Desktop/30042021/booking.sql';

it is showing ERROR: failed to open backup storage location: unsupported storage scheme: "" - refer to docs to find supported storage schemes

I cant understand what this error is . I goolged it but hardly find one . Could anybody suggest me a way to restore from local file . Any help will be appreciated

Hi Risvan! It appears that you are getting some help in the community slack on how to import a cockroach dump file :slight_smile:

In case anyone else comes across the same error message, the storage scheme options are documented in the “URL format” section of Use Cloud Storage for Bulk Operations | CockroachDB Docs.

hii laurenbarker, I am glad that you replayed, I tried to restore the local file with node local IMPORT PGDUMP 'nodelocal://1/home/fortelogic/booking.sql';but it appears

ERROR: unsupported statement: ALTER TABLE public.contacts VALIDATE CONSTRAINT fk_contacts_booking
HINT: To ignore unsupported statements and log them for review post IMPORT, see the options listed in the docs: https://www.cockroachlabs.com/docs/stable/import.html#import-options
root@localhost:26257/defaultdb> 
ERROR: interrupted
Failed running "sql"

Did you try adding WITH ignore_unsupported_statements; at the end of your import statement as suggested in the error output?

IMPORT PGDUMP 'nodelocal://1/home/fortelogic/booking.sql' WITH ignore_unsupported_statements;

1 Like

thanks for the replay, that helped :slightly_smiling_face: