slim-bean / loki-shell

How to use Loki to store and centralize your shell history from anywhere and search it using ctrl-r and fzf
Apache License 2.0
83 stars 8 forks source link

Centralized and offline mirror #10

Open Jab2870 opened 4 years ago

Jab2870 commented 4 years ago

Hi,

I really like this so thank you for putting together the guide and scripts for setting it up.

I have a server and a desktop that are always connected to the internet. It makes a lot of sense for these to communicate with a centralized server. However, I also use a laptop that isn't always connected. Would it be possible to set this up so that when my laptop is offline, it stores commands locally and pushes them to a centralized server when it re-connects? Although not as important, it would also be helpful if a copy of the database could be stored offline on my laptop, synchronizing when online.

Thanks in advance for any help

slim-bean commented 4 years ago

Hi @Jab2870 glad you like it!

I've run into similar situations myself, and out of the box Loki isn't going to have an off the shelf solution for this and to be honest I'm not sure the best way to handle this just yet. I will have to put some thought into it.

At a miniumum it would be nice to fallback on the builtin history if you can't reach a remote Loki instance just so you have some shell history instead of none, this might be my thoughts for a first step.