Fix: do not wipe archive_dir to prevent unexpected data deletion
This commit is contained in:
parent
16087cfab6
commit
19e4fec8fd
@ -29,7 +29,7 @@ Some of the parameters available in configuration file:
|
||||
* **logs_size_coefficient** a float value used to check local free space; 'logs size * coefficient' must be > free space; values lower than 0.3 are not recommended and will likely cause local disk fillup during log collection
|
||||
* **do_print_results** print outputs of commands and scripts to stdout
|
||||
* **clean** True/False - erase previous results in outdir and archive_dir dir, if any
|
||||
* **outdir** directory to store output data
|
||||
* **outdir** directory to store output data. **WARNING: this directory is WIPED by default at the beginning of data collection. Be careful with what you define here.**
|
||||
* **archive_dir** directory to put resulting archives into
|
||||
* **timeout** timeout for SSH commands and scripts in seconds
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# under the License.
|
||||
|
||||
project_name = 'timmy'
|
||||
version = '1.19.0'
|
||||
version = '1.19.1'
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
|
@ -538,7 +538,6 @@ class NodeManager(object):
|
||||
conf['archive_dir'] += timestamp_str
|
||||
if conf['clean']:
|
||||
shutil.rmtree(conf['outdir'], ignore_errors=True)
|
||||
shutil.rmtree(conf['archive_dir'], ignore_errors=True)
|
||||
if not conf['shell_mode']:
|
||||
self.rqdir = conf['rqdir']
|
||||
if (not os.path.exists(self.rqdir)):
|
||||
|
Loading…
Reference in New Issue
Block a user