Release v18.7.0

Another release is out! Thank you to all who contributed <3

SQLite self hosting support

A number of users have been asking for this - thank you to @scotte for doing the work and making a PR! It’s now possile to use SQLite as the sync server database.

This is a good idea for smaller installations with a low number of users

Read the docs: Server setup | Atuin Docs

Bug Fixes

  • (api) Allow trailing slashes in sync_address (#2760)
  • (doctor) Mention the required ble.sh version (#2774)
  • (search) Prevent panic on malformed format strings (#2776) (#2777)
  • Clarify that HISTFILE, if used, must be exported (#2758)
  • Don’t print errors in zsh_autosuggest helper (#2780)
  • atuin.nu enchancements (#2778)
  • Refuse “–dupkeep 0” (#2807)

Features

  • Add sqlite server support for self-hosting (#2770)

Miscellaneous Tasks

  • (ci) Install toolchain that matches rust-toolchain.toml (#2759)
  • Allow setting script DB path (#2750)

Log

chore(release): prepare for release 18.7.0 (#2823)
chore(deps): bump debian (#2811)
chore(deps): bump lukemathwalker/cargo-chef (#2812)
fix: refuse "--dupkeep 0" (#2807)
chore(deps): bump lukemathwalker/cargo-chef (#2765)
chore(deps): bump debian (#2794)
feat: Add sqlite server support for self-hosting (#2770)
fix(search): prevent panic on malformed format strings (#2776) (#2777)
fix: `atuin.nu` enchancements (#2778)
fix: Don't print errors in `zsh_autosuggest` helper (#2780)
fix(doctor): mention the required ble.sh version (#2774)
chore(deps): bump debian (#2772)
fix(api): Allow trailing slashes in sync_address (#2760)
Formatting
fix: clarify that HISTFILE, if used, must be exported (#2758)
chore(ci): Install toolchain that matches rust-toolchain.toml (#2759)
chore: Allow setting script DB path (#2750)
chore(deps): bump tower from 0.4.13 to 0.5.2 (#2734)
chore(deps): bump debian (#2736)
4 Likes

Nice :heart:

Is it possible to migrate from Postgres to SQLite?

2 Likes

I just pushed 18.7.1 with a fix for database URI validation on the server

It is possible, but at the moment it is something you’d have to handle yourself. I suspect a CSV/similar export of postgres → sqlite import would be fine.

Make sure you’re using sync v2 beforehand

It’s unlikely to be something we handle for you due to the variety in self hosted setups + the risk of data loss!

Maybe a server to server sync would to the trick of migrating data without too much hassle.

1 Like

Not quite that, but it did prompt me to realise that the following would work, using one of your client machines

  1. Ensure the client is fully synced with atuin sync
  2. Run atuin logout
  3. Point the client to the new SQLite server, via sync_address
  4. atuin register
  5. atuin sync

And the migration will happen via the client, identical to switching servers otherwise. All other clients can just be logged in to the new server

3 Likes

I’ve installed atuin via cargo install atuin, but it won’t update beyond 18.6.1. Checking crates.io, all subcrates have newer versions released, but not the core atuin crate.

1 Like

Same! Will the crate also be updated sometime soon? @asgeirn Did you move over to using the install script?

@ellie regarding sqlite support, could you elaborate more on what you mean by

You will need to map some sort of persistent volume for the /config directory and it should be writable by the atuin server.

Is this assuming a SQLite DB within a Docker container? What if someone wanted the SQLite db to be present on their host (not in a container & without resorting to using a volume)? Could instructions for that kind of setup be added?

We had some issues with the SQLite addition that lead to the crates.io release failing - should be fixed now, and is out in 18.8

2 Likes

You’d need to add a volume mount to ensure that the database is mapped onto the host from the container. The whole point of SQLite is for it to be a file - it’s either in the container, or mapped onto the host. The only other way is to use the network, and we’ve had postgres do that for a long time now.