Add a -vss-timeout option to set VSS creation timeout

This commit is contained in:
Gilbert Chen
2018-03-21 22:34:14 -04:00
parent 1ea615fb45
commit be2856ebbd
5 changed files with 22 additions and 12 deletions

View File

@@ -689,6 +689,7 @@ func backupRepository(context *cli.Context) {
showStatistics := context.Bool("stats")
enableVSS := context.Bool("vss")
vssTimeout := context.Int("vss-timeout")
dryRun := context.Bool("dry-run")
uploadRateLimit := context.Int("limit-rate")
@@ -698,7 +699,7 @@ func backupRepository(context *cli.Context) {
backupManager.SetupSnapshotCache(preference.Name)
backupManager.SetDryRun(dryRun)
backupManager.Backup(repository, quickMode, threads, context.String("t"), showStatistics, enableVSS)
backupManager.Backup(repository, quickMode, threads, context.String("t"), showStatistics, enableVSS, vssTimeout)
runScript(context, preference.Name, "post")
}
@@ -1325,6 +1326,12 @@ func main() {
Name: "vss",
Usage: "enable the Volume Shadow Copy service (Windows only)",
},
cli.IntFlag{
Name: "vss-timeout",
Value: 0,
Usage: "the timeout in seconds to wait for the Volume Shadow Copy operation to complete",
Argument: "<timeout>",
},
cli.StringFlag{
Name: "storage",
Usage: "backup to the specified storage instead of the default one",