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

Combine the mcfly databases on different machines. #189

Open
hongyi-zhao opened this issue Aug 23, 2021 · 8 comments
Open

Combine the mcfly databases on different machines. #189

hongyi-zhao opened this issue Aug 23, 2021 · 8 comments

Comments

@hongyi-zhao
Copy link

Assuming I run mcfly on multiple machines, one mcfly database file will be generated on each machine. So, the problem is how to combine these mcfly databases into one.

Regards,
HY

@cantino
Copy link
Owner

cantino commented Aug 23, 2021

They're SQLite databases so you'd need to merge each of their tables. This would take a bit of code, but should work.

@hongyi-zhao
Copy link
Author

hongyi-zhao commented Aug 24, 2021

Why not implement the corresponding option in mcfly?

@cantino
Copy link
Owner

cantino commented Aug 24, 2021

How would you envision that option working?

Alternatively, you could try synchronizing the database using something like Dropbox or Syncthing?

@hongyi-zhao
Copy link
Author

How would you envision that option working?

Just an idea, no specific scenario.

Alternatively, you could try synchronizing the database using something like Dropbox or Syncthing?

Do you mean to use a centralized cloud storage workflow?

@cantino
Copy link
Owner

cantino commented Aug 25, 2021

Now that I think about it, Dropbox wouldn't work because the database would always conflict. I'm not sure what a clean way would be to support streams from multiple machines besides having a merge tool, or maybe allowing it to read from multiple DBs that are then synced. I think this is out of scope for this project, though.

@deini
Copy link

deini commented Apr 14, 2022

What about git + a merge driver like the one https://github.com/larkery/zsh-histdb uses?

@nicoandmee
Copy link

I think this also would be a super useful feature, I've wasted multiple hours today trying to import another mcfly history.

@cantino
Copy link
Owner

cantino commented Jul 16, 2022

I'm open to contributions of a merge tool, or an ENV variable that lists multiple DBs to read from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants