mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
21 lines
489 B
Go
21 lines
489 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/owncast/owncast/utils"
|
|
log "github.com/sirupsen/logrus"
|
|
)
|
|
|
|
func (app *Application) handleRestoreBackup(restoreDatabaseFile *string) {
|
|
// Allows a user to restore a specific database backup
|
|
databaseFile := app.configservice.DatabaseFilePath
|
|
if *dbFile != "" {
|
|
databaseFile = *dbFile
|
|
}
|
|
|
|
if err := utils.Restore(*restoreDatabaseFile, databaseFile); err != nil {
|
|
log.Fatalln(err)
|
|
}
|
|
|
|
log.Println("Database has been restored. Restart Owncast.")
|
|
}
|