Test link Backup

Discuss test processes, standards, documentation, teams, criteria, test environments, etc.

Moderators: Amaradana, TurboPT, TL Developers

Test link Backup

Postby Rhoades » Tue Nov 11, 2008 9:19 am

Can some-one tell me the best and easiest way to go about backing up the MySQL test link data.

We are running version 1.7.4
Rhoades
TestLink user
 
Posts: 2
Joined: Tue Nov 11, 2008 9:17 am

Postby havlatm » Thu Nov 13, 2008 9:39 am

havlatm
Member of TestLink Community
 
Posts: 940
Joined: Mon Oct 31, 2005 1:24 am
Location: Czech

Hi

Postby gauravkkumar » Thu Dec 18, 2008 9:39 am

You can use the following PHP script.
#################################################

<?php
$host = "localhost";
$database = "<DBName>";
$user = "<User Name>";
$pass = "<Password>";

$dbh = mysql_connect($host, $user, $pass) or die ("Can't connect to MySQL");
mysql_select_db($database) or die ("Can't connect to db");

$bckp_file = $database.date("Y-m-d-H-i-s").".sql";
$command = "mysqldump -h$host -u$user -p$pass $database > $bckp_file";
$database > $bckp_file;

system ($command);

?>

##########################################################

You need to only change the Database name, User Name and Password in this script.

Command for running this script:-

For Windows:-

C:\path\to\php.exe -f c:\path\to\script

For Linux:-

/path/to/php -f /path/to/script

For automatic execution of this script, use the "at" command from command line.
gauravkkumar
TestLink user
 
Posts: 1
Joined: Thu Dec 18, 2008 9:27 am


Return to General Testing and Test management



Who is online

Users browsing this forum: No registered users and 1 guest

cron