Sometimes people assume `samba-tool domain tombstones expunge` will
expunge tombstones, but in the general case it won't because it only
affects those that have reached the tombstone lifetime, but these are
likely to have already been deleted by the regularly scheduled task.
You need to set the tombstone lifetime to have much effect.
This patch doesn't change the behaviour, but it does warn the user
that they are probably doing nothing of significance.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
samdb = SamDB(url=H, session_info=system_session(),
credentials=creds, lp=lp)
+ if current_time_string is None and tombstone_lifetime is None:
+ print("Note: without --current-time or --tombstone-lifetime "
+ "only tombstones already scheduled for deletion will "
+ "be deleted.", file=self.outf)
+ print("To remove all tombstones, use --tombstone-lifetime=0.",
+ file=self.outf)
+
if current_time_string is not None:
current_time_obj = time.strptime(current_time_string, "%Y-%m-%d")
current_time = int(time.mktime(current_time_obj))