Skip to content

Commit

Permalink
Do not try to start project for a snapshot, fixes ddev#1129
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay committed Oct 1, 2018
1 parent 66a6eae commit 24dfe13
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/ddevapp/ddevapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -856,10 +856,7 @@ func (app *DdevApp) SnapshotDatabase(snapshotName string) (string, error) {
}

if app.SiteStatus() != SiteRunning {
err = app.Start()
if err != nil {
return snapshotName, fmt.Errorf("Failed to start project %s to snapshot database: %v", app.Name, err)
}
return "", fmt.Errorf("unable to snapshot database, project %v is not running. \nPlease start the project if you want to snapshot it. \nIf removing, you can remove without a snapshot using 'ddev remove --remove-data --omit-snapshot', \nwhich will destroy your database", app.Name)
}

util.Warning("Creating database snapshot %s", snapshotName)
Expand Down

0 comments on commit 24dfe13

Please sign in to comment.