diff --git a/cob_datapipeline/backup_collections_dag.py b/cob_datapipeline/backup_collections_dag.py index b90ea906..458d572e 100644 --- a/cob_datapipeline/backup_collections_dag.py +++ b/cob_datapipeline/backup_collections_dag.py @@ -50,7 +50,7 @@ def backup_collections(collections: list): delete_task = SSHOperator( task_id="delete_old_solr_backups", ssh_conn_id="SOLR_NETWORKED_DRIVE", - command="sudo find /backups/ -type f -mtime +30 -exec rm {} \\;", + command="sudo find /backups/ -type d -mindepth 1 -maxdepth 1 -mtime +30 -exec rm -rf {} +", cmd_timeout=None, )