Skip to content

fix(host): say what's wrong with a backup or restore path, and let restore take --name - #671

Merged
iamnbutler merged 1 commit into
mainfrom
fix-restore
Oct 22, 2026
Merged

iamnbutler merged 1 commit into
mainfrom
fix-restore

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

ace backup and ace restore printed raw ENOENT…/EEXIST… errors, and a restored channel couldn't be given its own name. They now say what's wrong:

  • Backup into an existing directory: <dir> already exists. Back up into a new directory.
  • Backup into a folder that doesn't exist: <parent> doesn't exist. Create it first.
  • Restore from a missing path: <dir> doesn't exist. From a folder without backup.json: <dir> isn't an Ace backup: it has no backup.json.
  • Restore from a backup missing a listed file: The backup is incomplete: channel.sqlite is missing from <dir>.
  • A --project folder that doesn't exist: <dir> doesn't exist. Before, this said the folder isn't a Git repository. The same check covers ace new and ace import.

ace restore also takes --name <name>. The name is validated like ace new --name, and a name that's taken is refused. Without it, the copy keeps the original's name, with -1, -2, … added while that name is taken. docs/data.md now says so. It also drops the old advice to refer to the copy by ID, which became outdated once restore started renaming the copy's metadata.

Smoke-tested against a loopback source host (own ACE_HOME, port 4377):

  • Each error above was printed, with exit 1.
  • ace restore bk printed react-test-1.
  • ace restore bk --project proj-plain --name over-there printed over-there, and ace info and ace ls show it under proj-plain.
  • Repeating that restore was refused with A channel named over-there already exists. --name "Bad Name!" was refused with the kebab-case rule.

Map: ^845. Fixes #624: #654 fixed the lane part, and this fixes the error messages and the name.

Built in Ace

No. Claude Code (fix-train worker) made this outside Ace, running against a loopback source host. Dogfooding gaps are tracked in #5.

@iamnbutler
iamnbutler merged commit 6299066 into main Oct 22, 2026
1 check passed
@iamnbutler
iamnbutler deleted the fix-restore branch October 22, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ace restore --project keeps the restored channel in the original project's lane

1 participant