PHP + MySql

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
alexmaster_2004
Forum Commoner
Posts: 35
Joined: Wed Sep 14, 2005 8:44 am

PHP + MySql

Post by alexmaster_2004 »

Hi
i want to know how to make php script that backup my database.
Thanks
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Post by Skara »

if you have phpMyAdmin, it'll do it for you. It's under "export."
alexmaster_2004
Forum Commoner
Posts: 35
Joined: Wed Sep 14, 2005 8:44 am

Post by alexmaster_2004 »

Hi
No i want to do the backup process from a php script .
i have get to what seemed a solution but i don't know if it will
run or not.
i used exec()
to execute the following command:
exec("/usr/bin/mysqldump --user USER --password=PASS DATABASENAME> /PATHTOSAVE/BACKUP.SQL");
but i didn't get anything and don't know if the fuction had executed or not.
i hope anyone could help
Thanks
Post Reply