CodeIgniter Forums
How often do you use the backup() method of the database drivers? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Development (https://forum.codeigniter.com/forumdisplay.php?fid=27)
+--- Thread: How often do you use the backup() method of the database drivers? (/showthread.php?tid=72750)

Pages: 1 2 3 4


How often do you use the backup() method of the database drivers? - kilishan - 02-06-2019

The Mysql driver in CodeIgniter (I think that's the only one) has a backup feature. Do you ever use this feature? Thinking of dropping it from CI4.


RE: How often do you use the backup() method of the database drivers? - Krycek - 02-07-2019

Never used it, our hoster has his own backup plan / solution.
This is the one we use when we need it Smile


RE: How often do you use the backup() method of the database drivers? - InsiteFX - 02-07-2019

Never use it my hosting provider backs up my database every night for me.


RE: How often do you use the backup() method of the database drivers? - php_rocs - 02-07-2019

I think that dropping the backup feature is a good idea.


RE: How often do you use the backup() method of the database drivers? - jreklund - 02-07-2019

Never used it. I'm backing it up manually with mysqldump, phpmyadmin or using a automatic cron script.


RE: How often do you use the backup() method of the database drivers? - HalimDev - 02-07-2019

(02-07-2019, 12:04 PM)jreklund Wrote: Never used it. I'm backing it up manually with mysqldump, phpmyadmin or using a automatic cron script.

I didn't know that this feature exist!!, but I think It may be very helpful, our app is hosted in private network with crazy security policy, always nothing installed on the server only wamp with phpmyadmin, no ftp, no software, no remote sql, I do phpmyadmin to do backup, and If CodeIgniter has already this feature, It may very helpful for us.

Thanks.


RE: How often do you use the backup() method of the database drivers? - marqone - 02-07-2019

I used a cron script to call the backup from a CLI controller.. it would not be a big deal to write a better solution instead of being lazy.


RE: How often do you use the backup() method of the database drivers? - adamoli - 02-07-2019

I've used it.
It came in handy when a client of mine asked for the option to manually download the database.

If you are in an evironment where you can't modify php settings, you may have trouble with large backups, and end up calling this function multiple times for different tables.

Just saying there's room for improvement, maybe making it a class of its own or moving it to the database forge class.
I'm sorry I don't know if these exist in CI4.


RE: How often do you use the backup() method of the database drivers? - krishnan - 02-08-2019

never used it. i'm using hosting daily backup.


RE: How often do you use the backup() method of the database drivers? - skunkbad - 02-08-2019

php exec + mysqldump + Dropbox API on a cron works for me.