From 0f4fca35f37255024661c4706565413cb744ff99 Mon Sep 17 00:00:00 2001 From: shoopea Date: Thu, 4 Nov 2021 21:33:44 +0800 Subject: [PATCH] add slow option --- app.go | 4 +++- backup.go | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app.go b/app.go index 44e5bec..d98da03 100644 --- a/app.go +++ b/app.go @@ -622,7 +622,7 @@ func (a AppConfig) RunAppBackup() error { return err } - if schedule != "" { + if schedule != "" || *slowFlag { err = a.CheckZFS() if err != nil { if *debugFlag { @@ -630,7 +630,9 @@ func (a AppConfig) RunAppBackup() error { } return err } + } + if schedule != "" { err = a.ExecBefore(schedule) if err != nil { if *debugFlag { diff --git a/backup.go b/backup.go index 8b5fdb9..c54c845 100644 --- a/backup.go +++ b/backup.go @@ -31,6 +31,7 @@ var ( appFlag = flag.String("app", "", "run specific app") cfgFile = flag.String("config", "config.json", "config file") schedFlag = flag.String("schedule", "", "specific schedule") + slowFlag = flag.Bool("slow", false, "slow process") testFlag = flag.Bool("test", false, "test run") debugFlag = flag.Bool("debug", false, "debug") cfg Config