This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-12-18
Channels
- # adventofcode (12)
- # asami (2)
- # babashka (95)
- # beginners (17)
- # biff (5)
- # calva (1)
- # clojure (90)
- # clojure-europe (15)
- # clojure-nl (1)
- # clojure-norway (8)
- # clojure-uk (6)
- # clojuredesign-podcast (2)
- # clojurescript (34)
- # clr (1)
- # community-development (42)
- # cursive (11)
- # data-science (1)
- # datomic (13)
- # graalvm (5)
- # hoplon (2)
- # hyperfiddle (32)
- # off-topic (1)
- # pathom (6)
- # releases (1)
- # shadow-cljs (25)
- # squint (4)
- # xtdb (10)
Trying to find most simple solution for backing up rocksdb (document-store, transaction-store) of running application. What i have found is tool ldb.
ldb --db=./data/dev/doc-store backup --backup_dir=./data/dev/doc-store_backup
ldb command fails with:
Failed: IO error: While lock file: /home/petr/work/xtdb-play/data/dev/doc-store/LOCK: Resource temporarily unavailable
For successful backup I have to stop node and then start it again after backup is complete.Hey @U068KARHD09 that's a limitation of how Rocks interacts with the filesystem. The only "safe" / supported way of doing this with a running node is to use the lower level APIs. Is this something you're trying to support in production already? Or are you still designing the architecture?
The checkpointing system already implements all this logic, using the relevant internal APIs, but currently only works for the index-store.
No it's not production app, it's a playground. I am playing a few months with clojure at all and finding right libraries for my future web projects and xtdb will for sure be one of them but probably with postgres backend.
Cool, good to know, happy to help with the internal APIs if you do want to go down that route. But yeah using Postgres as the document store/tx-log bypasses the problem
What lower level API do you mean please? Use BackupEngine from rocksdbjni? I think lock from node doesn't allow this anyway.
along these lines: https://github.com/xtdb/xtdb/blob/8d2ae275b897ba1287b33be9b716d504eb50cbf1/modules/rocksdb/src/xtdb/rocksdb.clj#L247-L252
another way should be use of filesystem snapshot with (zfs snapshot or btrfs .....) but it's a little bit risky 🙂
the workaround code here might be helpful also (i.e. note there's a filesystem checkpoint store) https://github.com/xtdb/xtdb/issues/1813