Manual talk:DumpBackup.php

From MediaWiki.org
Jump to: navigation, search

Contents

[edit] Questions


  • I have multiple wiki in the same database but different table. How do I specify which wiki to dump.
    • If you've soft linked one wiki installation's maintenance or includes to the other, the backup script will use the settings from wherever the files actually are, thus disregarding any table prefix you've set in the second installation's LocalSettings. I blew away the soft-linked maintenance and includes and copied the real ones in, and then the backup script used the proper LocalSettings. —alxndr (t) 23:45, 9 July 2009 (UTC)
  • I'm getting this error: This script must be run from the command line --74.14.57.223 23:30, 16 October 2008 (UTC)
  • What's the command for dumping to a specific file in linux? —The preceding unsigned comment was added by 203.59.181.26 (talkcontribs) {{{2}}}
php dumpBackup.php > out.xmlEmufarmers(T|C) 16:49, 14 February 2009 (UTC)
  • I'm running on Windows and PHP5. My database seems to be working fine. Any ideas? This is my command and error:
Command) C:\Program Files\PHP5>php -q "C:\Program Files\Abyss Web Server\htdocs\wikismith\maintenance\dumpBackup.php" --full --report
Error) DB connection error: Unknown error

Nevermind, I didn't have an AdminSetting.php setup.

[edit] Warning - division by zero - will it cause problems?

While dumping a wiki, the following are the last two lines of the dump:

Warning: Division by zero in [DIRECTORY]/maintenance/backup.inc on line 267 2009-06-10 14:14:18: wikademia_ 10206 pages (92.738/sec), 59922 revs (544.487/sec), ETA 2009-06-10 14:14:20 [max 61176] Warning: Division by zero in [DIRECTORY]/maintenance/backup.inc on line 267

The whole "Warning: Division by zero in..." can that cause problems? Is there a known fix? Thank you. Wikademia

dunno how to quote, but problem is this. you have --report with no =n. a look at the file in question shows that there is no check if you provide the --report flag without supplying an option. omit this flag.

[edit] Full doesn't get logs, and vice versa?

I am confused by the --full and --logs flag in the dumpBackup.php file. The full backup doesn't appear to grab the logs, and the logs flag obviously doesn't get the full. Do I need to run both of these on seperate dumps? Or should I just be on the safe side and run 3 dumps and tarball them up. --Urda 16:07, 12 March 2010 (UTC)

[edit] Error message

<br />
<b>Parse error</b>:  syntax error, unexpected ':', expecting '(' in <b>/home/content/c/2/o/c/html/maintenance/dumpBackup.php</b> on line <b>60</b><br />

Error line 60:

$textMode = isset( $options['stub'] ) ? WikiExporter::STUB : WikiExporter::TEXT;</nowiki>

Adamtheclown 02:32, 20 December 2010 (UTC)

I fixed this issue by using php5. 24.226.34.199 23:57, 20 May 2011 (UTC)

[edit] Backup for farms

For backing up wiki familiys I wrote this tiny script dumpBackup_farm.php.

<?php
// Backup script for wiki farms by Marco Bakera
 
$_SERVER['REQUEST_URI'] = "/".$argv[1];
 
// print_r($argv);
 
// remove first argument
unset($argv[1]);
// reindex array
$argv = array_values($argv);
 
 
//print_r($argv);
 
// run the default backup script
include("dumpBackup.php");

For instance, when invoked with php dumpBackup_farm.php wiki42 --full it creates a full backup of wiki42. This works for family wikis as created in Scenario 2.

Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox