Transferring data between sqlite databases

I am developing an application in Django using sqlite for windows. Will these db work on a Linux machine? If not, then how do I replicate data on a new db on linux (scripting is one way)?

+3
source share
2 answers

According to Robert, SQLite files should work on any platform. If you decide to switch to MySQL or PostgreSql, you can run the following (standard) command to save your database on a Windows computer:

manage.py dumpdata <app1> <app1> > mydbdump.json

and then configure settings.py on the Linux machine for the MySQL or PostgreSql database and run:

manage.py syncdb
manage.py loaddata ./mydbdump.json

I have successfully done this several times to switch from MySQL to SQLite, it worked fine.

dumpdata , . all-inclusive Django, , syncdb. , ,

IntegrityError: app_label,

, , .

+9

SQLite Windows, Linux.

- - 32- 64- -endian . SQLite .

: http://sqlite.org/about.html

+8

Source: https://habr.com/ru/post/1709573/


All Articles