我想使用Xamarin Azure SDK for My Xamarin App备份和还原SQLite数据库文件 [英] I want to take backup and restore of SQLite Database file using xamarin Azure SDK for My Xamarin App

查看:92
本文介绍了我想使用Xamarin Azure SDK for My Xamarin App备份和还原SQLite数据库文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用xamarin Azure SDK来下载和管理Xamarin的本地数据库.表格应用程序.

I am using xamarin Azure SDK to download and manage the local database for my Xamarin . Forms App.

我们面临下载时间问题,因为我们有很多数据, 因此,我正在考虑从一台设备备份一次SQLite文件,并使用它在不同设备上还原,就像还原同一个SQLite文件一样.

We are facing downloading time issues because we have a lot of data, so I am thinking of taking backup once of the SQLite File from one device and use it to restore on different devices as restoring the same SQLite File.

计划使用Azure Blob存储存储SQLite文件的备份,并为不同的设备计划下载该SQLite文件的blob,并考虑在不同的设备上还原它.

Planned to use Azure Blob storage to store backup of SQLite files and for different device planning to download that blob of SQLite file and thinking of restore it on different devices.

任何帮助将不胜感激.

谢谢:)

推荐答案

我过去使用的一种方法是在azure端创建一个控制器方法,客户端应用程序可以调用该方法来生成预先填充的sqlite数据库或在服务器上快照"(确保包括所有额外的天蓝色表和列),然后将文件的下载URL返回给客户端.我们还压缩了快照数据库,以减少下载时间.您可以根据需要将此快照"存储在天蓝色的blob中.

An approach I have used in the past is to create a controller method on the azure end which the client app can call that generates a pre-filled sqlite database or 'snapshot' on the server (making sure you include all the extra azure tables and columns) and then return a download url for the file to the client. We also zip-up the snapshot database to reduce the download times. You could store this 'snapshot' in azure blob if you desired.

这篇关于我想使用Xamarin Azure SDK for My Xamarin App备份和还原SQLite数据库文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆