S
S
Sergey2018-06-14 02:46:19
Android
Sergey, 2018-06-14 02:46:19

How to backup data in android application?

Всем привет. Столкнулся с вопросом. В приложении имеется база данных. Необходимо ее, по желанию пользователя, сохранять где нибудь в сети интернет. При чем нет разницы, файлом базы или просто пересылать данные. Подскажите в каком напровлении начать изучение? Читал про firebase, но пока толком не понял как можно реализовать. Конкретно интересует:
1. Какое хранилище выбрать (лучше конечно какое нибудь облако)?
2. По средствам чего производить сохранение и считывание?
П.с. база не обьемная.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Boris K., 2018-06-14
@Enot54561

The most obvious answer is Google Drive. Most Android users have a Google account, the API is public and there are a lot of examples around.
And by analogy - Dropbox .
Both solutions are free for both the developer and the user, with several tens of thousands of daily synchronizations in their project, up to 10 people a month report problems, but the problems are usually temporary and possibly local.

P
pfg21, 2018-06-14
@pfg21

2. it is best to backup the database using the application that uses the database.
the application flushes the database buffers to disk, closes the database - i.e. base on disk in a fully consistent state. after which the database file is sent to the specified cloud (you can still compress it a bit). after which it connects to the database and continues to work.
the question "where" to decide with the user - ie. add new repositories upon request. For example, I pour backups on my home FTP.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question