Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-1676

Copy/overwrite db backup files instead of dumping/reading them

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.2
    • Fix Version/s: 4.1.3
    • Component/s: Framework

      Description

      A few errors originate from the fact that when restoring, we are reading backups and trying to insert their lines into the corrupt db instead of simply overwriting the file.

      We can also simplify the backup creation by copying the file instead of writing the dump output.

      Sentry Issue: NUXEO-DRIVE-11Z

      OperationalError: database schema has changed
        File "nxdrive/engine/dao/sqlite.py", line 184, in restore_backup
        File "nxdrive/engine/dao/utils.py", line 131, in restore_backup
        File "nxdrive/engine/dao/utils.py", line 51, in read
      
      DatabaseError: file is not a database
        File "nxdrive/engine/dao/sqlite.py", line 150, in __init__
        File "nxdrive/engine/dao/utils.py", line 66, in fix_db
        File "nxdrive/engine/dao/utils.py", line 22, in is_healthy
      
      Unable to restore /Users/ln/.nuxeo-drive/manager.db
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 15 minutes
                15m