Skip to content

backup restore into a new Store: sandbox create fails with no complete project manifest #668

Open

Description

@ImmuneFOMO

On an M3 Max, macOS 26.6.2, I backed up a Store to a local S3 (rclone serve s3) and restored it into a fresh home. branch fork, file write and file read work on the restored Store, but a Sandbox doesn't start:

$ layerfs backup restore vps lab vps
{"store":"vps","bucket":"lab","file":"vps","bytes":217088,...,"projects":["vps"]}
$ layerfs sandbox create vps/vps sr native
{"code":"NoSuchProject","message":"no complete project manifest","detail":null}

Same on layerfs_v2_0_0 (be317c0) and on #663 (2647fc8), which I was retesting, and the same when restoring under a new Store name in the same home. Restoring over an existing Store works, because the old project record stays

I think the cause is write_projects in control/crates/layerfs-store/src/backup/restore.rs. For a project with no record it writes ProjectRecord::found, which has only name and stack. sandbox create reads the record through installed() in control/crates/layerfs-sandbox/src/lifecycle.rs, which calls project() in project/discovery.rs. project() needs manifest, and installed() then needs installed. project init writes them (discovery::save_project from project/add.rs), restore doesn't. The keys of the two records:

made by project init:    created, installed, manifest, v
made by backup restore:  name, stack, v

This code is the same on the current layerfs_v2_0_0 (03e4c54). I only ran it on macOS native. Should restore write manifest and installed, or should the Sandbox path rebuild them when they're missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions