sassoftware / pyviyatools

Python command-line tools that call the SAS Viya REST APIs - for SAS administrators.
Apache License 2.0
38 stars 31 forks source link

no deletion with "python3 archivefiles.py -x" #191

Closed mauriziopinzi closed 9 months ago

mauriziopinzi commented 10 months ago

Hi, I have an internal postgres with more than 400k blobs, I need to delete them, these blobs are logs from job execution With python3 listfiles.py -n log -p /job -d 35 -o json I'm able to find them but when I run python3 archivefiles.py -x -n log -d 35 -p /job -fp /tmp I get this message and nothing is deleted The files will be archived. Do you also want to delete the files? (Y)y NOTE: 0FDD6C53-8249-9042-8C0D-31550BA711CC.log of content type application/vnd.sas.collection+json not supported NOTE: files archived to the directory /tmp/D20231129T1717S

gerrynelson63 commented 10 months ago

The archive doesn't deal with binary files. I think we could probably delete them without archiving. Would that work for you?

If so I can test an option to delete binary files without archiving.

mauriziopinzi commented 10 months ago

Sure, it would be even better

gerrynelson63 commented 9 months ago

I fixed a bug in identifying binary files. Also added the option -xx, --deletenoarch Delete Files without Archiving from Viya