itaied
January 9, 2024, 4:09pm
1
hey all
I’m trying to run import-cloud
but it fails with the error:
; Execution error (IllegalArgumentException) at datomic.dev-local.impl/fn (impl.clj:493).
; This client does not support dev-local import.
My setup is:
deps.edn
{com.datomic/client-cloud {:mvn/version "1.0.124"}
com.datomic/local {:mvn/version "1.0.276"}}
dev.clj
(defn sync-local []
(let [conf (->> (io/resource "dev/config.edn")
slurp
edn/read-string)]
(dl/import-cloud
{:source (merge conf {:db-name "dev-itai"})
:dest {:system "production-rep"
:server-type :datomic-local
:db-name "db-name"
:storage-dir :mem}})))
config.edn
{:server-type :ion
:region "region"
:system "system"
:endpoint "url"}
I couldn’t figure out why as I followed the docs .
What am I missing here?
jaret
January 9, 2024, 7:31pm
2
@itaied
I think the issue here is :storage-dir :mem
see:
(dl/import-cloud
{:source {:system "tomhanks"
:db-name "repodb2"
:server-type :ion
:region "us-east-1"
:endpoint "https://awrqwigbi6.execute-api.us-east-1.amazonaws.com"}
:dest {:system "tomhanks"
:server-type :datomic-local
:db-name "repodb2"
:storage-dir :mem}
})
Execution error (IllegalArgumentException) at datomic.dev-local.impl/fn (impl.clj:493).
This client does not support dev-local import.
(dl/import-cloud
{:source {:system "tomhanks"
:db-name "repodb2"
:server-type :ion
:region "us-east-1"
:endpoint "https://awrqwigbi6.execute-api.us-east-1.amazonaws.com"}
:dest {:system "tomhanks"
:server-type :datomic-local
:db-name "repodb2"}
})
=> {:from-t 7, :tx-count 0}
I am confirming with the team but I do not believe you are able to import a cloud db to a mem
DB. Our documentation certainly does not tell you that you cannot do this. And either way the error message here is outdated (mentioning dev-local vs datomic local) and unhelpful.