How to Backup Local SQL Database on a Cloud Service from a Flutter App

433 Views Asked by At

I am writing a flutter app that stores data in a local SQL database (Isar). I want to regularly backup this data on a Cloud Service and occasionally restore it in case a user has a new Phone. I am no expert in SQL or server maintenance and I am looking for an easy way to backup my data on a Cloud. Any experiences with this sort of setup or suggestions where to look are welcome!

I have thought of moving the project entirely to a cloud backend, but my setup does not play well with the popular services like firestore (many writes few reads) and I like keeping things mostly local.

Thanks for your input!

1

There are 1 best solutions below

2
On

You can follow the official guideline provided on the repository itself for backup.

It mentions using the following call:

isar.copyToFile()

Which you can use to upload to the cloud provider. For more information, you can refer to the link below:

https://github.com/isar/isar/issues/579