0

I want to backup MySQL database with a script (Cron) with CodeIgniter 3.

But when I export as zip it will return each table records with single query. Not like we export from MySQL database. For example, if one table has 500 records, it will show 500 single queries instead of bunch of queries.

Please suggest, how to export database with script with output as we export from MySQL.

5
  • 1
    And what you have tried so far ? anyway do search on google youtube.com/watch?v=bNVz10VZf9Y Commented Jun 2, 2020 at 12:41
  • Follow this link : stackoverflow.com/a/14096722/9255518 Commented Jun 2, 2020 at 12:44
  • In this video, it will have same records like me. It will not affect with small database. But I have 25 MB database which will taking too much time for import again due to single query for each raw. Commented Jun 2, 2020 at 12:50
  • 2
    If you're doing it using cron, it might be easier just to use mysqldump directly? Then you don't need to involve CodeIgniter or PHP at all. Commented Jun 2, 2020 at 12:56
  • You've tagged phpMyAdmin, but that isn't an appropriate tool to use in this case. The phpMyAdmin application is intended to be used interactively by administrators, not called through a script. I agree with Magnus that mysqldump is by far the best tool for the job. Commented Jun 3, 2020 at 0:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.