br0ken Posted March 9, 2009 Share Posted March 9, 2009 I've been using a self written PHP backup script in my PHP applications for a while now. It's always worked fine as I've only had to maintain a few applications and could customise it to fit each individual implementations needs. Now though, more and more different systems use it and I need a way to standardise it. My problem lies in the fact that different servers and version of MySQL report field types differently. For example some refer to a DECIMAL as a 'real' and some as 'unknown'. There are more other examples I could give of this. Is there a way I can write a script that would work with all servers and different MySQL versions? Any help will be much appreciated! Link to comment https://forums.phpfreaks.com/topic/148667-php-database-backups/ Share on other sites More sharing options...
redarrow Posted March 9, 2009 Share Posted March 9, 2009 yes you can you can write a script that will do them all, but to be honest it going to be a hell off a job as version's come out so quickly. you could get away with letting user's that buy your code also rent your database info. That way there 1 database version to backup properly. Link to comment https://forums.phpfreaks.com/topic/148667-php-database-backups/#findComment-780675 Share on other sites More sharing options...
redarrow Posted March 9, 2009 Share Posted March 9, 2009 Look at this it a backup script that covers most mysql versions. http://www.php-mysql-tutorial.com/wikis/mysql-tutorials/using-php-to-backup-mysql-databases.aspx Link to comment https://forums.phpfreaks.com/topic/148667-php-database-backups/#findComment-780681 Share on other sites More sharing options...
corbin Posted March 9, 2009 Share Posted March 9, 2009 Why not just use mysqldump or something? Link to comment https://forums.phpfreaks.com/topic/148667-php-database-backups/#findComment-780687 Share on other sites More sharing options...
br0ken Posted March 9, 2009 Author Share Posted March 9, 2009 I've taken a look at the link you posted before but it's no good. SELECT * INTO OUTFILE never seems to work for me, neither does mysqldump(). I'm not sure why! Link to comment https://forums.phpfreaks.com/topic/148667-php-database-backups/#findComment-780703 Share on other sites More sharing options...
Mchl Posted March 9, 2009 Share Posted March 9, 2009 mysqldump is a program distributed with mysql. You have to call it from PHP with proper parameters, and save its output to a file. Link to comment https://forums.phpfreaks.com/topic/148667-php-database-backups/#findComment-780728 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.