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.
This commit is contained in:
Thomas Waldmann 2020-07-07 21:59:39 +02:00
parent 06c01ca78f
commit 879ea73aa7
4 changed files with 0 additions and 13 deletions

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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()