1. 30 Dec, 2018 1 commit
    • Kirill Smelkov's avatar
      zodbanalyze: Teach it to work with any ZODB storage · 3ce22f28
      Kirill Smelkov authored
      Analyze uses regular ZODB storage API: .iterator() & friends. This way
      it should be possible apply it not only to FileStorage, but to other
      type of storages as well - for example to NEO and ZEO.
      
      Use zodbtools.util.storageFromURL to open a storage by knowing its URL.
      Preserve support to directly apply zodbanalyze to FileStorage deltas.
      
      /reviewed-on nexedi/zodbtools!7
      3ce22f28
  2. 13 Dec, 2018 1 commit
    • Kirill Smelkov's avatar
      zodbcommit - Tool to commit new transaction into ZODB · 960c5e17
      Kirill Smelkov authored
      Zodbcommit reads transaction description from stdin and commits read data into
      ZODB. The transaction to be committed is read in zodbdump format, but without
      first 'txn' header line. For example:
      
          user "author"
          description "change 123"
          extension ""
          obj 0000000000000001 4 null:00
          ZZZZ
      
      This tool could be useful for testing and for low-level database
      maintenance. Please see zodbcommit.py docstring for more details.
      960c5e17
  3. 04 Apr, 2017 2 commits
    • Kirill Smelkov's avatar
      Zodbinfo - Tool to print general information about a ZODB database · 37b9fbde
      Kirill Smelkov authored
      Either all general parameters at once:
      
          $ zodb info neo://neo1@127.0.0.1:24573
          name=NEOStorage(neo1)
          size=0
          last_tid=03be7484ddc7f6ee
      
      or one particular parameter:
      
          $ zodb info neo://neo1@127.0.0.1:24573 last_tid
          03be7484ddc7f6ee
      37b9fbde
    • Kirill Smelkov's avatar
      zodb - Tool to drive them all · 984cfe22
      Kirill Smelkov authored
      We already have 3 commands in zodbtools suite (zodbanalyze, zodbdump &
      zodbcmp) and this is going to grow. And it was already noted some time
      ago with TODO (in 66946b8d) that we need only one command driver to
      invoke everything.
      
      So do it: introduce `zodb` command which can invoke other subcommands
      and show general help or help for subcommand or a topic.
      
      The structure is modelled after `git` and `go` commands. Help topics
      are for now empty but we'll add one help topic in the next patch.
      984cfe22
  4. 17 Nov, 2016 1 commit
  5. 16 Nov, 2016 3 commits
    • Kirill Smelkov's avatar
      zodbdump - Tool to dump content of a ZODB database (draft) · c0a6299f
      Kirill Smelkov authored
      WARNING output format is not stable yet.
      c0a6299f
    • Kirill Smelkov's avatar
      zodbcmp - Tool to compare two ZODB databases · 66946b8d
      Kirill Smelkov authored
      This is a tool to compare two ZODB databases in between tidmin..tidmax
      transaction range with default range being -∞..+∞ - (whole database).
      
      For comparision both databases are scanned at storage layer and every
      transaction content is compared bit-to-bit between the two. The program stops
      either at first difference found, or when whole requested transaction range is
      scanned with no difference detected.
      
      Database storages are specified in files with ZConfig-based storage definition, e.g.
      
          %import neo.client
          <NEOStorage>
              master_nodes    ...
              name            ...
          </NEOStorage>
      
      Please see nexedi/neoppod!4 for
      one of possible contexts.
      
      The tool is generic though and is not NEO-specific. It should be able to
      even check two different storages like ZEO & NEO, or FileStorage and NEO
      etc and thus can be handy.
      
      TODO tests
      66946b8d
    • Kirill Smelkov's avatar
      66a03ae5