From 879ea73aa7429bbda21d28ddfe6cc2cddc6a964a Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Tue, 7 Jul 2020 21:59:39 +0200 Subject: [PATCH] recreate: remove extra confirmation not experimental any more, user is responsible for avoiding bugs. the docs still point out that this might be dangerous when used wrongly, like it also does for prune. --- docs/internals/frontends.rst | 2 -- docs/usage/general/environment.rst.inc | 2 -- src/borg/archiver.py | 8 -------- src/borg/testsuite/archiver.py | 1 - 4 files changed, 13 deletions(-) diff --git a/docs/internals/frontends.rst b/docs/internals/frontends.rst index 6df9d9516..b9cbe154a 100644 --- a/docs/internals/frontends.rst +++ b/docs/internals/frontends.rst @@ -577,5 +577,3 @@ Prompts For "This is a potentially dangerous function..." (check --repair) BORG_DELETE_I_KNOW_WHAT_I_AM_DOING For "You requested to completely DELETE the repository *including* all archives it contains:" - BORG_RECREATE_I_KNOW_WHAT_I_AM_DOING - For "This is a potentially dangerous function..." (recreate) diff --git a/docs/usage/general/environment.rst.inc b/docs/usage/general/environment.rst.inc index fdf797512..87a3f84b8 100644 --- a/docs/usage/general/environment.rst.inc +++ b/docs/usage/general/environment.rst.inc @@ -86,8 +86,6 @@ Some automatic "answerers" (if set, they automatically answer confirmation quest For "This is a potentially dangerous function..." (check --repair) BORG_DELETE_I_KNOW_WHAT_I_AM_DOING=NO (or =YES) For "You requested to completely DELETE the repository *including* all archives it contains:" - BORG_RECREATE_I_KNOW_WHAT_I_AM_DOING=NO (or =YES) - For "This is a potentially dangerous function..." (recreate) Note: answers are case sensitive. setting an invalid answer value might either give the default answer or ask you interactively, depending on whether retries are allowed (they by default are diff --git a/src/borg/archiver.py b/src/borg/archiver.py index fd880f23c..ea9ba0ee6 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -1710,14 +1710,6 @@ class Archiver: @with_repository(cache=True, exclusive=True, compatibility=(Manifest.Operation.CHECK,)) def do_recreate(self, args, repository, manifest, key, cache): """Re-create archives""" - msg = ("This is a potentially dangerous function.\n" - "recreate might lead to data loss (if used wrongly). BE VERY CAREFUL!\n" - "\n" - "Type 'YES' if you understand this and want to continue: ") - if not yes(msg, false_msg="Aborting.", truish=('YES',), - env_var_override='BORG_RECREATE_I_KNOW_WHAT_I_AM_DOING'): - return EXIT_ERROR - matcher = self.build_matcher(args.patterns, args.paths) self.output_list = args.output_list self.output_filter = args.output_filter diff --git a/src/borg/testsuite/archiver.py b/src/borg/testsuite/archiver.py index 72c68f40e..4ad5e125f 100644 --- a/src/borg/testsuite/archiver.py +++ b/src/borg/testsuite/archiver.py @@ -252,7 +252,6 @@ class ArchiverTestCaseBase(BaseTestCase): def setUp(self): os.environ['BORG_CHECK_I_KNOW_WHAT_I_AM_DOING'] = 'YES' os.environ['BORG_DELETE_I_KNOW_WHAT_I_AM_DOING'] = 'YES' - os.environ['BORG_RECREATE_I_KNOW_WHAT_I_AM_DOING'] = 'YES' os.environ['BORG_PASSPHRASE'] = 'waytooeasyonlyfortests' self.archiver = not self.FORK_DEFAULT and Archiver() or None self.tmpdir = tempfile.mkdtemp()