1
0
Fork 0

Finalize documentation of --force flag for hotbackup.

This now contains a stern warning hopefully convincing customers
not to use this option.
This commit is contained in:
Max Neunhoeffer 2019-11-29 14:11:58 +01:00
parent c122123599
commit 49bf832f97
2 changed files with 17 additions and 2 deletions

View File

@ -28,6 +28,17 @@ acquired within the given timeout, a possibly inconsistent backup
is taken. The default for this flag is `false` and in this case
a timeout results in an HTTP 408 error.
@RESTBODYPARAM{force,boolean,optional,boolean}
If this flag is set to `true` and no global transaction lock can be
acquired within the given timeout, all running transctions are
forcefully aborted to ensure that a consistent backup can be created.
This option is rather brutal and almost certainly not what your application
is going to like. In the presence of intermediate commits it can even
destroy the atomicity of your transactions. Use at your own risk, and only
if you need a consistent backup at all costs. The default and recommended value is `false`. If both
`allowInconsistent` and `force` are set to `true`, then the latter
takes precedence and transactions are aborted.
@RESTRETURNCODES
@RESTRETURNCODE{201}

View File

@ -736,8 +736,12 @@ void BackupFeature::collectOptions(std::shared_ptr<options::ProgramOptions> opti
new BooleanParameter(&_options.abort));
options->addOption("--force",
"abort transactions if needed to ensure a consistent snapshot"
"(create operation)",
"abort transactions if needed to ensure a consistent snapshot."
" (create operation).",
" Note that this is rather brutal and is almost certainly not what your "
"application is going to like. In the presence of intermediate commits using "
"this option can even destroy the atomicity of your transactions. Use at your "
"own risk and only if you really need a consistent backup at all costs."
new BooleanParameter(&_options.abortTransactionsIfNeeded));
#endif
/*