Help - Search - Members - Calendar
Full Version: How to back
Hostony Board > General Support > HowTo
jfmathieu
Hi,
I'm on windows server with php and I like to know how I can backup my database easly by php or MySQL Administrator ?

Some body have info on this ?

Thank you for your help
jfmathieu
Hi,
So nobody have a suggestion ? :S
MartinB
Hello smile.gif
As i know, windows servers have phpmyadmin installed
if you know how to enter to phpmyadmin in your windows server (check help.hostony.com) go to it and then:

go to "export" and choose the databases you want to export the dump file
and choose the exportation options you like more.
(sql, csv, etc)

I recommend you to export the database as a SQL file, Add options like ADD DROP DATABASES, etc.

Try it smile.gif

also you can search in the forum, there is a lot of posts with phpmyadmin related issues, the most related to backups.
Slavik
You can't make the dump of the Db on the Windows server.
YOu should requset it via support ticket.
MartinB
sorry about my comments, i think i read in some place that they have phpmyadmin in windows sad.gif
Slavik
It can't be done via phpmyadmin but if the DB is big the operation can fail.
MartinB
yes, it's right.
but if you export it as a File, instead of inline ? tongue.gif
jfmathieu
Hi,
Thanks for your share. I know the existance of phpmyadmin but my question is that I whant to automate the process by a php file.

I have try this code but it gave me an error :

CODE
<?php
include 'config.php';
include 'opendb.php';

$backupFile = $dbname . date("Y-m-d-H-i-s") . '.gz';
$command = "mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname | gzip > $backupFile";
system($command);
include 'closedb.php';
?>


Should this code work on a windows server ?


biggrin.gif
MartinB
What error ?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.
IPS Driver Error

IPS Driver Error

There appears to be an error with the database.
You can try to refresh the page by clicking here