Skip to content

Commit

Permalink
Remove deletion of THS in restore script
Browse files Browse the repository at this point in the history
As noted in a PR review [0] (unfortunately after merge), this stanza is a no-op in the context of a backup restore and should be removed.

[0]: #4133 (review)
  • Loading branch information
emkll authored and kushaldas committed Sep 25, 2019
1 parent ecf949e commit 65be623
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions install_files/ansible-base/roles/restore/files/restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"""

import os
import shutil
import subprocess
import sys
import tarfile
Expand Down Expand Up @@ -36,13 +35,6 @@ def verify_args():
def main():
verify_args()

# Remove the /var/lib/tor/services directories to purge values that may have been
# generated by running the ansible playbooks
for d in ['journalist', 'source']:
full_path = os.path.join('/var/lib/tor/services', d)
if os.path.exists(full_path):
shutil.rmtree(full_path)

with tarfile.open(sys.argv[1], 'r:*') as backup:
# This assumes that both the old installation (source of the backup)
# and the new installation (destination of the restore) used the
Expand Down

0 comments on commit 65be623

Please sign in to comment.