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


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

I pay for a full backup of everything (databases, server files, mailboxes etc) every 24hours which can be rolled back up to one month. It is about £3 a month for each site which I charge my customers for.


I have never used this feature in CI but like all features, I am sure there are people that do use it. However, these features could be considered quite specialised and if, as I am sure you do, there are good reasons to be considering dropping it, then perhaps it might re-emerge as a future feature request or perhaps even as an add-on written by people in the community.

Personally it would not affect me at all.

Paul.


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

I used it for most of my CI3 apps.


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

I used to make backups with CI feature, but when I needed to recover that backup it turned out that backup feature was bugged and I ended up with broken backup file. That bug has been fixed since 3.1.6 or 3.1.7 version but from then I don't trust this CI feature anymore.

I'm making backups with mysqldump command runned in PHP exec() function.

Also CI backup utility makes significantly bigger files comparing to mysqldump.


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

(02-06-2019, 09:50 PM)kilishan Wrote: 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.

You can put analytics Code in this model in the
CI 3.1.X new version,collect the information,then decide how to do.
I think some small Web and poor Host right guy are the right users。


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

yes. i am using it regularly in my codeigniter projects. if CI provide itself thn why use third party library or scripts?


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

I never used it before but I may use it if it remains in CI4.
Currently, I am using mysqldump in a cron job.


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

(02-06-2019, 09:50 PM)kilishan Wrote: 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.

me, using till now, my client and I need to take backup manually every week, 
sometimes we use it in crone and push to our cloud, its really a helpful feature for me and my team Smile 

     
Code:
       $this->load->helper('url');
        $this->load->helper('file');
        $this->load->helper('download');
        $this->load->library('zip');
        $this->load->dbutil();
        $db_format = array('format' => 'zip', 'filename' => 'my_db_backup.sql');
        $backup = &$this->dbutil->backup($db_format);
        $dbname = 'backup-on-' . date('Y-m-d') . '.zip';
        $save = 'backup/' . $dbname;
        write_file($save, $backup);
        force_download($dbname, $backup);
Heart Heart Heart Heart Heart


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

After restoring the site, I regularly back up. I will try to use this driver while it is.


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

Hi everyone,

I think you should not remove this feature from CodeIgniter because it is already codded so... Why ? What's the purpose ?
I plan to use it but I think you should call "mysqldump" through CodeIgniter to make your backup as this is a very powerful tool

Thanks,
Tigerblue77


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

Never used this feature as we are working in a professional environment with our own servers.