Answer the question
In order to leave comments, you need to log in
How to synchronize database between server (PostgreSQL) and client (SQLite)?
Interested in one-way synchronization (replication) from the server to the client. The PostgreSQL database is running on the server, and SQLite is running on the client (Android). What is the best way to sync them? Create a backup of the database on the server, translate it into SQLite format and simply transfer it to the client as a database file? Or is there a more elegant way? If the database is large, then "too fat" every time to transfer it all
Answer the question
In order to leave comments, you need to log in
Search here.
https://www.google.com/search?q=postgresql+sqlite+...
If purely by hand. Then you need to do the following, it doesn’t matter through a web service or through sqldump
1. Transfer all dictionaries (1 time)
2. Transfer all data or a subset (1 time)
3. The process of synchronizing the client and server (many times)
So step 1 in this At the moment the data exchange scheme is formed and fixed, it is important to take into account changes in the database in the future. The transfer occurs to the client either by hand or with the help of a service.
GET /api/dbsync/getdictionaries/
{
"schema": "0.4",
[
{ "name":"cityes", "sql": "create table ....."},
.....
]
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question