mirror of
https://github.com/jkl1337/duplicacy.git
synced 2026-01-06 21:54:38 -06:00
Merge pull request #264 from lowne/bitcopy
allow bit-identical `add -copy`
This commit is contained in:
@@ -367,6 +367,7 @@ func configRepository(context *cli.Context, init bool) {
|
||||
}
|
||||
|
||||
var otherConfig *duplicacy.Config
|
||||
var bitCopy bool
|
||||
if context.String("copy") != "" {
|
||||
|
||||
otherPreference := duplicacy.FindPreference(context.String("copy"))
|
||||
@@ -395,6 +396,8 @@ func configRepository(context *cli.Context, init bool) {
|
||||
duplicacy.LOG_ERROR("STORAGE_NOT_CONFIGURED",
|
||||
"The storage to copy the configuration from has not been initialized")
|
||||
}
|
||||
|
||||
bitCopy = context.Bool("bit")
|
||||
}
|
||||
|
||||
iterations := context.Int("iterations")
|
||||
@@ -402,7 +405,7 @@ func configRepository(context *cli.Context, init bool) {
|
||||
iterations = duplicacy.CONFIG_DEFAULT_ITERATIONS
|
||||
}
|
||||
duplicacy.ConfigStorage(storage, iterations, compressionLevel, averageChunkSize, maximumChunkSize,
|
||||
minimumChunkSize, storagePassword, otherConfig)
|
||||
minimumChunkSize, storagePassword, otherConfig, bitCopy)
|
||||
}
|
||||
|
||||
duplicacy.Preferences = append(duplicacy.Preferences, preference)
|
||||
@@ -1603,6 +1606,10 @@ func main() {
|
||||
Usage: "make the new storage compatible with an existing one to allow for copy operations",
|
||||
Argument: "<storage name>",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "bit",
|
||||
Usage: "(when using -copy) make the new storage bit-identical to also allow rsync etc.",
|
||||
},
|
||||
},
|
||||
Usage: "Add an additional storage to be used for the existing repository",
|
||||
ArgsUsage: "<storage name> <snapshot id> <storage url>",
|
||||
|
||||
Reference in New Issue
Block a user