#community-help

Disaster Recovery and Backups with Typesense Cloud

TLDR Viji asked about performing backups in Typesense Cloud for disaster recovery purposes. Jason provided guidance on how to backup and restore data, while explaining why Typesense does not provide snapshot functionality like AWS Aurora RDS.

Powered by Struct AI

1

1

12
10mo
Solved
Join the chat
Dec 12, 2022 (10 months ago)
Viji
Photo of md5-d2def4ce72082649c7191218a9e73146
Viji
07:26 PM
We are using Typesense Cloud without High Availability (for cost reasons) and to plan for Disaster Recovery, we would like to take a backup every x hours and store them on our S3 bucket. Has anyone done this? What are the steps involved?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:34 PM
You want to backup the output of the following endpoints:

GET /collections
GET /collections/<collection_name>/documents/export
GET /collections/<collection_name>/synonyms
GET /collections/<collection_name>/overrides
GET /aliases
GET /keys
Viji
Photo of md5-d2def4ce72082649c7191218a9e73146
Viji
07:52 PM
Thank you Jason! So, how would we restore from these backups since you manage the cluster?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:53 PM
You would then use the create collections/synonyms/documents/aliases/keys endpoints to add this data back into the cluster if/when needed

1

1

Dec 13, 2022 (10 months ago)
Sergio
Photo of md5-19856b8e92142bdd0747d7a3706736c8
Sergio
10:24 AM
This is because the Snapshot functionality is not for Cloud edition right?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:56 PM
We do use the snapshots functionality internally in Typesense Cloud, but we don’t expose those snapshots to you in Typesense Cloud
Dec 22, 2022 (10 months ago)
Viji
Photo of md5-d2def4ce72082649c7191218a9e73146
Viji
07:09 PM
Can you expose these snapshots like AWS does with Aurora RDS?
Dec 23, 2022 (10 months ago)
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:31 AM
Yeah, we were thinking about doing this… May I know what your use case is for having access to these snapshots?
Viji
Photo of md5-d2def4ce72082649c7191218a9e73146
Viji
12:51 PM
So that we could restore from them for Disaster Recovery purposes.
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:06 PM
I see, one reason we initially didn’t expose these snapshots is because Typesense is not intended to be a primary datastore - meaning, you have your primary copy of the data in your primary data store and you’re only syncing a copy of it into Typesense. So for disaster recovery, we figured users would just resync their data into Typesense from their primary datastore…
04:06
Jason
04:06 PM
This is unlike RDS, where they are the primary datastore
Viji
Photo of md5-d2def4ce72082649c7191218a9e73146
Viji
04:24 PM
Fair enough. We just have to account for the time to process the data