Welcome Guest, Not a member yet? Register   Sign In
how to create backup database
#1

(This post was last modified: 08-03-2015, 01:27 AM by R3Z4.)

hi gays
i want careate backup pdo database
my code:

PHP Code:
function backup()
    {
        
$prefs = array(
 
       'tables'        => array('category'),   // Array of tables to backup.
 
       'ignore'        => array(),                     // List of tables to omit from the backup
 
       'format'        => 'txt'                      // gzip, zip, txt
 
       'filename'      => 'mybackup.sql'             // File name - NEEDED ONLY WITH ZIP FILES
 
       'add_drop'      => TRUE                       // Whether to add DROP TABLE statements to backup file
 
       'add_insert'    => TRUE                       // Whether to add INSERT data to backup file
 
       'newline'       => "\n"                         // Newline character used in backup file
);

        
// Load the DB utility class
        
$this->load->dbutil();

        
// Backup your entire database and assign it to a variable
        
$backup =& $this->dbutil->backup($prefs);

        
// Load the file helper and write the file to your server
        
$this->load->helper('file');
        
write_file('./mybackup.gz'$backup);

        
// Load the download helper and send the file to your desktop
        
$this->load->helper('download');
        
force_download('mybackup.gz'$backup);
    } 

error:
Unsupported feature of the database platform you are using.

Filename: C:\xampp\htdocs\chercknevis\system\database\drivers\pdo\pdo_utility.php
Line Number: 97



please help me
tanx Huh
Reply


Messages In This Thread
how to create backup database - by R3Z4 - 08-03-2015, 01:02 AM
RE: how to create backup database - by msteudel - 08-03-2015, 10:33 PM
RE: how to create backup database - by mwhitney - 08-04-2015, 08:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB