Closed Bug 1888436 Opened 6 months ago Closed 5 months ago

Add a "recover" method to the BackupResource base class

Categories

(Firefox :: Profile Backup, task, P3)

task

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: mconley, Assigned: mconley)

References

Details

(Whiteboard: [fidefe-device-migration])

Attachments

(1 file)

This is the method that will need to be overridden by each subclass in order to perform the part of a recovery that involves moving user data from a recovery folder for the BackupResource into a newly created user profile directory.

The recover method might do some processing on the data before it moves into the directory. Down the line, we might also need to add a postRecovery method that runs immediately after launching the recovered profile, but that'll be outside of this bug.

Here's the method signature I'm proposing:

  /**
   * Restore a backup to some profile directory. This will reject and fail if
   * the profile is already in use.
   *
   * @param {object} manifestEntry
   *   The deserialized object that was generated and returned by `backup` when this
   *   particular resource was backed up.
   * @param {string} recoveryPath
   *   The path to the folder on the file system where all files within the
   *   backup file archive were decompressed.
   * @param {string} profilePath
   *   The profile path to write the restored files to.
   * @returns {Promise<undefined>}
   */
  async recover(manifestEntry, recoveryPath, profilePath) {}
Blocks: 1888440
Blocks: 1888442
Blocks: 1888444
Blocks: 1888445
Blocks: 1888446
Blocks: 1888447
Blocks: 1888448
Severity: -- → N/A
Priority: -- → P3
Blocks: 1891596
Assignee: nobody → mconley
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d439383ee836 Add recover and postRecovery methods to BackupResource. r=backup-reviewers,kpatenio
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: