Skip to content

Commit 133f66c

Browse files
authored
Delete old backup directories. (#1722)
1 parent bc5d921 commit 133f66c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cob_datapipeline/backup_collections_dag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def backup_collections(collections: list):
5050
delete_task = SSHOperator(
5151
task_id="delete_old_solr_backups",
5252
ssh_conn_id="SOLR_NETWORKED_DRIVE",
53-
command="sudo find /backups/ -type f -mtime +30 -exec rm {} \\;",
53+
command="sudo find /backups/ -type d -mindepth 1 -maxdepth 1 -mtime +30 -exec rm -rf {} +",
5454
cmd_timeout=None,
5555
)
5656

0 commit comments

Comments
 (0)