summaryrefslogtreecommitdiff
path: root/scripts/database-dump.php
blob: f4f04ac8586e587cbd083ff71af0f30e7da0b82e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
/**
 * Dumps the semanticscuttle database into a file using mysqldump.
 *
 * This file is part of
 * SemanticScuttle - your social bookmark manager.
 *
 * PHP version 5.
 *
 * @category Bookmarking
 * @package  SemanticScuttle
 * @author   Christian Weiske <cweiske@cweiske.de>
 * @license  GPL http://www.gnu.org/licenses/gpl.html
 * @link     http://sourceforge.net/projects/semanticscuttle
 */
require_once dirname(__FILE__) . '/../src/SemanticScuttle/header-standalone.php';

passthru(
    'mysqldump'
    . ' -h' . escapeshellarg($GLOBALS['dbhost'])
    . ' -u' . escapeshellarg($GLOBALS['dbuser'])
    . ' -p' . escapeshellarg($GLOBALS['dbpass'])
    . ' ' . escapeshellarg($GLOBALS['dbname'])
    . ' > semanticscuttle-dump.sql'
);
?>