Liking cljdoc? Tell your friends :D

dev.kwill.datomic-backup


backup-dbclj

(backup-db {:keys [source-conn backup-file stop transform-datoms progress]
            :as arg-map})
source

backup-db-no-historyclj

(backup-db-no-history {:keys [remove-empty-transactions?] :as backup-arg-map})
source

current-state-restoreclj

(current-state-restore {:keys [source-db dest-conn max-batch-size
                               read-parallelism read-chunk debug tx-parallelism]
                        :or {max-batch-size 2000
                             read-parallelism 20
                             read-chunk 5000
                             tx-parallelism 4}})

Restores current state (no history) from source-db to dest-conn.

Options:

  • :source-db - Source database value
  • :dest-conn - Destination connection
  • :max-batch-size - Datoms per transaction (default 500)
  • :read-parallelism - Parallel attribute reads (default 20)
  • :read-chunk - Datoms per read chunk (default 5000)
  • :debug - Enable debug logging (default false)
  • :tx-parallelism - parallelism for transaction worker (default 4)
Restores current state (no history) from source-db to dest-conn.

Options:
- :source-db - Source database value
- :dest-conn - Destination connection
- :max-batch-size - Datoms per transaction (default 500)
- :read-parallelism - Parallel attribute reads (default 20)
- :read-chunk - Datoms per read chunk (default 5000)
- :debug - Enable debug logging (default false)
- :tx-parallelism - parallelism for transaction worker (default 4)
sourceraw docstring

incremental-restoreclj

(incremental-restore {:keys [source-conn dest-conn state-conn
                             eid-mapping-batch-size]
                      :or {eid-mapping-batch-size 1000}
                      :as opts})

Performs incremental, resumable restore with automatic catch-up.

First call: Executes current-state-restore and stores state. Subsequent calls: Automatically performs transaction replay catch-up.

Required options:

  • :source-conn - Source database connection
  • :dest-conn - Destination database connection
  • :state-conn - State database connection for tracking restore progress

Optional options:

  • All current-state-restore options (max-batch-size, read-parallelism, etc.)
  • :eid-mapping-batch-size - Number of EID mappings per state transaction (default 1,000)

Returns: {:status :initial | :incremental :last-source-tx <transaction-id> ; Transaction entity ID from source database :session-id <uuid> :transactions-replayed <n> (only for :incremental, 0 if already up-to-date) :old-id->new-id <mappings> (for :initial) :stats <stats> (for :initial)}

Performs incremental, resumable restore with automatic catch-up.

First call: Executes current-state-restore and stores state.
Subsequent calls: Automatically performs transaction replay catch-up.

Required options:
- :source-conn - Source database connection
- :dest-conn - Destination database connection
- :state-conn - State database connection for tracking restore progress

Optional options:
- All current-state-restore options (max-batch-size, read-parallelism, etc.)
- :eid-mapping-batch-size - Number of EID mappings per state transaction (default 1,000)

Returns:
{:status :initial | :incremental
 :last-source-tx <transaction-id>  ; Transaction entity ID from source database
 :session-id <uuid>
 :transactions-replayed <n> (only for :incremental, 0 if already up-to-date)
 :old-id->new-id <mappings>  (for :initial)
 :stats <stats>              (for :initial)}
sourceraw docstring

restore-dbclj

(restore-db {:keys [source dest-conn stop init-state with? transact progress
                    transform-datoms]
             :or {transact d/transact}})
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close