Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backup/sync between instances #413

Open
test2a opened this issue Jul 1, 2022 · 11 comments
Open

backup/sync between instances #413

test2a opened this issue Jul 1, 2022 · 11 comments
Labels
formidable-request Scope of request is large and requires further evaluation before dismissing or picking up.

Comments

@test2a
Copy link

test2a commented Jul 1, 2022

Since the current software is supposed to be run on the desktop, i could not find a way for the data to be used in a multi-user environment.
is that even possible right now? i would want like 5-10 people working on a single company at once, do we open the same DB or have one master and the others send/recieve data from that? how could the software solve conflicts?

@18alantom
Copy link
Member

No, as of now there's no way of doing this, you can store the database file on something like Google Drive and then sync it across all devices but this will still cause conflicts.

There is a plan to add multi-user support but it will take some time.

@18alantom 18alantom added enhancement New feature or request formidable-request Scope of request is large and requires further evaluation before dismissing or picking up. and removed enhancement New feature or request labels Jul 2, 2022
@solancer
Copy link

solancer commented Oct 3, 2022

It would be great to see a backup/sync option

@hdell
Copy link

hdell commented Mar 9, 2023

SQL Lite just does not scale when using File System OpLocks... However, client/server database engines (such as PostgreSQL, MySQL, or Oracle) usually support a higher level of concurrency and allow multiple processes to be writing to the same database at the same time. I would suggest you switch to MySQL/MariaDB then mutli-user support should be a lot easier to implement...

@promexio
Copy link

promexio commented May 8, 2023

What about this request? I think it could be very interesting to have this feature! e.g. on the company creation a setup entry where the user needs to select whether he'll work on a "one-man" company on prem (sqlite) or connect to a multi-user environment (Mariadb).

@18alantom
Copy link
Member

I will be adding backup in the next few months. Multi-user might take longer.

As for MariaDB and SQLite, yes SQLite doesn't have concurrent writes, but considering that Frappe Books for multi-user environment is bound to have much fewer users (order of 10s) than say a full fledged ERP, SQLite still suffices (it is the fastest db out there).

Each instance i.e. company, get's their own SQLite db. This may seem counter intuitive but the portability of SQLite means the same instance can support local and cloud usage. And even readonly modes for say online report viewing (SQLite can run in the browser).

Anyways, the final decision of how to handle multi-user will be on the basis of some experimentation.

@promexio
Copy link

promexio commented May 9, 2023

Ok, I'd be glad to contribute to the testing of that experimentation.
For some very small companies, multiuser support is needed as early as there is one person in charge of the accounting / purchase stuff.
Even though, if it's just reading reports, I guess some acces via dbeaver or an R{} script would do it, but only until the second person is not working actively ...

@promexio
Copy link

promexio commented Jun 5, 2023

Any news on this?

@18alantom
Copy link
Member

@promexio this will take some time, before I begin with this I need to tackle a bunch of other features and issues. Will update here when I begin with it.

@erik-gross-hardt
Copy link

I built this #695 maybe that's something you might wanna look into.

@mildred
Copy link
Contributor

mildred commented Aug 31, 2023

You might be interested in LiteFs https://github.com/superfly/litefs which does exactly that : replication of a SQLite database, although write requests should be forwarded to the master instance.

@njmulsqb
Copy link

+1 as I am using Frappe books on multiple devices synced using onedrive. It sometimes causes issues and conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
formidable-request Scope of request is large and requires further evaluation before dismissing or picking up.
Projects
None yet
Development

No branches or pull requests

8 participants