Jump to content

Topic on Manual talk:DeleteArchivedFiles.php/Flow

Doesn't delete everything

4
Cavila (talkcontribs)

There are two subfolders, archived and deleted, in /images. You'd think that DeleteArchivedFiles.php would remove them, but I noticed that quite a few of them remain in place in both folders. Is there any specific reason why DeleteArchivedFiles.php would skip over them? Is it safe to remove the folder contents (both files and subfolders) by hand?

Hutchy68 (talkcontribs)

I would like to know this too! I can see archive folder as well as deleted folder filled with filekeyed files.

Cavila (talkcontribs)

Nothing came to light but a bug report has just been submitted: https://phabricator.wikimedia.org/T337096

I cannot check the logs myself since it's been a while, but maybe you can and maybe there is something you might want to add over there.

TiloWiki (talkcontribs)

fyi,

just ran it on small wiki (version 1.39.3)

localazureuser@wiki6:~$ find /var/www/html/myWiki/images/deleted/* -type f -size +1c | wc -l
58
localazureuser@wiki6:~$ find /var/www/html/myWiki/images/archive/* -type f -size +1c | wc -l
10

localazureuser@wiki6:~$ sudo php /var/www/html/myWiki/maintenance/deleteArchivedFiles.php --delete

Searching for and deleting archived files...
Notice - file '8al7ck7plk7e7yspx1lvii58ldzwhvf.png' not found in group 'deleted'
Notice - file 'gketp96b4kyb9ijiri9l0wecc1ychdn.jpg' not found in group 'deleted'
Notice - file 'gketp96b4kyb9ijiri9l0wecc1ychdn.jpg' not found in group 'deleted'
Notice - file 'gketp96b4kyb9ijiri9l0wecc1ychdn.jpg' not found in group 'deleted'
Notice - file 'gketp96b4kyb9ijiri9l0wecc1ychdn.jpg' not found in group 'deleted'
Notice - file 'a62ryclxwzrezc9jjojywhp1r71rbgf.jpg' not found in group 'deleted'
Notice - file '1b4ekhe41bmjshm5i9va9kp83dwmkmq.csv' not found in group 'deleted'
Notice - file 't3icgqp2swad4xrjb1ywwrbp7nrzls3.csv' not found in group 'deleted'
Notice - file 't3icgqp2swad4xrjb1ywwrbp7nrzls3.csv' not found in group 'deleted'
Notice - file 't3icgqp2swad4xrjb1ywwrbp7nrzls3.csv' not found in group 'deleted'
Notice - file 'imhsmkrg9f8n7y7zep0heeqpdbdfet0.jpg' not found in group 'deleted'
Notice - file 'a62ryclxwzrezc9jjojywhp1r71rbgf.jpg' not found in group 'deleted'
Notice - file 'lch60uae4trvlxyxbrczulh7qfttdic.pdf' not found in group 'deleted'
Done! [58 file(s)]

localazureuser@wiki6:~$ find /var/www/html/myWiki/images/deleted/* -type f -size +1c | wc -l
0
localazureuser@wiki6:~$ find /var/www/html/myWiki/images/archive/* -type f -size +1c | wc -l
10

The delete folder still has the random sub-folders and 0kb index.html files (with very old timestamp)

Reply to "Doesn't delete everything"