From: Jeff D. <da...@da...> - 2001-09-13 00:43:20
|
Hi Marjorie, I'm assuming here, that you're currently running version 1.2.0 (with the dba or dbm backend.) If that's not the case, ask again... > How do I ensure that when I switch to MySQL I don't lose anything? Make a zip dump (or a "serialized page" dump) of your wiki. (See below.) > How do I run the zip program? If you mean "how to a get a zip dump of my phpwiki?", here's how. (Again, assuming phpwiki 1.2.0.) (Before this will work, you must set an admin username and password in admin.php.) You should browse to the PhpWikiAdministration page, in admin mode. The appropriate URL is something like: http://your.domain/path/admin.php?PhpWikiAdministration There, near the top, you'll see two links labeled "ZIP Snapshot" and "ZIP Dump". Click on one of them. (A "snapshot" contains only the most recent version of each page in the wiki, while a "dump" contains the archived version of each page as well.) Hopefully your browser will have offered to save a file for you. (Name it <something-or-other>.zip.) Now, to be paranoid, you might want to examine the zip file you just produced to make sure that it does indeed look like it contains the pages of your wiki. (On unix systems, you can use the programs 'zipinfo' and 'unzip' to examine the zip file. On windows systems there are any number of programs you can use.) > What is a "serialize()" page? As an alternative to zip dumping, you can serialize dump. This writes the contents of each page (current version only) into a directory ON THE SERVER, one file per page. PHP's serialize() function is used to encode the pages meta-data (like the page author, and time of last edit) as well and the pages content into the file. > Which of these files do I interact directly with? For instance, the admin.php script takes care of the lockpage, but doesn't seem to mention anything about the zip file. > In 1.2.0, you don't call any of those directly, admin.php does it for you. ... > admin/zip.php3: Uhoh. In 1.2.0, this is called admin/zip.php. Maybe you're not running 1.2.0? If so, let me know which version, and I'll see if I can figure out the answer. > I sincerely see a need for better documentation with this (in many areas), and I'd be happy to help, but I've got to "get it" first, myself. Yes. > I tried > http://my.domain/admin/wiki_dumHTML.php wiki_dumpHTML.php is nothing but a skeleton of some planned future enhancement. Just ignore it. > Honestly trying, and honestly a phpwiki fan, albeit a somewhat frustrated one, Sorry.... And here's the answer to your next question: What do I do with the zip dump (or the directory full of serialized pages)? If you're just changing backends, probably the cleanest thing to do is to edit lib/config.php and set WIKI_PGSRC to point to your zip dump (you'll have to copy the zip file back to the server...). (For loading serialized pages, set WIKI_PGSRC to point to the directory containing the serialized pages.) Then, wipe your backend completely. And then try to browse your FrontPage. Hopefully, phpwiki will load all the pages from whatever source your set WIKI_PGSRC to point to, and you're back in business. The other option (if you don't want to wipe the database completely) is to use the "Load serialized pages" form on PhpWikiAdministration. You can enter either the path to a zip-dump file (on the server) or a path to a directory of serialized pages in that form... Jeff |