Restore memories from a backup URL
amber_import_memoriesRestore an Amber backup directly from an HTTPS URL without storing a copy; use a long-lived presigned link and poll the returned task until complete.
Instructions
Restore an Amber backup from a URL. Amber reads the archive DIRECTLY from that URL and never stores a copy of it.
Use this when the user has their .json.gz backup somewhere reachable over HTTPS -- S3, R2, Backblaze, Google Cloud Storage, a self-hosted MinIO, or any presigned link. IF THE FILE IS ONLY ON THEIR COMPUTER this tool cannot reach it: send them to https://ambermem.com/backups, which explains how to upload it directly. Do not ask them to paste the file contents; a backup is far too large and it is not text you can retype.
THE LINK MUST STAY VALID FOR THE WHOLE RESTORE, which runs for hours on a large account -- tell the user to use one good for at least 30 days. Amber re-reads the URL as it works, so a link that expires part-way stops the restore.
SAFE TO RUN AGAIN. Memories keep the ids they had in the archive, so re-running cannot duplicate anything -- and a restore that stopped part-way resumes rather than starting over. This ADDS to the account; it never deletes or replaces what is already there.
Returns a task_id. Poll amber_get_import_status until it says complete, and tell the user the count when it does. Requires an active subscription.
Errors: invalid_params (the URL is not https, points back at Amber, carries credentials, cannot be read right now, does not support range requests, or what is behind it is not an Amber archive). All of that is checked BEFORE any task is created, so a rejected URL leaves nothing behind.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | HTTPS URL of the .json.gz backup, exactly as /backup produced it. Must be readable without credentials (a presigned link is ideal) and must support HTTP range requests, which every major object store does. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | Always `pending` here: the restore is queued, not done. Nothing has been written yet. | |
| message | Yes | A human-readable summary of what was accepted and what happens next. | |
| task_id | Yes | Poll this with `amber_get_import_status` until it says `complete`. |