kopano-backup restore



  • HI everyone.

    When i want to restore i use the command

    kopano-backup --restore -u username however i get the following error

    please specify path to backup data

    how can this be resolved?



  • @ckruijntjens

    i recreated the user and store



  • @ckruijntjens

    i want to restore the full mailbox.


  • Kopano

    @ckruijntjens said in kopano-backup restore:

    how can this be resolved?

    you have to give the path to the backup set when running kopano-backup, the man page says the following:

    EXAMPLES
           Backup user 'henk', creating/updating a backup directory with the same name:
    
           kopano-backup -u henk
    
           Restore the same user (possibly on another server):
    
           kopano-backup --restore henk
    

    so in your case kopano-backup --restore /path/to/backup/username (if username has been the same value before and after restore, else kopano-backup --restore -u username /path/to/backup/username)



  • @fbartels
    hi now it does something but its not restoring.

    2018-04-11 13:58:38,517 - backup - INFO - starting backup
    2018-04-11 13:58:38,520 - backup - INFO - starting restore of /opt/mailbackup/chris
    2018-04-11 13:58:38,541 - backup - INFO - restoring to store 0000000038A1BB1005E5101AA1BB08002B2A56C200007A617261666136636C69656E742E646C6C000000000073BE2469A9EA4D7393D40F1DFD2BA863010000000100000000DF9F73D8D64013A1E49647EA607DF170736575646F3A2F2F556E6B6E6F776E00
    2018-04-11 13:58:38,554 - backup - DEBUG - restoring folder Calendar
    2018-04-11 13:58:38,647 - backup - DEBUG - restoring folder Contacts
    2018-04-11 13:58:38,692 - backup - DEBUG - restoring folder Deleted Items
    2018-04-11 13:58:38,762 - backup - DEBUG - restoring folder Drafts
    2018-04-11 13:58:38,996 - backup - DEBUG - restoring folder Inbox
    2018-04-11 13:58:39,044 - backup - DEBUG - restoring folder Journal
    2018-04-11 13:58:39,085 - backup - DEBUG - restoring folder Junk E-mail
    2018-04-11 13:58:39,130 - backup - DEBUG - restoring folder Notes
    2018-04-11 13:58:39,179 - backup - DEBUG - restoring folder Outbox
    2018-04-11 13:58:39,204 - backup - DEBUG - restoring folder Sent Items
    2018-04-11 13:58:39,266 - backup - DEBUG - restoring folder Tasks
    2018-04-11 13:58:39,313 - backup - INFO - restoring metadata
    2018-04-11 13:58:39,357 - backup - INFO - restore completed in 0.82 seconds (0 changes, ~0.00/sec, 0 errors)
    2018-04-11 13:58:39,522 - backup - INFO - stopping backu
    

    It sees no changes? my inbox is empty?



  • @fbartels

    can it be that everything is still in softdelete. also the older account? If so how do i delete all softdelete accounts?



  • @fbartels

    all kinds off error that it can not find folders. Is it not created at the restore?

    NotFoundError: no such folder:


  • Kopano

    @ckruijntjens said in kopano-backup restore:

    It sees no changes? my inbox is empty?

    looking at your logs:

    @ckruijntjens said in kopano-backup restore:

    2018-04-11 13:58:39,357 - backup - INFO - restore completed in 0.82 seconds (0 changes, ~0.00/sec, 0 errors)

    your backup set did contain folders, but no items in the folder

    @ckruijntjens said in kopano-backup restore:

    all kinds off error that it can not find folders. Is it not created at the restore?
    NotFoundError: no such folder:

    of course folders are created, you can see that in the log you posted above. where do you get these errors?



  • @fbartels

    hi this is not correct. there are more folders then this. And after restore i can not see the folders?



  • @fbartels

    After i run kopano-backup --restore -u username /backupfolderpath/user

    it runs for certine items and then i get several errors that folders could not be found.

    2018-04-11 19:38:14,747 - backup - ERROR - Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/kopano/log.py", line 89, in log_exc
        try: yield
      File "/usr/lib/python2.7/site-packages/kopano/service.py", line 182, in start
        _daemon_helper(self.main, self, self.log)
      File "/usr/lib/python2.7/site-packages/kopano/service.py", line 59, in _daemon_helper
        func()
      File "/usr/lib/python2.7/site-packages/kopano_backup/__init__.py", line 398, in main
        self.restore(data_path)
      File "/usr/lib/python2.7/site-packages/kopano_backup/__init__.py", line 485, in restore
        folder = store.subtree.folder(restore_path, create=True)
      File "/usr/lib/python2.7/site-packages/kopano/folder.py", line 548, in folder
        raise NotFoundError("no such folder: '%s'" % path)
    NotFoundError: no such folder: 'Besteld_tegelmateriaal'
    
    

    After i done this no mail is being delivered to mailboxes. If i watch my server log i see all kind ofduplicate errors?

    Wed Apr 11 19:41:39 2018: [error  ] SQL [00000011] Failed: Duplicate entry '26080-%\x1F\x89\xC6\x0E\x81F\xC3\xB0\xF5KH\x91\xDA\xCE\x86:\x0C\' for key 'bin', Query Size: 106, Query: "INSERT INTO indexedproperties(hierarchyid,tag,val_binary) VALUES(27812,26080,'%^_<89>Æ^N<81>FðõKH<91>ÚÎ<86>:^L\0\0\0\0')"
    Wed Apr 11 19:41:39 2018: [error  ] KDatabase::I_Update() query failed: INSERT INTO indexedproperties(hierarchyid,tag,val_binary) VALUES(27812,26080,'%^_<89>Æ^N<81>FðõKH<91>ÚÎ<86>:^L\0\0\0\0'): Duplicate entry '26080-%\x1F\x89\xC6\x0E\x81F\xC3\xB0\xF5KH\x91\xDA\xCE\x86:\x0C\' for key 'bin'
    Wed Apr 11 19:41:39 2018: [error  ] SQL [00000014] Failed: Duplicate entry '26080-%\x1F\x89\xC6\x0E\x81F\xC3\xB0\xF5KH\x91\xDA\xCE\x86;\x0C\' for key 'bin', Query Size: 106, Query: "INSERT INTO indexedproperties(hierarchyid,tag,val_binary) VALUES(27813,26080,'%^_<89>Æ^N<81>FðõKH<91>ÚÎ<86>;^L\0\0\0\0')"
    Wed Apr 11 19:41:39 2018: [error  ] KDatabase::I_Update() query failed: INSERT INTO indexedproperties(hierarchyid,tag,val_binary) VALUES(27813,26080,'%^_<89>Æ^N<81>FðõKH<91>ÚÎ<86>;^L\0\0\0\0'): Duplicate entry '26080-%\x1F\x89\xC6\x0E\x81F\xC3\xB0\xF5KH\x91\xDA\xCE\x86;\x0C\' for key 'bin'
    Wed Apr 11 19:41:39 2018: [error  ] SQL [00000007] Failed: Duplicate entry '26080-%\x1F\x89\xC6\x0E\x81F\xC3\xB0\xF5KH\x91\xDA\xCE\x86<\x0C\' for key 'bin', Query Size: 106, Query: "INSERT INTO indexedproperties(hierarchyid,tag,val_binary) VALUES(27814,26080,'%^_<89>Æ^N<81>FðõKH<91>ÚÎ<86><^L\0\0\0\0')"
    Wed Apr 11 19:41:39 2018: [error  ] KDatabase::I_Update() query failed: INSERT INTO indexedproperties(hierarchyid,tag,val_binary) VALUES(27814,26080,'%^_<89>Æ^N<81>FðõKH<91>ÚÎ<86><^L\0\0\0\0'): Duplicate entry '26080-%\x1F\x89\xC6\x0E\x81F\xC3\xB0\xF5KH\x91\xDA\xCE\x86<\x0C\' for key 'bin'
    Wed Apr 11 19:41:39 2018: [error  ] SQL [00000013] Failed: Duplicate entry '26080-%\x1F\x89\xC6\x0E\x81F\xC3\xB0\xF5KH\x91\xDA\xCE\x86=\x0C\' for key 'bin', Query Size: 106, Query: "INSERT INTO indexedproperties(hierarchyid,tag,val_binary) VALUES(27815,26080,'%^_<89>Æ^N<81>FðõKH<91>ÚÎ<86>=^L\0\0\0\0')"
    Wed Apr 11 19:41:39 2018: [error  ] KDatabase::I_Update() query failed: INSERT INTO indexedproperties(hierarchyid,tag,val_binary) VALUES(27815,26080,'%^_<89>Æ^N<81>FðõKH<91>ÚÎ<86>=^L\0\0\0\0'): Duplicate entry '26080-%\x1F\x89\xC6\x0E\x81F\xC3\xB0\xF5KH\x91\xDA\xCE\x86=\x0C\' for key 'bin'
    Wed Apr 11 19:41:39 2018: [error  ] SQL [00000009] Failed: Duplicate entry '26080-%\x1F\x89\xC6\x0E\x81F\xC3\xB0\xF5KH\x91\xDA\xCE\x86>\x0C\' for key 'bin', Query Size: 106, Query: "INSERT INTO indexedproperties(hierarchyid,tag,val_binary) VALUES(27816,26080,'%^_<89>Æ^N<81>FðõKH<91>ÚÎ<86>>^L\0\0\0\0')"
    Wed Apr 11 19:41:39 2018: [error  ] KDatabase::I_Update() query failed: INSERT INTO indexedproperties(hierarchyid,tag,val_binary) VALUES(27816,26080,'%^_<89>Æ^N<81>FðõKH<91>ÚÎ<86>>^L\0\0\0\0'): Duplicate entry '26080-%\x1F\x89\xC6\x0E\x81F\xC3\xB0\xF5KH\x91\xDA\xCE\x86>\x0C\' for key 'bin'
    Wed Apr 11 19:41:39 2018: [error  ] SQL [00000012] Failed: Duplicate entry '26080-%\x1F\x89\xC6\x0E\x81F\xC3\xB0\xF5KH\x91\xDA\xCE\x86?\x0C\' for key 'bin', Query Size: 106, Query: "INSERT INTO indexedproperties(hierarchyid,tag,val_binary) VALUES(27817,26080,'%^_<89>Æ^N<81>FðõKH<91>ÚÎ<86>?^L\0\0\0\0')"
    Wed Apr 11 19:41:39 2018: [error  ] KDatabase::I_Update() query failed: INSERT INTO indexedproperties(hierarchyid,tag,val_binary) VALUES(27817,26080,'%^_<89>Æ^N<81>FðõKH<91>ÚÎ<86>?^L\0\0\0\0'): Duplicate entry '26080-%\x1F\x89\xC6\x0E\x81F\xC3\xB0\xF5KH\x91\xDA\xCE\x86?\x0C\' for key 'bin'
    
    

    kopano-dagent log

    Apr 11 19:47:55 kopano kopano-dagent[2157]: [error  ] [ 3603] Unable to commit message: disk error (80040116)
    Apr 11 19:47:55 kopano kopano-dagent[2157]: [error  ] [ 3603] Unable to deliver message to "chris": disk error (80040116)
    Apr 11 19:47:55 kopano kopano-dagent[2157]: [error  ] [ 3603] Unable to deliver all messages for server "default:"
    Apr 11 19:47:55 kopano kopano-dagent[2157]: [error  ] [ 3606] Unable to commit message: disk error (80040116)
    Apr 11 19:47:55 kopano kopano-dagent[2157]: [error  ] [ 3606] Unable to deliver message to "chris": disk error (80040116)
    Apr 11 19:47:55 kopano kopano-dagent[2157]: [error  ] [ 3606] Unable to deliver all messages for server "default:"
    

  • Kopano

    @ckruijntjens said in kopano-backup restore:

    this is not correct. there are more folders then this. And after restore i can not see the folders?

    if there would be more folders in the current backup set, then kopano-backup would attempt to restore them.

    @ckruijntjens said in kopano-backup restore:

    it runs for certine items and then i get several errors that folders could not be found.

    I’m not quite sure what you have done, but also reading https://forum.kopano.io/topic/1177/dagent-fails-to-deliver-email/6 it seems you have screwed up the database. I’d recommend going back to a previous state of your database and retracing your steps.



  • @fbartels

    Hi I allredeay restored to previous state. But When I do the restore action ir always ends up like this?

    Dont know Where to go From here?

    Maybe I Will reinstall the server. Can we use the latest core packages for centos7?


  • Kopano

    I guess you are referring to https://forum.kopano.io/topic/1254/segmentation-fault/9. For packages to be uploaded they have to pass unit test and automated install tests (performed on Debian only).

    I did not yet have tome to look into these reports.



  • @fbartels

    hi when will the issue be resolved for

    https://forum.kopano.io/topic/1254/segmentation-fault/9 ??? i cant upgrade the core on centos 7.



  • i am verry sorry but i only have problems using the nightly builds with centos 7. I am going back to zimbra.

    thanks for your support guys!


  • Kopano

    @ckruijntjens said in kopano-backup restore:

    hi when will the issue be resolved for

    we are currently prepping some new releases and therefore I did not yet have time to further look into this.

    @ckruijntjens said in kopano-backup restore:

    i only have problems using the nightly builds

    Please have in mind that the nightly builds are (as the name implies) nightly builds of our development branches. These are not meant to be 100% stable but simply there to give early access to development in the hopes to get feedback before these features hit a release.

    For production setups we recommend to get a subscription. Subscription holders have access to release builds as well as package repositories and archives of older releases (in case you want to go back to an earlier version). Apart from that there is of course access to our support.


Log in to reply