A CKAN extension that checks and cleans the FileStore.
List of cli commands
Please make sure You have full backup before using any of the cli commands
Check-resource - Checks if for all resources by id from database exists resource file in storage
ckan -c ../ckan/production.ini check-resource
Resource-table-cleanup - Checks resources by id and state and deletes the rows where state is deleted and there is no dataset for that resource
ckan -c ../ckan/production.ini resource-table-cleanup
Resource-filestore-cleanup - Checks for resource in filestore exists row in resource table and deletes the resource if no row is found.
When used without arguments it just lists the files. Use –delete to actually delete the resources
By default it lists and puts in log all resources. Use –list-deleted to list only resources that need to be deleted/are deleted
ckan -c ../ckan/production.ini resource-filestore-cleanup