Last modified: 2012-04-12 13:56:13 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T31160, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29160 - importbackup of file pages doesn't seem to consistently rebind file pointers to pages in upload directory
importbackup of file pages doesn't seem to consistently rebind file pointers ...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Export/Import (Other open bugs)
1.16.x
Macintosh Mac OS X 10.6
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-26 23:06 UTC by JShrager
Modified: 2012-04-12 13:56 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description JShrager 2011-05-26 23:06:29 UTC
[We have this problem on many different version of mediawiki on various OSs, and it's so obvious that there must be something we're just missing about it. Great is this is a stupid question and you can just point us to the manual!]

When we move wiki content to a fresh install (via. importBackup and dumpBackup) we get pages for the files, and we copy over the upload directory, but for some reason the importBackup doesn't restore the file linkages in the database appropriately. Actually, sometimes it seems like it does, but we cannot figure out when it works and when it doesn't, and why. Is there a specific recipe that one is supposed to use when copying the files over that go with an importBackup?
Comment 1 Brion Vibber 2011-05-26 23:20:05 UTC
By default, dumpBackup & Special:Export only list page revisions, and don't include any of the uploaded file data.

There is an experimental mode to include upload data, using URL links to the source files; but beware that it may not be well tested.

  php maintenance/dumpBackup.php --uploads --full > out.xml

This will add entries like this within the file pages' <page> records:

    <upload>
      <timestamp>2011-01-31T00:20:40Z</timestamp>
      <contributor>
        <username>Brionv</username>
        <id>1</id>
      </contributor>
      <comment>/* Modified in svg-edit */ !!!!</comment>
      <filename>SVG.svg</filename>
      <archivename>20110131004503!SVG.svg</archivename>
      <src>http://stormcloud.local/trunk/images/archive/c/c7/20110131004503%21SVG.svg</src>
      <size>221307</size>
      <sha1base36>m0i2r1rkekul11zea86kcon2vxeu8pa</sha1base36>
      <rel>archive/c/c7/20110131004503!SVG.svg</rel>
    </upload>
 
Pass the same --uploads parameter to importDump to force it to process these:

  php maintenance/importDump.php --uploads in.xml

This should fetch the files over HTTP, save them into the uploads area, and restore the full image & oldimage records.
Comment 2 Brion Vibber 2011-05-26 23:24:45 UTC
See also bug 13827, which looks like requests doing this more consistently for Special:Export as well.
Comment 3 Bryan Tong Minh 2011-07-07 21:08:48 UTC
Need to check whether this has been fixed with my new file importing/exporting code.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links