Skip to content

Commit

Permalink
fix extraneous --exclude
Browse files Browse the repository at this point in the history
  • Loading branch information
shodanshok committed Jan 5, 2024
1 parent 30d108a commit 847ed40
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions psnap
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def rotate(host, reflink):
if args.resync:
dst = snapdir + curr_interval + ".0"
create_dir(dst)
create_dir(dst+"/data")
create_dir(dst + "/data")
return 2
# identify latest previous interval snapshot
curr_count = int(config[host][curr_interval])
Expand Down Expand Up @@ -259,7 +259,7 @@ def rotate(host, reflink):
execute(cmd)
else:
create_dir(dst)
create_dir(dst+"/data")
create_dir(dst + "/data")
return 2


Expand Down Expand Up @@ -431,7 +431,8 @@ def backup_host(host):
for exclusion in exclude:
if stripws:
exclusion = exclusion.strip()
options = options + ["--exclude", exclusion]
if exclusion:
options = options + ["--exclude", exclusion]
# rotate snapshots
# if rsyns is not needed, return now
rotation = rotate(host, reflink)
Expand Down

0 comments on commit 847ed40

Please sign in to comment.