Sqlite Database Export/Import

I have a Native App built with VoltBuilder.

Is there a way to export & import an Sqlite Database using:

Google Drive

Thank you

How much data is there?

It is in the range of 2-5MB

Is it loaded once at installation, or does it get updated regularly?

If it gets updated, does it all get changed or just part?

It is loaded as a created/configured/empty database at installation. The information in the tables gets added/modified/deleted as the app is used.

The nature of the information is such that multiple users (with the app on other devices, iOS or Android) may want a copy of the information, rather than to re-enter the information. This will not occur often.

The ideal would be if the user that has the populated database could transfer the entire database file to another device that runs the app. The second user would completely replace the database file on their device.

The idea behind using Google Drive, Dropbox, OneDrive… is to use a storage facility that the user likely already uses. Because of the nature of the information in the database I do not desire to “store” the database on my server.

Another possible scenario might be to use my server for temporary storage (<12 hours).
When the app user selects “Upload Database” the app uploads the entire database file to my server and sends the user a CODE that is required to download the database (within 12 hours).

When a second user wants to obtain the database copy for their device, they select “Download Database” and enter the CODE previously supplied. If the operation is requested within 12 hours of the original upload, the server downloads the requested database and the app replaces the entire database file. This scenario is much better for the user since it eliminates use of 3rd party storage. Although I am storing the file on my server, the risk to me is less since the file is only available for 12 hours.

While it’s possible the scenario you describe might work, it’s not how it is normally done these days.

Best practise is to have a secure server holding the master copy of the data. Your app will do ajax calls to get updates to the database, or to send new information to the server.

I appreciate your response.

I do not however want to be responsible for securing “highly confidential” personal information on a server.

What would be an “abnormal, not best practice” solution?

Thank you

LocalStorage is good for saving a copy of the data base, rather than AJAXing the data to a server. I think that is really what you are looking for - a self contained system on the device.

The only problem (well, one big problem) with this approach is IOS with a web app: The seven day rule for IOS to delete your local storage when the user doesn’t access your web app.

What tool could be used to move the file between devices?

Thanks for your help!

Is there a way to attach the database file to an email?

I may be wrong on this, but it is my understanding that if the Web App is run from the Home Screen on iOS devices that the 7 day rule doesn’t apply. What’s your thought on this?

Thanks, John

This is a native app built by VoltBuilder…

I appreciate your help!

My own opinion is to stick to best practices on something like this. There are usually good reasons why everybody does it that way.

Thank you for the good advice!