Page MenuHomePhabricator

Enable backup creation and restoration from Rust
ClosedPublic

Authored by marcin on Jan 3 2024, 8:56 AM.
Tags
None
Referenced Files
F2173284: D10512.id35474.diff
Tue, Jul 2, 9:56 PM
Unknown Object (File)
Sun, Jun 30, 3:56 PM
Unknown Object (File)
Sun, Jun 30, 4:59 AM
Unknown Object (File)
Sun, Jun 30, 1:33 AM
Unknown Object (File)
Sat, Jun 29, 8:13 PM
Unknown Object (File)
Sat, Jun 29, 7:05 PM
Unknown Object (File)
Wed, Jun 26, 9:25 AM
Unknown Object (File)
Sun, Jun 23, 6:39 PM
Subscribers

Details

Summary

This differential provides boilerplate code so that we can call BackupOperationsExecutor from Rust.

Test Plan
  1. Comment line in DatabaseManager where we remove backup directory on log-out.
  2. Add call to create_main_compaction in restore_backup in backup.rs
  3. Add some logging to get encryption key.
  4. Create some drafts.
  5. Tap text backup restore protocol button.
  6. Log out.
  7. Replace call to create_main_compaction in restore_backup in backup.rs with a call to get_backup_file_path with previous backup id and restore_from_main_compaction with previous backup id and encryption key logged before log-out.
  8. Tap text backup restore protocol button.
  9. Restart the app. Ensure that drafts created before log-out are now present.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jan 3 2024, 9:32 AM
Harbormaster failed remote builds in B25453: Diff 35162!

LGTM but @michal needs to confirm as this is strongly connected to his work

This revision is now accepted and ready to land.Jan 5 2024, 6:31 AM

This diff needs to be updated to expose getBackupDirectoryPath method to Rust.

Expose getBackupDirectoryPath to Rust.

This revision is now accepted and ready to land.Jan 10 2024, 5:42 AM
This revision was landed with ongoing or failed builds.Jan 17 2024, 3:16 AM
This revision was automatically updated to reflect the committed changes.