Fork me on GitHub
#xtdb
<
2020-05-08
>
dvingo16:05:25

Are there any notes on doing backup + restore of a single node that uses rocksdb? Would copying the db-dir and event-log dir be sufficient for a cheap (easy) solution?

refset21:05:51

Hey @U051V5LLP copying the directories should be fine when the node is powered down. If the node needs to stay running then you can use crux.backup/backup and friends

dvingo23:05:30

Cool, thank you - i'll take a look into that Is there a recommended setup for single node deploy (using sql or single-node kafka for example)?

dvingo23:05:37

Or is rocksdb fine?

dvingo23:05:41

Mostly concerned with data loss, This is my config at the moment:

(defn rocks-config [data-dir]
  {:crux.node/topology                 '[crux.standalone/topology
                                         crux.kv.rocksdb/kv-store]
   :crux.kv/db-dir                     (str (io/file data-dir "db"))
   :crux.standalone/event-log-dir      (str (io/file data-dir "eventlog"))
   :crux.standalone/event-log-kv-store 'crux.kv.rocksdb/kv
   :crux.standalone/event-log-sync?    true
   :crux.kv/sync?                      true})

refset23:05:07

If you're thinking of running postgres or a small kafka setup on the same machine as your single node then I think that's overkill and you probably are better off just using rocks, but I would personally use a managed jdbc backend (via crux-jdbc) or managed kafka of some kind (esp. Confluent Cloud).

refset23:05:39

If your concern is data loss then a managed backend will always win, unless you have an ops team, imo

dvingo00:05:30

that sounds good to me, i'll stick with rocks for now and look into the hosted options down the road

👍 4