Changeset 900228
- Timestamp:
- 04/22/2014 03:08:44 PM (12 years ago)
- Location:
- mk-simple-backups
- Files:
-
- 5 edited
- 2 copied
-
tags/0.7.2 (copied) (copied from mk-simple-backups/trunk)
-
tags/0.7.2/class.backuphandler.php (modified) (1 diff)
-
tags/0.7.2/mk-simple-backups.php (modified) (2 diffs)
-
tags/0.7.2/readme.txt (copied) (copied from mk-simple-backups/trunk/readme.txt) (3 diffs)
-
trunk/class.backuphandler.php (modified) (1 diff)
-
trunk/mk-simple-backups.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mk-simple-backups/tags/0.7.2/class.backuphandler.php
r894112 r900228 248 248 } 249 249 250 251 252 250 /* 253 251 * createDBBackup() 254 * attempts to create a complete SQL Dump for Tables within the DB used by Wordpress255 * 256 * expects no parameters 257 * Returns true/false depending on succes with the backup252 * 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 258 256 */ 259 257 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() { 260 283 261 284 // 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 5 5 * Plugin URI: http://wordpress.org/plugins/mk-simple-backups/ 6 6 * Description: Allows you to create simple backups on a dedicated page nested in the "Tools" Menu. 7 * Version: 0.7. 17 * Version: 0.7.2 8 8 * Author: Michael Kühni 9 9 * Author URI: http://michaelkuehni.ch … … 110 110 case "db": 111 111 $s = $bkp->createDBBackup(); 112 if($s == false) { 113 $s = $bkp->createManualDBBackup(); 114 } 112 115 $desc = __("Database", "mk-simple-backups"); 113 116 $new_settings["db"] = true; -
mk-simple-backups/tags/0.7.2/readme.txt
r899702 r900228 3 3 Tags: backup, db, uploads 4 4 Requires at least: 3.7 5 Stable tag: 0.7. 15 Stable tag: 0.7.2 6 6 Tested up to: 3.9 7 7 License: GPLv2 or later … … 62 62 63 63 == 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() 64 67 65 68 = 0.7.1 = … … 142 145 == Upgrade Notice == 143 146 144 = 0. 6=145 Switching to form based Backup Creation 147 = 0.7.1 = 148 Faster and more reliable SQL Dumps await in 0.8 146 149 147 = 0.5 =148 Added features, check the changelog for detailed information149 150 150 = 0.2.1 =151 Important Fixes152 153 = 0.1 =154 It doesn't work otherwise. -
mk-simple-backups/trunk/class.backuphandler.php
r894112 r900228 248 248 } 249 249 250 251 252 250 /* 253 251 * createDBBackup() 254 * attempts to create a complete SQL Dump for Tables within the DB used by Wordpress255 * 256 * expects no parameters 257 * Returns true/false depending on succes with the backup252 * 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 258 256 */ 259 257 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() { 260 283 261 284 // access $wpdb object which is the favored way of interacting with wp-database atm -
mk-simple-backups/trunk/mk-simple-backups.php
r894112 r900228 5 5 * Plugin URI: http://wordpress.org/plugins/mk-simple-backups/ 6 6 * Description: Allows you to create simple backups on a dedicated page nested in the "Tools" Menu. 7 * Version: 0.7. 17 * Version: 0.7.2 8 8 * Author: Michael Kühni 9 9 * Author URI: http://michaelkuehni.ch … … 110 110 case "db": 111 111 $s = $bkp->createDBBackup(); 112 if($s == false) { 113 $s = $bkp->createManualDBBackup(); 114 } 112 115 $desc = __("Database", "mk-simple-backups"); 113 116 $new_settings["db"] = true; -
mk-simple-backups/trunk/readme.txt
r899702 r900228 3 3 Tags: backup, db, uploads 4 4 Requires at least: 3.7 5 Stable tag: 0.7. 15 Stable tag: 0.7.2 6 6 Tested up to: 3.9 7 7 License: GPLv2 or later … … 62 62 63 63 == 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() 64 67 65 68 = 0.7.1 = … … 142 145 == Upgrade Notice == 143 146 144 = 0. 6=145 Switching to form based Backup Creation 147 = 0.7.1 = 148 Faster and more reliable SQL Dumps await in 0.8 146 149 147 = 0.5 =148 Added features, check the changelog for detailed information149 150 150 = 0.2.1 =151 Important Fixes152 153 = 0.1 =154 It doesn't work otherwise.
Note: See TracChangeset
for help on using the changeset viewer.