remove_old_data
- remove_old_data(directory: str, days: int, safe: bool, backup_dir: str, remote: bool, remote_user: str | None = None, remote_host: str | None = None, port: int | None = None) None[source]
Core logic to identify and remove old data files.
- Parameters:
directory (str) – Directory to clean up.
days (int) – Retention period in days.
safe (bool) – If True, verifies backup before deletion.
backup_dir (str) – Backup directory path.
remote (bool) – If True, checks remote backup; otherwise local.
remote_user (str | None) – Remote username.
remote_host (str | None) – Remote host.
port (int | None) – SSH port.