![]() |
How to create back up ?
Hi ,
i want to create script that create backup from my database ! i cannot use PHP my admin or other programs ! i need a little script can you help me ? (i cannot speak English very well) |
You could use the following OpenSource-Tools for PHP:
MySQLDumper phpMyBackupPro Good luck with your project. With best regards Innocentus |
Could look something like this?!
!!! THIS CODE IS NOT TESTED !!! (just written right out of my head - it could be filled with bugs :-P) PHP Code:
PHP Code:
Edit: When anyone finds mistakes/errors - please drop a reply - I'm always willing to learn... |
If you have shell access to your server, you can issue a mysqldump command
Code:
mysqldump database -u username -p password -h host > backup.sql |
Quote:
|
Quote:
mysqldump -h localhost -u backup -pbackup talkphp > w:/talkphp.sql on my WAMP test server (Virtualised Windows XP with WAMP 2.0f) without any problems. |
Should work fine in windows, if you set your paths right.
|
and how about restore ?
|
like thus:
Code:
mysql -u user -p password -D database < backup.sqlCode:
mysql -u user -p passwordCode:
mysql> use databasename; |
The way I do it is backup my data server-side with a command prompt.
Of course, I am running Windows Server with root access, if you do have these requirements I will me more than happy to give you a command prompt in order to do it. Jordan |
sample back up database
PHP Code:
|
| All times are GMT. The time now is 06:29 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0