Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Cmd = &cobra.Command{ Use: "dump", Short: "perform a logical dump, transform data, and store it in storage", Run: func(cmd *cobra.Command, args []string) { if err := logger.SetLogLevel(Config.Log.Level, Config.Log.Format); err != nil { log.Fatal().Err(err).Msg("") } ctx, cancel := context.WithCancel(context.Background()) defer cancel() st, err := builder.GetStorage(ctx, &Config.Storage, &Config.Log) if err != nil { log.Fatal().Err(err).Msg("fatal") } st = st.SubStorage(strconv.FormatInt(time.Now().UnixMilli(), 10), true) if Config.Common.TempDirectory == "" { log.Fatal().Msg("common.tmp_dir cannot be empty") } dump := cmdInternals.NewDump(Config, st, utils.DefaultTransformerRegistry) if err := dump.Run(ctx); err != nil { log.Fatal().Err(err).Msg("cannot make a backup") } }, } Config = pgDomains.NewConfig() )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.