From fdca574ff07a0aabf0c6bc605ee8b2a2c0bf0d9a Mon Sep 17 00:00:00 2001 From: Rootul P Date: Wed, 8 Nov 2023 15:21:14 +0100 Subject: [PATCH] feat(cmd): snapshots command (#2825) Closes https://github.com/celestiaorg/celestia-app/issues/2824 ## Testing I verified the snapshots command was added ```shell $ ./build/celestia-appd snapshots Manage local snapshots Usage: celestia-appd snapshots [command] Available Commands: delete Delete a local snapshot dump Dump the snapshot as portable archive format export Export app state to snapshot store list List local snapshots load Load a snapshot archive file (.tar.gz) into snapshot store restore Restore app state from local snapshot Flags: -h, --help help for snapshots ``` (cherry picked from commit 7d28fc064ae663b82b0958816b2305b4286f2519) --- cmd/celestia-appd/cmd/root.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/celestia-appd/cmd/root.go b/cmd/celestia-appd/cmd/root.go index 25b13ec680..34b1993015 100644 --- a/cmd/celestia-appd/cmd/root.go +++ b/cmd/celestia-appd/cmd/root.go @@ -22,6 +22,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/keys" "github.com/cosmos/cosmos-sdk/client/rpc" + "github.com/cosmos/cosmos-sdk/client/snapshot" "github.com/cosmos/cosmos-sdk/server" serverconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" @@ -142,6 +143,9 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig encoding.Config) { keys.Commands(app.DefaultNodeHome), qgbcmd.VerifyCmd(), ) + rootCmd.AddCommand( + snapshot.Cmd(NewAppServer), + ) } func addModuleInitFlags(startCmd *cobra.Command) {