Hi all,
I would like to give the possibility to make a complete database backup to end user making it automatically from a menu item.
A part from the mySQL commands is there any other ready to use possibility ?
Many thanks
Giovannino
Hi all,
I would like to give the possibility to make a complete database backup to end user making it automatically from a menu item.
A part from the mySQL commands is there any other ready to use possibility ?
Many thanks
Giovannino
for example:
<?php
// Bitte hier Ihre Daten eintragen
$host= 'dbxx.db.1and1.com';
$user= 'dbxxxxxx';
$pass= 'xxxxxxxx';
$db= 'dbxxxxxxx';
// Befehl ausf?hren und in Zipfile speichern
system(sprintf(
'mysqldump --opt -h%s -u%s -p"%s" %s | gzip > %s/dumpDB.sql.gz',
$host,
$user,
$pass,
$db,
getenv('DOCUMENT_ROOT')
));
echo '+DONE';
?>
Hi RHS,
many thanks for script.
I’m wondering if the following variables are stored in somewhere becouse, in my situation, each solution installated is different from others.
I mean if your solution is sold to different customers each environment is different from others.
My needing is to have a parametric script that reads these values within active connection directly without a manual input or edit.
Probably they are global variable but I really do not know how to read them.
$host= ‘dbxx.db.1and1.com’;
$user= ‘dbxxxxxx’;
$pass= ‘xxxxxxxx’;
$db= ‘dbxxxxxxx’;