Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem merging db Version 214 to 215 #184

Closed
hugogithubs opened this issue Feb 6, 2024 · 8 comments
Closed

Problem merging db Version 214 to 215 #184

hugogithubs opened this issue Feb 6, 2024 · 8 comments

Comments

@hugogithubs
Copy link

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

@bepaald
Copy link
Owner

bepaald commented Feb 6, 2024

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).

@bepaald
Copy link
Owner

bepaald commented Feb 6, 2024

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.

bepaald added a commit that referenced this issue Feb 8, 2024
…orwarded telegram messages. Add custom for #184. Update Logger (custom delimiter for vector output). Slight tweak to checkmarks in html export.
@bepaald
Copy link
Owner

bepaald commented Feb 8, 2024

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).

@hugogithubs
Copy link
Author

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

@hugogithubs
Copy link
Author

hugogithubs commented Feb 9, 2024

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.

@bepaald
Copy link
Owner

bepaald commented Feb 9, 2024

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!

@bepaald bepaald closed this as completed Feb 9, 2024
@hugogithubs
Copy link
Author

hugogithubs commented Mar 4, 2024

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.

@bepaald
Copy link
Owner

bepaald commented Mar 5, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants