mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-26 18:34:43 +01:00
896f31bbf3
Version is autodetected on build using git If it cannot be detected with git, an override must be provided. For tracability of distros, the distroy packagers should override as well, which is why I added a README entry for package mainatiners. refs #35
48 lines
1.1 KiB
Go
48 lines
1.1 KiB
Go
// zrepl replicates ZFS filesystems & volumes between pools
|
|
//
|
|
// Code Organization
|
|
//
|
|
// The cmd package uses github.com/spf13/cobra for its CLI.
|
|
//
|
|
// It combines the other packages in the zrepl project to implement zrepl functionality.
|
|
//
|
|
// Each subcommand's code is in the corresponding *.go file.
|
|
// All other *.go files contain code shared by the subcommands.
|
|
package cmd
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
"github.com/zrepl/zrepl/logger"
|
|
)
|
|
|
|
//
|
|
//type Logger interface {
|
|
// Printf(format string, v ...interface{})
|
|
//}
|
|
|
|
var (
|
|
zreplVersion string // set by build infrastructure
|
|
)
|
|
|
|
type Logger = *logger.Logger
|
|
|
|
var RootCmd = &cobra.Command{
|
|
Use: "zrepl",
|
|
Short: "ZFS dataset replication",
|
|
Long: `Replicate ZFS filesystems & volumes between pools:
|
|
|
|
- push & pull mode
|
|
- automatic snapshot creation & pruning
|
|
- local / over the network
|
|
- ACLs instead of blank SSH access`,
|
|
}
|
|
|
|
var rootArgs struct {
|
|
configFile string
|
|
}
|
|
|
|
func init() {
|
|
//cobra.OnInitialize(initConfig)
|
|
RootCmd.PersistentFlags().StringVar(&rootArgs.configFile, "config", "", "config file path")
|
|
}
|