[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]
|
ds = ds[0]
|
||||||
d = datetime.strptime(ds, '%Y-%m-%d')
|
d = datetime.strptime(ds, '%Y-%m-%d')
|
||||||
delta = dt - d
|
delta = dt - d
|
||||||
if delta.days > 365:
|
if delta.days > 180:
|
||||||
return True
|
return True
|
||||||
elif delta.days > 31:
|
elif delta.days > 15:
|
||||||
# if (delta.days %% 30) != 0:
|
|
||||||
if (d.day != 1):
|
if (d.day != 1):
|
||||||
return True
|
return True
|
||||||
elif delta.days > 2:
|
elif delta.days > 2:
|
||||||
# if (delta.days %% 7) != 0:
|
|
||||||
if (d.weekday() != 0) and (d.day != 1):
|
if (d.weekday() != 0) and (d.day != 1):
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user