pg

package
v0.0.0-...-86c6960 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrettyFlag = "pretty"
	JSONFlag   = "json"
	DetailFlag = "detail"
)
View Source
const (
	BackupMarkShortDescription = "Marks a backup permanent or impermanent"
	BackupMarkLongDescription  = `` /* 147-byte string literal not displayed */

	ImpermanentDescription = "Marks a backup impermanent"
	ImpermanentFlag        = "impermanent"
)
View Source
const (
	CatchupFetchShortDescription = "Fetches an incremental backup from storage"
	UseNewUnwrapDescription      = "Use the new implementation of catchup unwrap (beta)"
)
View Source
const (
	WalRestoreUsage            = "wal-restore target-pgdata source-pgdata"
	WalRestoreShortDescription = "Restores WAL segments from storage."
	WalRestoreLongDescription  = "Restores the missing WAL segments that will be needed to perform pg_rewind from storage."
)
View Source
const (
	WalShowUsage            = "wal-show"
	WalShowShortDescription = "Show storage WAL segments info grouped by timelines."
	WalShowLongDescription  = "Show information such as missing segments for each timeline found in storage. " +
		"Optionally, show available backups for each timeline."
)
View Source
const (
	WalVerifyUsage            = "wal-verify"
	WalVerifyShortDescription = "Verify WAL storage folder. Available checks: integrity, timeline."
	WalVerifyLongDescription  = "Run a set of specified checks to ensure WAL storage health."
)
View Source
const DaemonShortDescription = "Uploads a WAL file to storage"
View Source
const DeleteGarbageExamples = `` /* 226-byte string literal not displayed */
View Source
const DeleteGarbageUse = "garbage [ARCHIVES|BACKUPS]"
View Source
const UseSentinelTimeDescription = "Use backup creation time from sentinel for backups ordering."
View Source
const UseSentinelTimeFlag = "use-sentinel-time"
View Source
const WalFetchShortDescription = "Fetches a WAL file from storage"
View Source
const WalPrefetchShortDescription = `Used for prefetching process forking
and should not be called by user.`
View Source
const WalPushShortDescription = "Uploads a WAL file to storage"
View Source
const WalgShortDescription = "PostgreSQL backup tool"

Variables

View Source
var (
	Cmd = &cobra.Command{
		Use:     "wal-g",
		Short:   WalgShortDescription,
		Version: strings.Join([]string{walgVersion, gitRevision, buildDate, "PostgreSQL"}, "\t"),
		PersistentPreRun: func(cmd *cobra.Command, args []string) {
			err := internal.AssertRequiredSettingsSet()
			tracelog.ErrorLogger.FatalOnError(err)

			if viper.IsSet(internal.PgWalSize) {
				postgres.SetWalSize(viper.GetUint64(internal.PgWalSize))
			}
		},
	}
)
View Source
var WalPrefetchCmd = &cobra.Command{
	Use:    "wal-prefetch wal_name prefetch_location",
	Short:  WalPrefetchShortDescription,
	Args:   cobra.ExactArgs(2),
	Hidden: true,
	Run: func(cmd *cobra.Command, args []string) {
		uploader, err := postgres.ConfigureWalUploaderWithoutCompressMethod()
		tracelog.ErrorLogger.FatalOnError(err)
		postgres.HandleWALPrefetch(uploader, args[0], args[1])
	},
}

WalPrefetchCmd represents the walPrefetch command

Functions

func DeleteGarbageArgsValidator

func DeleteGarbageArgsValidator(cmd *cobra.Command, args []string) error

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the PgCmd.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL