Commit 9e9ca4e1 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

resilient: find doesn't fail if files have wrong permissions

parent ded03013
...@@ -103,7 +103,7 @@ def getBackupFilesModifiedDuringExportList(config, export_start_date): ...@@ -103,7 +103,7 @@ def getBackupFilesModifiedDuringExportList(config, export_start_date):
export_time = time.time() - export_start_date export_time = time.time() - export_start_date
# find all files that were modified during export # find all files that were modified during export
modified_files = subprocess.check_output(( modified_files = subprocess.check_output((
'find', 'instance', '-cmin', str(export_time / 60), '-type', 'f', '-path', '*/srv/backup/*' 'find', 'instance', '-type', 'd', '!', '-perm', '-u+r,g+r,o+r', '-prune', '-o', '-cmin', str(export_time / 60), '-type', 'f', '-path', '*/srv/backup/*'
)) ))
if not modified_files: if not modified_files:
return () return ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment