Add --restore-backup to download room keys from the server-side backup#209
Open
macalinao wants to merge 2 commits into
Open
Add --restore-backup to download room keys from the server-side backup#209macalinao wants to merge 2 commits into
macalinao wants to merge 2 commits into
Conversation
matrix-commander-rs builds the client with the matrix-sdk default BackupDownloadStrategy::Manual, so even when the store already holds the megolm backup decryption key and version, the SDK never downloads the backed-up room keys. A verified device can therefore only decrypt newly received messages and never reads encrypted history. Add a --restore-backup action (alias --backup-restore) that enumerates every room in the latest server-side key backup and explicitly downloads its keys into the store via Backups::download_room_keys_for_room(), which works regardless of the configured download strategy. It lists rooms with get_latest_backup_info + get_backup_keys and reports how many rooms were restored (text and --output json). Help text in help/ regenerated via scripts/create-help-*.sh.
Collaborator
|
I do not notice any string typo and the code seems to quickly make sense. I am waiting investigating #208, then produce the issue this pull request tries to solve, then will try with this pull request patch. |
Collaborator
cargo run -- --tail 40Output:cargo run -- --restore-backupOutput:cargo run -- --tail 40Output:It is always referring to the same encrypted room. cargo run -- --restore-backupOutput:I will investigate this pull request further, once I have properly verified my devices. |
Collaborator
bold looks unclear to me, can you provide a precise example workflow that showcase the need for the feature you propose? |
Owner
|
Thank you @macalinao for your PR. This is a great contribution. thank you for your work and effort!!! 👏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
matrix-commander-rs builds the client with the matrix-sdk default
BackupDownloadStrategy::Manual, so even when the store already holds themegolm backup decryption key and version, the SDK never downloads the
backed-up room keys on its own. A verified device can therefore only decrypt
newly received messages and never reads encrypted history.
Add a
--restore-backupaction (alias--backup-restore) that enumeratesevery room in the latest server-side key backup
(
get_latest_backup_info+get_backup_keys) and downloads its keys intothe store via
Backups::download_room_keys_for_room(), which worksregardless of the configured download strategy. It reports how many rooms
were restored / failed, for both text and
--output json.Help text under
help/regenerated viascripts/create-help-*.sh.