Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Use --exclude-tag rather than --exclude-tag-under
Browse files Browse the repository at this point in the history
--exclude-tag-under=FOO will exclude the file FOO from being part of the
backup. That's a problem when we restore files because the tag file is lost and
we'll later be backing up things we meant to ignore. --exclude-tag includes FOO
in the backup and so if we restore there is no problem.
  • Loading branch information
lddubeau committed Jun 11, 2019
1 parent 7a02e5e commit c818c98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion btw_backup/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ def execute_backup(self):
time.sleep(0.5)

new_backup_path = os.path.join(dst, new_backup_name)
tar_args = ["-C", src, "--exclude-tag-under=NOBACKUP-TAG",
tar_args = ["-C", src, "--exclude-tag=NOBACKUP-TAG",
"-cpjf", new_backup_path, "."]
subprocess.check_call(["tar"] + tar_args)
self.chownif(new_backup_path)
Expand Down

0 comments on commit c818c98

Please sign in to comment.