Restore Snapshot from AWS S3 bucket repository into new Crate Cluster

Hello to all,

I have a repository with snapshots in a AWS S3 bucket created from a Crate Cluster.
Now I need to migrate the data to a new Crate Cluster but I cannot restore the snapshots from the previous Crate Cluster. Is that even possible? To restore snapshots from another repository?

Appreciate any insights regarding this subject

That should definitively work. You have to create the repository manually and provide the correct credentials. After that you will be able to list the snapshots you want to use for the restore.

Please be also sure you use the same crate version you used for backup.

Hi Walter, thank you for your reply,

In my new Crate cluster, to import the snapshot I tried to create a repository pointing to the same S3 AWS bucket, but I get an error saying that the repository already exists. :frowning:

I’ve used on the first repository: “CREATE REPOSITORY $REPOSITORY TYPE s3 WITH (access_key=’$AWS_ACCESS_KEY_ID’, secret_key=’$AWS_SECRET_ACCESS_KEY’, bucket=’$BUCKET’, base_path=’$SNAPSHOT’, compress=true);” and then I generated the snapshot “CREATE SNAPSHOT repo.snaphot ALL WITH (wait_for_completion=true);” after completion, in the new cluster I tried:

“RESTORE SNAPSHOT repo.snapshot TABLE sitelog WITH (wait_for_completion=true);” but since I can’t point the new crate cluster to the old repository, the snapshot can’t be used to restore tables.

There aren’t other repositories in the new cluster because I want to use the old one and when I try to created a new one pointing to the old one in the S3 bucket it gives me an error saying it already exists.

Could you please share the error message you see and which cratedb version are you using?
The select * from sys.snapshots limit 10 does not return anything?

Make sure to use the same parameters on creating the new repository, that you used for the old cluster.

Right now I have 0 records for snapshots in my new Cluster v3.1.6 the same version as the old cluster.

If I create a new repository with another name, the snapshot isn’t there because it’s in the old repo. If I try to create the a repository with the same name, pointing to the old repository, I get an error saying that the repository already exists. I’ll recreate the steps and post the exact message.