Preparing your design workspace

Loading the problem and your latest saved attempt…

Design Device Backup and Restore

Design scheduled, incremental device backups and reliable restoration of settings, files, and media onto a new device.

Problem statement

For this exercise, assume an account may own several devices. Each device can run a scheduled backup of settings, files, and media, and an authenticated user can select a completed snapshot to restore onto a replacement device.

A snapshot must be immutable once committed, must never mix content from different accounts, and a restore must stay pinned to the selected snapshot even if newer backups finish. Design scheduling, incremental transfer, snapshot consistency, retention, encryption, and resumable restoration.

Device migration between operating-system families, application-specific merge logic, and physical device discovery are out of scope.

What to build

  1. A user can enable a recurring backup policy, while the service spreads eligible device work across the allowed backup window.
  2. A device can upload changed settings, files, and media and atomically commit an immutable, integrity-checked snapshot.
  3. An authenticated user can list completed snapshots and inspect their creation time, source device, content classes, and restore eligibility.
  4. A replacement device can restore one selected snapshot with resumable progress, integrity checks, and explicit partial-failure outcomes.

At scale

  • Assume 50 million active devices, with up to 2 million backup jobs becoming eligible during a peak hour.
  • A device stores about 20 GB at the median and up to 2 TB, while most scheduled backups change less than 5% of prior content.
  • Target a 24-hour recovery-point objective for enabled scheduled backups and 99.9% availability for backup metadata and restore initiation.
  • Retain 30 daily snapshots and 12 monthly snapshots per device; metadata operations should complete within 300 ms at p95, excluding bulk transfer time.