Skip to main content

Hi all,
I am having my blueprint for backuping elasticsearch database.
Blueprint looks quite the same as the original one, but with just hardcoded values for username and password.

But, unfortunately, I am getting this error

Look at the first line of the snapshot

As you can see, my {{ toJson .Profile }} is not even rendered correctly, so I am getting value of ‘null’ for that.
Not sure why that is happening. 
My elasticsearch statefulset, which I am trying to backup, is running inside ‘elastic-kasten-test’ project on OpenShift. And my kasten pod are running inside ‘kasten-io’ project. Strange thing is that I cannot see profiles from elastic-kasten-test project, but I can see them from kasten-io project.

Cannot see profiles in elastic-kasten-test project
Profiles seen in kasten-io project


Also, here is my profile on Kasten UI.
 

Can someone please help with this?
Thank you all in advance!

Thanks @branko.pavlovic for creating this topic,

Would you be able to add the blueprint YAML(after redacting sensitive hardcoded values) ?

If not the entire blueprint, It would be helpful if you can share the entire backup block under actions.

 


Hi @jaiganeshjk,
Sure, this is my backup section of the blueprint

Backup section

 And inside policy, here is how I defined it.
 

First part of my policy
Second part of policy

Hope that this will give you some helpful info.
Regards,
Branko


Thanks a lot for all the information that you have added here.

There are two types of blueprint execution that are supported by K10. 

 - Hooks with blueprints.

 - Data backup with blueprints.

Hooks with blueprints are executed before or action based on how it is configured in the policy.

Data operations with the profiles are not supported in this type of blueprint execution.

These execution hooks are designed in a way that these can be used to prepare your app/db before & after the backups. These can be some database commands to quiesce or unquiesce the database but not the data operations. These pre/post hooks cannot be used to capture output artifacts. 

I see from the above policy screenshots that you are using the blueprints as hooks and that’s the reason the profile is not rendered.

You will have to remove this hooks from the policy and follow the next topic that I am going to explain.

 

Data backup with blueprints are used to override K10s snapshot workflow with the backup strategy that the blueprint specifies. This is what needs to be used to do a logical backup of your elasticsearch.

This workflow is invoked by a blueprint annotation to the workload(statefulset in this case) as specified in this documentation(https://docs.kasten.io/latest/kanister/elasticsearch/install_logical.html)

kubectl annotate statefulset elasticsearch-master kanister.kasten.io/blueprint='elasticsearch-blueprint' \
      --namespace=elasticsearch

This will make sure that the profile can be rendered.

Please let me know if this works or if you have further questions.


Great, thank you very much @jaiganeshjk!! This solved my problem.


@branko.pavlovic That’s great to here. Would you be able to mark my comment as an answer so that it may help others in future.


Comment