papillonstudios Posted February 10, 2012 Share Posted February 10, 2012 I have been searching the web and I can't fond anyone that has working code for backing up database with PHP. Most of them have the notorious depreciated ereg_replace function. Does anyone know of a simple solution? I want it to backup all the tables in the database Quote Link to comment https://forums.phpfreaks.com/topic/256819-database-backup-php-53/ Share on other sites More sharing options...
ManiacDan Posted February 10, 2012 Share Posted February 10, 2012 If it's mysql, just use mysqldump. Quote Link to comment https://forums.phpfreaks.com/topic/256819-database-backup-php-53/#findComment-1316590 Share on other sites More sharing options...
jcbones Posted February 10, 2012 Share Posted February 10, 2012 I have used PHPMySQLautobackup in the past, and found it very easy to set up and use. You can chose to save to the server, or send to yourself in an email, or both. *I have no affiliation with the linked site* Quote Link to comment https://forums.phpfreaks.com/topic/256819-database-backup-php-53/#findComment-1316811 Share on other sites More sharing options...
scootstah Posted February 10, 2012 Share Posted February 10, 2012 system('mysqldump -u root -proot --all-databases > all_databases.sql'); Quote Link to comment https://forums.phpfreaks.com/topic/256819-database-backup-php-53/#findComment-1316813 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.