mirror of
https://github.com/jkl1337/duplicacy.git
synced 2026-01-06 21:54:38 -06:00
Added backup --dry-run option.
This commit is contained in:
@@ -623,12 +623,14 @@ func backupRepository(context *cli.Context) {
|
||||
|
||||
enableVSS := context.Bool("vss")
|
||||
|
||||
dryRun := context.Bool("dry-run")
|
||||
uploadRateLimit := context.Int("limit-rate")
|
||||
storage.SetRateLimits(0, uploadRateLimit)
|
||||
backupManager := duplicacy.CreateBackupManager(preference.SnapshotID, storage, repository, password)
|
||||
duplicacy.SavePassword(*preference, "password", password)
|
||||
|
||||
backupManager.SetupSnapshotCache(preference.Name)
|
||||
backupManager.SetDryRun(dryRun)
|
||||
backupManager.Backup(repository, quickMode, threads, context.String("t"), showStatistics, enableVSS)
|
||||
|
||||
runScript(context, preference.Name, "post")
|
||||
@@ -1202,6 +1204,10 @@ func main() {
|
||||
Usage: "the maximum upload rate (in kilobytes/sec)",
|
||||
Argument: "<kB/s>",
|
||||
},
|
||||
cli.BoolFlag {
|
||||
Name: "dry-run",
|
||||
Usage: "Dry run for testing, don't backup anything. Use with -stats and -d",
|
||||
},
|
||||
cli.BoolFlag {
|
||||
Name: "vss",
|
||||
Usage: "enable the Volume Shadow Copy service (Windows only)",
|
||||
|
||||
Reference in New Issue
Block a user