Snapshot restore to a different server

I am experimenting with crate and I am at the backup/restore point.
I have managed to take a backup:
CREATE repository snapshots type fs WITH (location=‘snapshots’, compress=true);
CREATE snapshot snapshots.all_tables ALL WITH (wait_for_completion=true);

And now I want to copy the backup files and restore them to a different crate server.
I have tried the obvious, copy the files to the appropriate repo directory on other server and the create the repository with the same statement as above but the “SELECT * from sys.snapshots limit 100;” does not return the snapshot.

Is there any way to make it work?

What version of crate were you using ?

My version is 4.0.10

Is there any update with this?

Hi Robert, thanks for bringing this up again. This should work for sure.

Looks like you already have a backup and copied that over. Can you please confirm that you also created the backup on the new cratedb instance!? Could add the readonly flag while creating the repository, to be fancy.

CREATE repository snapshots type fs WITH (location=‘snapshots’, compress=true, readonly = true);

What else to consider?
Make sure you copy the backup data to the path specified in -Cpath.repo=/data/backup (either on command line or in crate.yml). In case you did not specify anything, just use the same directory structure as on the origin. The cratedb version has to match for a restore, but first you have to be able to list the snapshots at all.

Hope this helps. Let me know in any case.

Best Regards,

1 Like