Repository navigation
fix: #354 Restore imports the dump beside the archive only when it is not empty, and says so when it is - #355
Merged
Merged
Conversation
… not empty, and says so when it is AI-Generated: Yes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 of 15 tasks
… started, as one with a dump is AI-Generated: Yes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Natshah
force-pushed
the
fix/354-restore-empty-dump
branch
from
November 16, 2026 15:30
35e7eef to
821d31d
Compare
1 of 15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #354
Backups → Restore took the
…-db.sql.gz(or…-db.sql) beside the archive as soon as the file existed, and randdev import-dbon it. A site that runs without a database (Astro, Gatsby:omit_containers: [db]) was backed up with a dump of 0 bytes (ddev export-dbopens its file before it finds there is no database), so its restore ended withfailed to extract provided file: EOFand the help ofimport-db, although every file was back and the site was up. Seen in round 4 of the testing rounds on a Gatsby site.core/workspace-app/restore-dump.js:dumpBeside(backupsDir, archive)answers the dump to import — a file that is there and not empty,.sql.gzfirst, then.sql— or names the empty one./actions/restoretakes its dump from it. An empty dump is not imported; the log says<name> is empty: the project had no database to export when it was backed up, so there is none to import.and the restore ends well. A dump with a database: unchanged.ddev start -y), as a restore with a dump starts it, so the site answers when the restore ends. Before, such a project was only extracted.Proved in round 4 of the testing rounds on a real Astro site (
@webship.co/workspace-astro1.0.10, base 1.0.16 with this change put in place), from the dashboard: the published dev backup command leftdev---r4-astro--…-db.sql.gzof 0 bytes beside a 40 MB archive; the site was removed; Restore printeddev---r4-astro--2026-11-16_18-23-37-db.sql.gz is empty: the project had no database to export when it was backed up, so there is none to import.,Successfully started r4-astro, and the site answered 200. A backup from the fixed dev command (webship/workspace-dev#16: archive only), removed and restored:Successfully started r4-astro, 200.tests/unit/restore-dump.test.js: 7 tests (a dump that has the database, a.sql, an empty one named and not imported, an empty.sql.gzthat does not hide a.sql, no dump, the restore action using the helper, and a DDEV project with no dump started). Unit suite: 1414 tests, 1394 pass, 0 fail, 20 skipped.Checkpoints
🤖 Generated with Claude Code