Mailing List Archive

Problem: Ghosts of old uploads
This past week, our database was erased during an upgrade of the
MediaWiki software gone awry. We've managed to restore everything from
backup and things are running pretty smoothly now.

However, there's one problem that I haven't figured out how to solve:
because the database backup we've restored from is several weeks old,
the database thinks that there are several uploaded files that were
already deleted after the backup was made. That means the files are
gone from the actual upload directory, but they're still present in the
database.

How can I delete the records from the database without screwing up the
links?

Thanks,
Dan Carlson
http://memoryalpha.st-minutiae.com/
Re: Problem: Ghosts of old uploads [ In reply to ]
On Mar 28, 2004, at 05:51, Dan Carlson wrote:
> This past week, our database was erased during an upgrade of the
> MediaWiki software gone awry. We've managed to restore everything
> from backup and things are running pretty smoothly now.
>
> However, there's one problem that I haven't figured out how to solve:
> because the database backup we've restored from is several weeks old,
> the database thinks that there are several uploaded files that were
> already deleted after the backup was made. That means the files are
> gone from the actual upload directory, but they're still present in
> the database.
>
> How can I delete the records from the database without screwing up the
> links?

DELETE FROM image WHERE img_name='Some_image.jpg'

Check also the oldimage table.

-- brion vibber (brion @ pobox.com)