bepaald/signalbackup-tools

Problem merging db Version 214 to 215

Closed this issue · 8 comments

Hi,

SW Version:
signalbackup-tools (signalbackup-tools) source version 20240205.120839 (Win)

when merging file of db version 214 to newer Version 215 I get this error message:

[Error]: Source and target database at incompatible versions
[Error]: A fatal error occurred while trying to import thread 7. Aborting

There are no more info in logfile of merging task

I'm sorry to have to report this is expected and intentional. Between some database versions, changes are made in such a way that they can't be merged. I happened to have linked you a bit of the code in a message in the other issue (#174 (comment)), but just shortly after I did that, this code was changed to also include dbv < 215 and =>215. This is due to a change in how attachments are stored and referenced in the database.

If this will be big problem, I could investigate a way to make this work (write a custom merge-function for these db versions). But it will certainly take a while before I could get around to it (if I can do it at all).

I was thinking about this a little more during work, and I think it may not be too difficult to get the 214 database to a state where it can be used as a source for importing into a true 215 db. No promises, but I think it's doable in not too much time.

I know you didn't ask for it, but I made a custom function for this case. If you run this program on your 214 database with --custom_hugogithubs -o [output.backup], the output should be a file that is close enough to a 215 database to be imported into one (but not well tested).

Hi,
I'll test this soon and report here about result.
Many thanks for your effort!

Hi,
I tested with your last Version 20240208.201758
Converting my "old 214" to " quasi Version 215" with special "--parameter" has worked without any error/warning!
Then I merged this "upgraded 215) to my next cropped daily backupfile (also version 215) . This worked too without any error/warning!
Last Step of testing my "processing pipeline" was to merge next cropped daily backupfile into my last merged backupfile from day before, this worked too!

Thank you again, you've kept my long-term project alive again :-) ! (until next change of database :-( )

by the way:
It's hard to believe how much the developers at Signal constantly tinker with the database structure without noticing any changes in the frontend.

From my point of view this issue is solved and can be closed.

Excellent, thanks for the feedback. Happy it worked.

It's hard to believe how much the developers at Signal constantly tinker with the database structure without noticing any changes in the frontend.

True. They definitely made a few design choices that enable them to do this a bit easier (certainly easier than in my tool). Though it's much easier if you don't actually try to do all these merging and importing operations and don't support old version indefinitely. But, for this change from 214 to 215, even Signal had to add some custom extra code to the backup-restore function to keep working (that's rare!).

Thanks again!

Hi,

regarding your new custom parameter function:

--custom_hugogithubs -o [output.backup]

Perhaps this could be documented in help output so other people with same issue could have the chance to solve it by themself?

It's just a suggestion.

I renamed the option --migrate214to215 (old name also still works), and mentioned it in the --help output with a link to this issue. Thanks!