docker-volume-backup/cmd/backup/main.go

25 lines
539 B
Go
Raw Permalink Normal View History

// Copyright 2021-2022 - Offen Authors <hioffen@posteo.de>
2021-08-22 18:07:32 +02:00
// SPDX-License-Identifier: MPL-2.0
package main
import (
"flag"
)
func main() {
foreground := flag.Bool("foreground", false, "run the tool in the foreground")
profile := flag.String("profile", "", "collect runtime metrics and log them periodically on the given cron expression")
flag.Parse()
c := newCommand()
if *foreground {
opts := foregroundOpts{
profileCronExpression: *profile,
}
c.must(c.runInForeground(opts))
} else {
c.must(c.runAsCommand())
}
2021-12-17 20:45:15 +01:00
}