//Backup manually public function CI_db_backup() { // Load the DB utility class $this->load->dbutil(); $this->load->database(); $dbName = $this->db->database; $prefs = array( "format" => 'sql', // gzip, zip, txt "filename" => $dbName.'.sql', // File name ); // Backup your entire database and assign it to a variable $backup = $this->dbutil->backup($prefs); $folder = FCPATH . "/storage_db/db_backup/"; $date = date("m-d-Y-H-i-s", time()); $filename = $dbName . "_" . $date . ".sql"; // Load the file helper and write the file to your server $this->load->helper('file'); write_file($folder . $filename, $backup); // Load the download helper and send the file to your desktop $this->load->helper("download"); force_download($filename, $backup); }
Tuesday, May 29, 2018
Download Database Back_up using Codeigniter
Subscribe to:
Post Comments (Atom)
Product Category Demo in laravel
https://drive.google.com/file/d/1kuyeT3LA22IuN3o_kypOyXesEXMLv31e/view?usp=sharing
-
/******* This code is for converting height with of jpeg, jpg, png and gif image********* <?php function makeName($text) { // r...
-
function slugify($text) { // trim $text = trim($text); // replace non letter...
-
You could just make your own pg_dump directly from your Heroku database. First, get your postgres string using heroku config:get DATABA...
No comments:
Post a Comment