Plugin Directory

Changeset 900228


Ignore:
Timestamp:
04/22/2014 03:08:44 PM (12 years ago)
Author:
michitzky
Message:

tagging version 0.7.2

Location:
mk-simple-backups
Files:
5 edited
2 copied

Legend:

Unmodified
Added
Removed
  • mk-simple-backups/tags/0.7.2/class.backuphandler.php

    r894112 r900228  
    248248    }
    249249   
    250    
    251    
    252250    /*
    253251     *      createDBBackup()
    254      *      attempts to create a complete SQL Dump for Tables within the DB used by Wordpress
    255      *     
    256      *      expects no parameters
    257      *      Returns true/false depending on succes with the backup
     252     *      attempts to create a complete SQL Dump with system()
     253     *     
     254     *      expects no parameters
     255     *      Returns filename of backup or false depending on success with the backup
    258256     */
    259257    function createDBBackup() {
     258       
     259        $backup_name = $this->getBackupName("db_" . DB_NAME, ".sql.gzip");
     260        $backup_file = $this->backup_dir . "/" . $backup_name;
     261        $command = "mysqldump --host=" . DB_HOST . " --user=" . DB_USER . " --password=" . DB_PASSWORD . " " . DB_NAME . " | gzip > " . $backup_file;
     262        @system($command, $test);
     263       
     264        if(is_file($backup_file) && filesize($backup_file) > 100) {
     265            // file exists, set backups_exist to true
     266            $this->backups_exist = true;
     267           
     268            return $backup_name;
     269        } else return false;
     270   
     271       
     272    }
     273   
     274   
     275    /*
     276     *      createManualDBBackup()
     277     *      attempts to manually create a complete SQL Dump for Tables within the DB used by Wordpress
     278     *     
     279     *      expects no parameters
     280     *      Returns filename of backup or false depending on success with the backup
     281     */
     282    function createManualDBBackup() {
    260283       
    261284        // access $wpdb object which is the favored way of interacting with wp-database atm
  • mk-simple-backups/tags/0.7.2/mk-simple-backups.php

    r894112 r900228  
    55 * Plugin URI: http://wordpress.org/plugins/mk-simple-backups/
    66 * Description: Allows you to create simple backups on a dedicated page nested in the "Tools" Menu.
    7  * Version: 0.7.1
     7 * Version: 0.7.2
    88 * Author: Michael Kühni
    99 * Author URI: http://michaelkuehni.ch
     
    110110                                case "db":
    111111                                    $s = $bkp->createDBBackup();
     112                                    if($s == false) {
     113                                        $s = $bkp->createManualDBBackup();
     114                                    }
    112115                                    $desc = __("Database", "mk-simple-backups");
    113116                                    $new_settings["db"] = true;
  • mk-simple-backups/tags/0.7.2/readme.txt

    r899702 r900228  
    33Tags: backup, db, uploads
    44Requires at least: 3.7
    5 Stable tag: 0.7.1
     5Stable tag: 0.7.2
    66Tested up to: 3.9
    77License: GPLv2 or later
     
    6262
    6363== Changelog ==
     64
     65= 0.7.2 =
     66* Plugin attempts to use system() for SQL Dump, reducing server-load, especially for larger Databases. Old approach will be attempted on hostings without support for system()
    6467
    6568= 0.7.1 =
     
    142145== Upgrade Notice ==
    143146
    144 = 0.6 =
    145 Switching to form based Backup Creation
     147= 0.7.1 =
     148Faster and more reliable SQL Dumps await in 0.8
    146149
    147 = 0.5 =
    148 Added features, check the changelog for detailed information
    149150
    150 = 0.2.1 =
    151 Important Fixes
    152 
    153 = 0.1 =
    154 It doesn't work otherwise.
  • mk-simple-backups/trunk/class.backuphandler.php

    r894112 r900228  
    248248    }
    249249   
    250    
    251    
    252250    /*
    253251     *      createDBBackup()
    254      *      attempts to create a complete SQL Dump for Tables within the DB used by Wordpress
    255      *     
    256      *      expects no parameters
    257      *      Returns true/false depending on succes with the backup
     252     *      attempts to create a complete SQL Dump with system()
     253     *     
     254     *      expects no parameters
     255     *      Returns filename of backup or false depending on success with the backup
    258256     */
    259257    function createDBBackup() {
     258       
     259        $backup_name = $this->getBackupName("db_" . DB_NAME, ".sql.gzip");
     260        $backup_file = $this->backup_dir . "/" . $backup_name;
     261        $command = "mysqldump --host=" . DB_HOST . " --user=" . DB_USER . " --password=" . DB_PASSWORD . " " . DB_NAME . " | gzip > " . $backup_file;
     262        @system($command, $test);
     263       
     264        if(is_file($backup_file) && filesize($backup_file) > 100) {
     265            // file exists, set backups_exist to true
     266            $this->backups_exist = true;
     267           
     268            return $backup_name;
     269        } else return false;
     270   
     271       
     272    }
     273   
     274   
     275    /*
     276     *      createManualDBBackup()
     277     *      attempts to manually create a complete SQL Dump for Tables within the DB used by Wordpress
     278     *     
     279     *      expects no parameters
     280     *      Returns filename of backup or false depending on success with the backup
     281     */
     282    function createManualDBBackup() {
    260283       
    261284        // access $wpdb object which is the favored way of interacting with wp-database atm
  • mk-simple-backups/trunk/mk-simple-backups.php

    r894112 r900228  
    55 * Plugin URI: http://wordpress.org/plugins/mk-simple-backups/
    66 * Description: Allows you to create simple backups on a dedicated page nested in the "Tools" Menu.
    7  * Version: 0.7.1
     7 * Version: 0.7.2
    88 * Author: Michael Kühni
    99 * Author URI: http://michaelkuehni.ch
     
    110110                                case "db":
    111111                                    $s = $bkp->createDBBackup();
     112                                    if($s == false) {
     113                                        $s = $bkp->createManualDBBackup();
     114                                    }
    112115                                    $desc = __("Database", "mk-simple-backups");
    113116                                    $new_settings["db"] = true;
  • mk-simple-backups/trunk/readme.txt

    r899702 r900228  
    33Tags: backup, db, uploads
    44Requires at least: 3.7
    5 Stable tag: 0.7.1
     5Stable tag: 0.7.2
    66Tested up to: 3.9
    77License: GPLv2 or later
     
    6262
    6363== Changelog ==
     64
     65= 0.7.2 =
     66* Plugin attempts to use system() for SQL Dump, reducing server-load, especially for larger Databases. Old approach will be attempted on hostings without support for system()
    6467
    6568= 0.7.1 =
     
    142145== Upgrade Notice ==
    143146
    144 = 0.6 =
    145 Switching to form based Backup Creation
     147= 0.7.1 =
     148Faster and more reliable SQL Dumps await in 0.8
    146149
    147 = 0.5 =
    148 Added features, check the changelog for detailed information
    149150
    150 = 0.2.1 =
    151 Important Fixes
    152 
    153 = 0.1 =
    154 It doesn't work otherwise.
Note: See TracChangeset for help on using the changeset viewer.