[IMP]Backup rsync global : only 2 days, 2 weeks, 6 months
This commit is contained in:
parent
3226864b18
commit
7bbdb5aae2
@ -50,14 +50,12 @@ def notkeep(fname):
|
||||
ds = ds[0]
|
||||
d = datetime.strptime(ds, '%Y-%m-%d')
|
||||
delta = dt - d
|
||||
if delta.days > 365:
|
||||
if delta.days > 180:
|
||||
return True
|
||||
elif delta.days > 31:
|
||||
# if (delta.days %% 30) != 0:
|
||||
elif delta.days > 15:
|
||||
if (d.day != 1):
|
||||
return True
|
||||
elif delta.days > 2:
|
||||
# if (delta.days %% 7) != 0:
|
||||
if (d.weekday() != 0) and (d.day != 1):
|
||||
return True
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user