Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    How to translate entryid into the title of an object?

    Kopano Groupware Core
    2
    3
    256
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • divB
      divB last edited by

      Hi,

      I think my database is corrupted and neither kopano-fsck nor kopano-dbadm are able to fix it.

      I can run kopano-backup -u user -l debug to figure out where things go wrong. Example:

      [...]
      2021-04-22T07:12:45.080: [DEBUG   ] backup0 - folder 0EFA6F03327C4D4DB2965F7C2F1264C24300000000000000: new/updated document with entryid 00000000A3E3098F8D4A4D2CA4E89FEB4BEFA1030100000005000000E5D1223E279BA145B992F7204AB8D4C400000000, sourcekey 2414D7597BE5CB4D8F732660ACF52CEC642200000000
      2021-04-22T07:12:45.084: [ERROR   ] backup0 - Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/kopano/ics.py", line 126, in ImportMessageChange
          mapistore, entryid.Value, 0)
      AttributeError: 'NoneType' object has no attribute 'Value'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/kopano/log.py", line 138, in log_exc
          try: yield
        File "/usr/lib/python3/dist-packages/kopano_backup/__init__.py", line 180, in main
          self.backup_hierarchy(path, stats, options, store, user, server, config)
        File "/usr/lib/python3/dist-packages/kopano_backup/__init__.py", line 241, in backup_hierarchy
          self.backup_folder(data_path, data_path, folder, subtree, config, options, stats, store, user, server)
        File "/usr/lib/python3/dist-packages/kopano_backup/__init__.py", line 283, in backup_folder
          new_state = folder.sync(importer, state, log=self.log, stats=stats, begin=options.period_begin, end=options.period_end)
        File "/usr/lib/python3/dist-packages/kopano/folder.py", line 1041, in sync
          stats=stats)
        File "/usr/lib/python3/dist-packages/kopano/ics.py", line 296, in sync
          (steps, step) = exporter.Synchronize(step)
        File "/usr/lib/python3/dist-packages/MAPICore.py", line 1878, in Synchronize
          return _MAPICore.IExchangeExportChanges_Synchronize(self, INOUT)
        File "/usr/lib/python3/dist-packages/kopano/ics.py", line 106, in ImportMessageChangeAsAStream
          self.ImportMessageChange(props, flags)
        File "/usr/lib/python3/dist-packages/kopano/ics.py", line 137, in ImportMessageChange
          self.log.error('could not process change for entryid %s (%r):', _benc(entryid.Value), props)
      AttributeError: 'NoneType' object has no attribute 'Value'
      
      2021-04-22T07:12:45.086: [INFO    ] backup - queue processed in 17.92 seconds (1762 changes, ~98.34/sec, 1 errors)
      2021-04-22T07:12:45.086: [INFO    ] backup - stopping backup
      
      

      I now know that an object with entryid == 00000000A3E3098F8D4A4D2CA4E89FEB4BEFA1030100000005000000E5D1223E279BA145B992F7204AB8D4C400000000

      causes issues and I want to delete it. But with hundreds of thousands entries, how do I know which item to delete (e.g. via WebApp), based on this entryid?

      fbartels 1 Reply Last reply Reply Quote 0
      • fbartels
        fbartels Kopano @divB last edited by

        Hi @divb,

        I have checked with a developer and to resolve the entryid the easiest is to do this with python.

        He suggested a script like the following:

        import kopano
        user = kopano.User('username')
        item = user.store.item(entryid="00000000A3E3098F8D4A4D2CA4E89FEB4BEFA1030100000005000000E5D1223E279BA145B992F7204AB8D4C400000000")
        item.folder.delete(item)
        

        Regards Felix

        Resources:
        https://kopano.com/blog/how-to-get-kopano/
        https://documentation.kopano.io/
        https://kb.kopano.io/

        Support overview:
        https://kopano.com/support/

        divB 1 Reply Last reply Reply Quote 1
        • divB
          divB @fbartels last edited by

          @fbartels AMAZING! Thanks!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post