mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 21:07:18 +00:00
a860648960
* remove all mentions * more changes * folder by folder Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
32 lines
778 B
Go
32 lines
778 B
Go
package db
|
|
|
|
import (
|
|
"github.com/prysmaticlabs/prysm/shared/cmd"
|
|
"github.com/prysmaticlabs/prysm/shared/tos"
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
// DatabaseCommands for Prysm slasher.
|
|
var DatabaseCommands = &cli.Command{
|
|
Name: "db",
|
|
Category: "db",
|
|
Usage: "defines commands for interacting with the Prysm slasher database",
|
|
Subcommands: []*cli.Command{
|
|
{
|
|
Name: "restore",
|
|
Description: `restores a database from a backup file`,
|
|
Flags: cmd.WrapFlags([]cli.Flag{
|
|
cmd.RestoreSourceFileFlag,
|
|
cmd.RestoreTargetDirFlag,
|
|
}),
|
|
Before: tos.VerifyTosAcceptedOrPrompt,
|
|
Action: func(cliCtx *cli.Context) error {
|
|
if err := restore(cliCtx); err != nil {
|
|
log.Fatalf("Could not restore database: %v", err)
|
|
}
|
|
return nil
|
|
},
|
|
},
|
|
},
|
|
}
|