Open pawamoy opened 3 days ago
Hmmm I guess I could simply check the database schema and insert things in it directly ^^
It's not quite that simple I'm afraid. We actually have two databases, and it's important to ensure that data is copied across them properly.
I'd first disable auto-sync if you've already set it up. auto_sync = false
in your config file.
There is a command that will take the data from history.db, and insert it into records.db. Once you've inserted to history.db, run:
atuin history init-store
This should be idempotent, and the process may happen automatically at sync time.
Once complete, I'd issue
atuin store rebuild history
This will wipe out history.db, and rebuild it from the records.db. Just to make sure everything is consistent!
Then, run
atuin sync
You should be good to go from here, and can re-enable auto_sync.
also - love all the graphs from your tool!
Awesome, thank you so much for the clear instructions! I'll try that and report back :slightly_smiling_face:
also - love all the graphs from your tool!
Thanks! I believe you have everything you need to offer similar graphs in Atuin too :smile: I could actually consider contributing if that's something you're interested in :relaxed:
So I have been using my own history tool for quite some time now, and have 220K+ commands in a file (+ other backed up files from other machines), in a custom format, that I'd like to import in Atuin :slightly_smiling_face:
How would I go about feeding Atuin programmatically, since surely the
import
subcommand will not support my history file format? You can assume I have all the necessary fields (and more :smile:).