Changeset 892993
- Timestamp:
- 04/14/2014 04:00:14 PM (12 years ago)
- Location:
- mk-simple-backups
- Files:
-
- 9 deleted
- 12 edited
- 6 copied
-
tags/0.6 (copied) (copied from mk-simple-backups/trunk)
-
tags/0.6/assets/css/general.css (modified) (1 diff)
-
tags/0.6/assets/images/add.png (deleted)
-
tags/0.6/assets/images/camera.png (deleted)
-
tags/0.6/assets/images/camera_add.png (deleted)
-
tags/0.6/assets/images/compress.png (deleted)
-
tags/0.6/assets/images/database.png (copied) (copied from mk-simple-backups/trunk/assets/images/database.png)
-
tags/0.6/assets/images/database_add.png (deleted)
-
tags/0.6/assets/images/layout.png (copied) (copied from mk-simple-backups/trunk/assets/images/layout.png)
-
tags/0.6/assets/images/layout_add.png (deleted)
-
tags/0.6/assets/images/page_white.png (copied) (copied from mk-simple-backups/trunk/assets/images/page_white.png)
-
tags/0.6/assets/images/page_white_add.png (deleted)
-
tags/0.6/assets/images/page_white_zip.png (copied) (copied from mk-simple-backups/trunk/assets/images/page_white_zip.png)
-
tags/0.6/assets/images/pictures.png (copied) (copied from mk-simple-backups/trunk/assets/images/pictures.png)
-
tags/0.6/assets/images/table.png (deleted)
-
tags/0.6/assets/images/table_add.png (deleted)
-
tags/0.6/class.backuphandler.php (modified) (2 diffs)
-
tags/0.6/languages/mk-simple-backups-de_DE.mo (modified) (previous)
-
tags/0.6/languages/mk-simple-backups-de_DE.po (modified) (10 diffs)
-
tags/0.6/mk-simple-backups.php (modified) (7 diffs)
-
tags/0.6/readme.txt (modified) (3 diffs)
-
trunk/assets/css/general.css (modified) (1 diff)
-
trunk/class.backuphandler.php (modified) (2 diffs)
-
trunk/languages/mk-simple-backups-de_DE.mo (modified) (previous)
-
trunk/languages/mk-simple-backups-de_DE.po (modified) (10 diffs)
-
trunk/mk-simple-backups.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mk-simple-backups/tags/0.6/assets/css/general.css
r892855 r892993 1 2 3 /* 4 * icons for create backup links 5 */ 6 .actions a { 1 /* icons for creating backups/file */ 2 .actions a, .options strong { 7 3 padding-left: 20px; 8 4 } 9 5 10 .actions .db a{ background: url("../images/database_add.png") left center no-repeat; } 11 .actions .uploads a{ background: url("../images/camera_add.png") left center no-repeat; } 12 .actions .theme a{ background: url("../images/layout_add.png") left center no-repeat; } 6 .options .db strong { background: url("../images/database.png") left center no-repeat; } 7 .options .uploads strong { background: url("../images/pictures.png") left center no-repeat; } 8 .options .theme strong { background: url("../images/layout.png") left center no-repeat; } 9 13 10 .actions .test a{ background: url("../images/page_white_add.png") left center no-repeat; } 14 .actions .allinone a{ background: url("../images/add.png") left center no-repeat; }15 11 16 12 17 /* 18 * icons for file list 19 */ 13 /* remove text selection marker for backup options */ 14 .options label { 15 -webkit-touch-callout: none; 16 -webkit-user-select: none; 17 -khtml-user-select: none; 18 -moz-user-select: none; 19 -ms-user-select: none; 20 user-select: none; 21 } 22 23 .options li, .filelist li { 24 margin-top: 0.4em; 25 line-height: 2em; 26 } 27 28 29 /* icons for file list */ 20 30 .filelist li { 21 31 padding-left: 20px; 22 32 } 23 33 24 .filelist .uploads { background: url("../images/camera.png") left center no-repeat; } 25 .filelist .theme { background: url("../images/layout.png") left center no-repeat; } 26 .filelist .db { background: url("../images/database.png") left center no-repeat; } 27 .filelist .empty { background: url("../images/page_white.png") left center no-repeat; } 28 .filelist .archive { background: url("../images/compress.png") left center no-repeat; } 34 .filelist .default { background: url("../images/page_white.png") left center no-repeat; } 35 .filelist .archive { background: url("../images/page_white_zip.png") left center no-repeat; } 29 36 30 37 31 /* 32 * basic error class 33 */ 38 /* basic error class */ 34 39 .error { color: crimson; } 35 40 36 /* 37 * class for multiline text, to decrease text-line width 38 */ 41 42 /* class for multiline text, to decrease text-line width */ 39 43 .readable { 40 44 max-width: 50em; 41 45 } 46 47 /* small footer */ 48 .small { 49 font-size: 90%; 50 opacity: 0.8; 51 } 52 53 .small a { 54 color: inherit; 55 } -
mk-simple-backups/tags/0.6/class.backuphandler.php
r892855 r892993 17 17 public $backup_dir_weburl = ""; 18 18 public $upload_dir = ""; 19 p rivate$sep = "-";19 public $sep = "-"; 20 20 21 21 function __construct() { … … 148 148 } 149 149 150 foreach($files_to_add as $file) { 151 $zip->addFile($file,$file); 152 } 150 if(count($files_to_add) > 0) { 151 foreach($files_to_add as $file) { 152 $zip->addFile($file,$file); 153 } 154 } else return false; 155 153 156 //debug 154 157 //echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status; -
mk-simple-backups/tags/0.6/languages/mk-simple-backups-de_DE.po
r892855 r892993 2 2 msgstr "" 3 3 "Project-Id-Version: mk-simple-backups\n" 4 "POT-Creation-Date: 2014-04-14 1 3:47+0100\n"5 "PO-Revision-Date: 2014-04-14 1 3:47+0100\n"4 "POT-Creation-Date: 2014-04-14 17:57+0100\n" 5 "PO-Revision-Date: 2014-04-14 17:57+0100\n" 6 6 "Last-Translator: \n" 7 7 "Language-Team: \n" … … 16 16 "X-Poedit-SearchPath-0: ..\n" 17 17 18 #: ../mk-simple-backups.php:7 118 #: ../mk-simple-backups.php:72 19 19 msgid "Backup" 20 20 msgstr "Backup" 21 21 22 #: ../mk-simple-backups.php:8 522 #: ../mk-simple-backups.php:86 23 23 #, php-format 24 24 msgid "Blank File %s created" 25 25 msgstr "Leere Datei %s erstellt" 26 26 27 #: ../mk-simple-backups.php:8 627 #: ../mk-simple-backups.php:87 28 28 msgid "Blank File could not be created" 29 29 msgstr "Leere Datei konnte nicht erstellt werden" 30 30 31 #: ../mk-simple-backups.php:9132 #, php-format33 msgid "DB Backup %s created"34 msgstr "DB Backup %s erstellt"35 36 31 #: ../mk-simple-backups.php:92 37 msgid "DB Backup could not be created"38 msgstr "DB Backup konnte nicht erstellt werden"39 40 #: ../mk-simple-backups.php:9741 #, php-format42 msgid "Theme Backup %s created"43 msgstr "Theme Backup %s erstellt"44 45 #: ../mk-simple-backups.php:9846 msgid "Theme Backup could not be created"47 msgstr "Theme Backup konnte nicht erstellt werden"48 49 #: ../mk-simple-backups.php:10350 #, php-format51 msgid "Upload Backup %s created"52 msgstr "Upload Backup %s erstellt"53 54 #: ../mk-simple-backups.php:10455 msgid "Upload Backup could not be created"56 msgstr "Upload Backup konnte nicht erstellt werden"57 58 #: ../mk-simple-backups.php:10959 msgid "DB Backup failed, complete backup aborted"60 msgstr "DB Backup gescheitert, Komplettes Backup abgebrochen"61 62 #: ../mk-simple-backups.php:11163 msgid "Theme Backup failed, complete backup aborted"64 msgstr "Theme Backup gescheitert, Komplettes Backup abgebrochen"65 66 #: ../mk-simple-backups.php:11367 msgid "Media Backup failed, complete backup aborted"68 msgstr "Media Backup gescheitert, Komplettes Backup abgebrochen"69 70 #: ../mk-simple-backups.php:13271 msgid "Complete Backup successfully created"72 msgstr "Komplettes Backup wurde erstellt"73 74 #: ../mk-simple-backups.php:13475 msgid "Complete Backup could not be created"76 msgstr "Komplettes Backup konnte nicht erstellt werden"77 78 #: ../mk-simple-backups.php:14479 #, php-format80 msgid "Backup %s created"81 msgstr "Backup %s erstellt"82 83 #: ../mk-simple-backups.php:14584 msgid "Media Backup by DB could not be created"85 msgstr "Upload Backup (anhand DB) konnte nicht erstellt werden"86 87 #: ../mk-simple-backups.php:15088 32 msgid "Files in the backup directory were deleted" 89 33 msgstr "Dateien im Backup Verzeichnis gelöscht" 90 34 91 #: ../mk-simple-backups.php: 15135 #: ../mk-simple-backups.php:93 92 36 msgid "" 93 37 "Some files could not be removed by the script. Check File-Permissions or " … … 97 41 "prüfen und allenfalls manuell entfernen." 98 42 99 #: ../mk-simple-backups.php:187 43 #: ../mk-simple-backups.php:109 ../mk-simple-backups.php:241 44 msgid "Database" 45 msgstr "Datenbank" 46 47 #: ../mk-simple-backups.php:113 48 msgid "Theme" 49 msgstr "Theme" 50 51 #: ../mk-simple-backups.php:118 52 msgid "Uploads (file based)" 53 msgstr "Uploads (Verzeichnis-basierend)" 54 55 #: ../mk-simple-backups.php:122 56 msgid "Uploads (db based)" 57 msgstr "Uploads (DB-basierend)" 58 59 #: ../mk-simple-backups.php:131 60 #, php-format 61 msgid "Complete Backup failed upon attempting to backup %s" 62 msgstr "Backup gescheitert bei %s" 63 64 #: ../mk-simple-backups.php:144 65 #, php-format 66 msgid "Backup %s created (containing %s)" 67 msgstr "Backup %s erstellt (enthält %s)" 68 69 #: ../mk-simple-backups.php:148 70 #, php-format 71 msgid "ZIP Archive %s failed, partial Backups exist" 72 msgstr "" 73 "ZIP Archiv %s konnte nicht erstellt werden, einzelne Backups sind erstellt" 74 75 #: ../mk-simple-backups.php:188 100 76 msgid "One file" 101 77 msgstr "Eine Datei" 102 78 103 #: ../mk-simple-backups.php:18 879 #: ../mk-simple-backups.php:189 104 80 #, php-format 105 81 msgid "%s files" 106 82 msgstr "%s Dateien" 107 83 108 #: ../mk-simple-backups.php:2 4184 #: ../mk-simple-backups.php:219 109 85 msgid "Important" 110 86 msgstr "Wichtig" 111 87 112 #: ../mk-simple-backups.php:2 4188 #: ../mk-simple-backups.php:219 113 89 msgid "" 114 90 "Since the sql-dump-file will include usernames for your wp-installation, " … … 118 94 "Download gelöscht werden." 119 95 120 #: ../mk-simple-backups.php:2 4296 #: ../mk-simple-backups.php:220 121 97 msgid "Delete files in Backup directory." 122 98 msgstr "Dateien im Backup Verzeichnis löschen." 123 99 124 #: ../mk-simple-backups.php:2 46100 #: ../mk-simple-backups.php:224 125 101 msgid "Currently no backups stored on the server" 126 102 msgstr "Momentan keine Backups auf dem Server" 127 103 128 #: ../mk-simple-backups.php:2 59104 #: ../mk-simple-backups.php:237 129 105 msgid "Create Backup" 130 106 msgstr "Backup erstellen" 131 107 132 #: ../mk-simple-backups.php:2 61108 #: ../mk-simple-backups.php:240 133 109 msgid "Active Theme" 134 110 msgstr "Aktives Theme" 135 111 136 #: ../mk-simple-backups.php:262 137 msgid "create Theme Backup" 138 msgstr "Theme Backup erstellen" 139 140 #: ../mk-simple-backups.php:263 141 #, php-format 142 msgid "All uploads within %s" 143 msgstr "Alle Uploads in %s" 144 145 #: ../mk-simple-backups.php:264 ../mk-simple-backups.php:266 146 msgid "create Upload Backup" 147 msgstr "Upload Backup erstellen" 148 149 #: ../mk-simple-backups.php:265 150 msgid "Backup Attachments from DB (post_type: attachment)" 151 msgstr "Backup Attachments aus der DB (post_type: attachment)" 152 153 #: ../mk-simple-backups.php:267 112 #: ../mk-simple-backups.php:241 154 113 msgid "SQL-Dump" 155 114 msgstr "SQL-Dump" 156 115 157 #: ../mk-simple-backups.php:267 158 msgid "Database" 159 msgstr "Datenbank" 160 161 #: ../mk-simple-backups.php:268 162 msgid "create DB Backup" 163 msgstr "DB Backup erstellen" 164 165 #: ../mk-simple-backups.php:269 116 #: ../mk-simple-backups.php:244 117 #, fuzzy, php-format 118 msgid "All files within %s" 119 msgstr "Alle Uploads in %s" 120 121 #: ../mk-simple-backups.php:245 122 #, fuzzy 123 msgid "Attachments from DB (post_type: attachment)" 124 msgstr "Backup Attachments aus der DB (post_type: attachment)" 125 126 #: ../mk-simple-backups.php:250 127 #, fuzzy 128 msgid "create Backup" 129 msgstr "Backup erstellen" 130 131 #: ../mk-simple-backups.php:253 132 msgid "Backup directory" 133 msgstr "Backup Verzeichnis" 134 135 #: ../mk-simple-backups.php:256 136 msgid "Info" 137 msgstr "Info" 138 139 #: ../mk-simple-backups.php:258 166 140 msgid "Blank File" 167 141 msgstr "Leere Datei" 168 142 169 #: ../mk-simple-backups.php:2 69143 #: ../mk-simple-backups.php:258 170 144 msgid "test writing permissions" 171 145 msgstr "Schreibberechtigungen prüfen" 172 146 173 #: ../mk-simple-backups.php:2 70147 #: ../mk-simple-backups.php:259 174 148 msgid "create Blank File" 175 149 msgstr "Leere Datei erstellen" 176 150 177 #: ../mk-simple-backups.php:272 178 msgid "All-in-One" 179 msgstr "Alles-in-Einem" 180 181 #: ../mk-simple-backups.php:272 182 msgid "attempt to create all Backup-Types at once" 183 msgstr "Alle Einzelbackups auf einmal erstellen" 184 185 #: ../mk-simple-backups.php:273 186 msgid "script might time out" 187 msgstr "Script kann maximale Ausführzeit überschreiten" 188 189 #: ../mk-simple-backups.php:274 190 msgid "create DB, Media & Theme Backup" 191 msgstr "DB, Upload und Theme Backup erstellen" 192 193 #: ../mk-simple-backups.php:278 194 msgid "Backup directory" 195 msgstr "Backup Verzeichnis" 196 197 #: ../mk-simple-backups.php:281 151 #: ../mk-simple-backups.php:261 198 152 msgid "What's going on?" 199 153 msgstr "Was passiert im Hintergrund?" 200 154 201 #: ../mk-simple-backups.php:2 82155 #: ../mk-simple-backups.php:262 202 156 msgid "Theme Backup" 203 157 msgstr "Theme Backup" 204 158 205 #: ../mk-simple-backups.php:2 82159 #: ../mk-simple-backups.php:262 206 160 msgid "" 207 161 "The Theme Backup will create a ZIP Archive containing all files within the " … … 215 169 "Themes zum ZIP hinzugefügt." 216 170 217 #: ../mk-simple-backups.php:2 84171 #: ../mk-simple-backups.php:264 218 172 msgid "DB Backup" 219 173 msgstr "Datenbank Backup" 220 174 221 #: ../mk-simple-backups.php:2 84175 #: ../mk-simple-backups.php:264 222 176 msgid "" 223 177 "The DB Backup creates an SQL Dump that can be used to restore your Database " … … 237 191 "Zusatztabellen im Backup eingeschlossen." 238 192 239 #: ../mk-simple-backups.php:2 86193 #: ../mk-simple-backups.php:266 240 194 msgid "Upload Backups" 241 195 msgstr "Upload Backup" 242 196 243 #: ../mk-simple-backups.php:2 86197 #: ../mk-simple-backups.php:266 244 198 msgid "" 245 199 "The file-based Upload Backup will scan the whole Upload Directory (including " … … 267 221 "so speichern." 268 222 269 #: ../mk-simple-backups.php:288 270 msgid "Complete Backup" 271 msgstr "Komplettes Backup" 272 273 #: ../mk-simple-backups.php:288 274 msgid "" 275 "The complete Backup will automatically perform all single Backup Tasks and " 276 "create a ZIP Archive containing the three resulting files. This can take " 277 "some time, if performed within a big Wordpress installation. The complete " 278 "includes the DB approach for Uploads." 279 msgstr "" 280 "Das komplette Backup erstellt automatisch alle einzelnen Backups und kreiert " 281 "daraus ein ZIP Archiv mit den drei resultierenden Dateien. In einer grossen " 282 "Wordpress Installation kann dies einige Zeit in Anspruch nehmen. Das " 283 "komplette Backup verwendet den Datenbank-basierten Upload Backup." 284 285 #: ../mk-simple-backups.php:290 223 #: ../mk-simple-backups.php:268 286 224 msgid "How long does it take?" 287 225 msgstr "Wie lange dauert es?" 288 226 289 #: ../mk-simple-backups.php:291 227 #: ../mk-simple-backups.php:269 228 #, fuzzy 290 229 msgid "" 291 230 "Depending on the amount of files and data, Backups can widely vary in size " … … 294 233 "is being created, don't close your tab/browser and don't navigate to another " 295 234 "page as that would cancel unfinished backups and may leave temporary files " 296 "in the backup directory." 235 "in the backup directory. If a complete Backup fails, you may want to try " 236 "creating partial backups." 297 237 msgstr "" 298 238 "Je nach der Anzahl an Dateien und Informationen, kann die Grösse und " … … 304 244 "zurückbleiben." 305 245 306 #: ../mk-simple-backups.php:2 93246 #: ../mk-simple-backups.php:271 307 247 msgid "My Backup has failed, why?" 308 248 msgstr "Das Backup ist gescheitert, wieso?" 309 249 310 #: ../mk-simple-backups.php:2 94250 #: ../mk-simple-backups.php:272 311 251 msgid "" 312 252 "Usually file-permissions are at fault if the plugins fails to create " … … 322 262 "Verzeichnis von Wordpress. " 323 263 324 #: ../mk-simple-backups.php:2 99264 #: ../mk-simple-backups.php:281 325 265 #, php-format 326 266 msgid "Backup directory could not be created: %s" 327 267 msgstr "Backup Verzeichnis konnte nicht erstellt werden: %s" 268 269 #~ msgid "DB Backup %s created" 270 #~ msgstr "DB Backup %s erstellt" 271 272 #~ msgid "DB Backup could not be created" 273 #~ msgstr "DB Backup konnte nicht erstellt werden" 274 275 #~ msgid "Theme Backup %s created" 276 #~ msgstr "Theme Backup %s erstellt" 277 278 #~ msgid "Theme Backup could not be created" 279 #~ msgstr "Theme Backup konnte nicht erstellt werden" 280 281 #~ msgid "Upload Backup %s created" 282 #~ msgstr "Upload Backup %s erstellt" 283 284 #~ msgid "Upload Backup could not be created" 285 #~ msgstr "Upload Backup konnte nicht erstellt werden" 286 287 #~ msgid "DB Backup failed, complete backup aborted" 288 #~ msgstr "DB Backup gescheitert, Komplettes Backup abgebrochen" 289 290 #~ msgid "Media Backup failed, complete backup aborted" 291 #~ msgstr "Media Backup gescheitert, Komplettes Backup abgebrochen" 292 293 #~ msgid "Complete Backup successfully created" 294 #~ msgstr "Komplettes Backup wurde erstellt" 295 296 #~ msgid "Complete Backup could not be created" 297 #~ msgstr "Komplettes Backup konnte nicht erstellt werden" 298 299 #~ msgid "Media Backup by DB could not be created" 300 #~ msgstr "Upload Backup (anhand DB) konnte nicht erstellt werden" 301 302 #~ msgid "create Theme Backup" 303 #~ msgstr "Theme Backup erstellen" 304 305 #~ msgid "create Upload Backup" 306 #~ msgstr "Upload Backup erstellen" 307 308 #~ msgid "create DB Backup" 309 #~ msgstr "DB Backup erstellen" 310 311 #~ msgid "All-in-One" 312 #~ msgstr "Alles-in-Einem" 313 314 #~ msgid "attempt to create all Backup-Types at once" 315 #~ msgstr "Alle Einzelbackups auf einmal erstellen" 316 317 #~ msgid "script might time out" 318 #~ msgstr "Script kann maximale Ausführzeit überschreiten" 319 320 #~ msgid "create DB, Media & Theme Backup" 321 #~ msgstr "DB, Upload und Theme Backup erstellen" 322 323 #~ msgid "Complete Backup" 324 #~ msgstr "Komplettes Backup" 325 326 #~ msgid "" 327 #~ "The complete Backup will automatically perform all single Backup Tasks " 328 #~ "and create a ZIP Archive containing the three resulting files. This can " 329 #~ "take some time, if performed within a big Wordpress installation. The " 330 #~ "complete includes the DB approach for Uploads." 331 #~ msgstr "" 332 #~ "Das komplette Backup erstellt automatisch alle einzelnen Backups und " 333 #~ "kreiert daraus ein ZIP Archiv mit den drei resultierenden Dateien. In " 334 #~ "einer grossen Wordpress Installation kann dies einige Zeit in Anspruch " 335 #~ "nehmen. Das komplette Backup verwendet den Datenbank-basierten Upload " 336 #~ "Backup." -
mk-simple-backups/tags/0.6/mk-simple-backups.php
r892855 r892993 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. 57 * Version: 0.6 8 8 * Author: Michael Kühni 9 9 * Author URI: http://michaelkuehni.ch … … 64 64 65 65 $msg = array(); 66 $this_plugin_data = get_plugin_data( __FILE__); 66 67 67 68 … … 87 88 break; 88 89 89 case "createdbbkp":90 $s = $bkp->createDBBackup();91 if($s != false) $msg[] = array("txt"=>sprintf(__( 'DB Backup %s created', 'mk-simple-backups' ), $s ));92 else $msg[] = array("txt"=>__( 'DB Backup could not be created', 'mk-simple-backups' ), "error"=>true);93 break;94 95 case "createthemebkp":96 $s = $bkp->createThemeBackup();97 if($s != false) $msg[] = array("txt"=>sprintf(__( 'Theme Backup %s created', 'mk-simple-backups' ), $s ));98 else $msg[] = array("txt"=>__( 'Theme Backup could not be created', 'mk-simple-backups' ), "error"=>true);99 break;100 101 case "createuploadbkp":102 $s = $bkp->createUploadBackup();103 if($s != false) $msg[] = array("txt"=>sprintf(__( 'Upload Backup %s created', 'mk-simple-backups' ), $s ));104 else $msg[] = array("txt"=>__( 'Upload Backup could not be created', 'mk-simple-backups' ), "error"=>true);105 break;106 107 case "createCompleteBackup":108 $s1 = $bkp->createDBBackup();109 if($s1 == false) $msg = array( "txt"=>__("DB Backup failed, complete backup aborted", "mk-simple-backups"), "error"=>true );110 $s2 = $bkp->createThemeBackup();111 if($s2 == false) $msg = array( "txt"=>__("Theme Backup failed, complete backup aborted", "mk-simple-backups"), "error"=>true );112 $s3 = $bkp->createUploadBackupByDB();113 if($s3 == false) $msg = array( "txt"=>__("Media Backup failed, complete backup aborted", "mk-simple-backups"), "error"=>true );114 115 // currently no zip will be done116 if($s1 != false && $s2 != false && $s3 != false) {117 118 // create array with backups119 $bkp_files = array(120 $s1=>$bkp->backup_dir . "/" . $s1,121 $s2=>$bkp->backup_dir . "/" . $s2,122 $s3=>$bkp->backup_dir . "/" . $s3 );123 124 // create zip125 $zip_path = $bkp->backup_dir . "/" . $bkp->getBackupName("complete", ".zip" );126 $s = $bkp->createZip( $zip_path , $bkp_files );127 128 // check if zip was created successfully129 if($s) {130 $bkp->removeFiles( array($s1, $s2, $s3) );131 $bkp->backups_exist = true;132 $msg[] = array( "txt"=>__("Complete Backup successfully created", "mk-simple-backups"));133 } else {134 $msg[] = array( "txt"=>__("Complete Backup could not be created", "mk-simple-backups"));135 }136 137 138 139 }140 break;141 142 case "createuploadbkpbydb":143 $s = $bkp->createUploadBackupByDB();144 if($s != false) $msg[] = array("txt"=> sprintf(__("Backup %s created", "mk-simple-backups"), $s));145 else $msg[] = array("txt"=>__("Media Backup by DB could not be created", "mk-simple-backups"), "error"=>true);146 break;147 148 90 case "flush"; 149 91 $s = $bkp->flushBackupDir(); … … 151 93 else $msg[] = array("txt"=>__("Some files could not be removed by the script. Check File-Permissions or delete the files manually.", "mk-simple-backups"), "error" => true); 152 94 break; 153 95 96 case "createBackup": 97 98 $bkp_options = $_POST["options"]; 99 $bkp_single_files_with_path = array(); 100 $bkp_single_files = array(); 101 102 103 if(count($bkp_options) > 0) { 104 foreach($bkp_options AS $o) { 105 106 switch($o) { 107 case "db": 108 $s = $bkp->createDBBackup(); 109 $desc = __("Database", "mk-simple-backups"); 110 break; 111 case "theme": 112 $s = $bkp->createThemeBackup(); 113 $desc = __("Theme", "mk-simple-backups"); 114 break; 115 case "uploads": 116 if($_POST["upload_options"] == "file") { 117 $s = $bkp->createUploadBackupByDB(); 118 $desc = __("Uploads (file based)", "mk-simple-backups"); 119 } 120 else { 121 $s = $bkp->createUploadBackup(); 122 $desc = __("Uploads (db based)", "mk-simple-backups"); 123 } 124 break; 125 } 126 127 if($s != false) { 128 $bkp_single_files[] = $s; 129 $bkp_single_files_with_path[] = $bkp->backup_dir . "/" . $s; 130 } else { 131 $msg[] = array( "txt"=>sprintf(__("Complete Backup failed upon attempting to backup %s", "mk-simple-backups"), $desc), "error"=>true ); 132 break; 133 } 134 } // end foreach 135 136 // create zip 137 $bkp_filename = $bkp->getBackupName( "bkp_" . sanitize_title(get_bloginfo("name"), "default"), "_" . implode($bkp->sep, $bkp_options) . ".zip"); 138 $s = $bkp->createZip( $bkp->backup_dir . "/" . $bkp_filename, $bkp_single_files_with_path); 139 140 if($s != false) { 141 142 $bkp->removeFiles($bkp_single_files); 143 $bkp->backups_exist = true; 144 $msg[] = array( "txt"=>sprintf(__("Backup %s created (containing %s)", "mk-simple-backups"), $bkp_filename, implode(", ", $bkp_options)) ); 145 146 } else { 147 148 $msg[] = array( "txt"=>sprintf(__("ZIP Archive %s failed, partial Backups exist", "mk-simple-backups"), $bkp_filename), "error"=>true ); 149 150 } 151 152 } // end if check for anything to backup 153 154 155 break; 154 156 } 155 156 157 157 158 // echo msg's … … 197 198 198 199 // determine type of file by the first 2 characters 199 $begin = substr($name, 0, 2); 200 201 switch($begin) 202 { 203 default: 204 $fileclass = ""; 205 break; 206 case "up": 207 $fileclass = "uploads"; 208 break; 209 210 case "db": 211 $fileclass = "db"; 212 break; 213 214 case "co": 215 $fileclass = "archive"; 216 break; 217 218 case "te": 219 $fileclass = "empty"; 220 break; 221 222 case "th": 223 $fileclass="theme"; 224 break; 225 } 200 $suffix = substr($name, strlen($name)-3); 201 202 if($suffix == "zip") $fileclass = "archive"; 203 else $fileclass = "default"; 226 204 227 205 // get filesize … … 258 236 ?> 259 237 <h3><? _e('Create Backup', 'mk-simple-backups'); ?></h3> 260 <ul class="actions"> 261 <li class="theme"><strong><?=wp_get_theme();?></strong>, <? _e('Active Theme', 'mk-simple-backups'); ?><br /> 262 <a href="<? bloginfo("siteurl"); ?>/wp-admin/tools.php?page=mk-simple-backups&action=createthemebkp"><? _e('create Theme Backup', 'mk-simple-backups'); ?></a></li> 263 <li class="uploads"><strong>/uploads</strong>, <? printf( __('All uploads within %s', 'mk-simple-backups'), $bkp->upload_dir["baseurl"]); ?><br /> 264 <a href="<? bloginfo("siteurl"); ?>/wp-admin/tools.php?page=mk-simple-backups&action=createuploadbkp"><? _e('create Upload Backup', 'mk-simple-backups'); ?></a></li> 265 <li class="uploads"><strong>/uploads</strong>, <? _e('Backup Attachments from DB (post_type: attachment)', 'mk-simple-backups'); ?><br /> 266 <a href="<? bloginfo("siteurl"); ?>/wp-admin/tools.php?page=mk-simple-backups&action=createuploadbkpbydb"><? _e('create Upload Backup', 'mk-simple-backups'); ?></a></li> 267 <li class="db"><strong><? _e('SQL-Dump', 'mk-simple-backups'); ?></strong>, <? _e('Database', 'mk-simple-backups'); ?><br /> 268 <a href="<? bloginfo("siteurl"); ?>/wp-admin/tools.php?page=mk-simple-backups&action=createdbbkp"><? _e('create DB Backup', 'mk-simple-backups'); ?></a></li> 269 <li class="test"><strong><? _e('Blank File', 'mk-simple-backups'); ?></strong>, <? _e('test writing permissions', 'mk-simple-backups'); ?><br /> 270 <a href="<? bloginfo("siteurl"); ?>/wp-admin/tools.php?page=mk-simple-backups&action=createtestfile"><? _e('create Blank File', 'mk-simple-backups'); ?></a></li> 271 <li class="allinone"> 272 <strong><? _e("All-in-One", "mk-simple-backups") ?></strong>, <? _e("attempt to create all Backup-Types at once", "mk-simple-backups") ?><br /> 273 <em><? _e("script might time out", "mk-simple-backups") ?></em><br /> 274 <a href="<? bloginfo("siteurl"); ?>/wp-admin/tools.php?page=mk-simple-backups&action=createCompleteBackup"><? _e("create DB, Media & Theme Backup", "mk-simple-backups")?></a> 275 </li> 276 </ul> 238 <form action="<? bloginfo("siteurl"); ?>/wp-admin/tools.php?page=mk-simple-backups&action=createBackup" method="post"> 239 <ul class="options"> 240 <li class="theme"><label><input type="checkbox" name="options[]" value="theme" checked="checked"><strong><?=wp_get_theme();?></strong>, <? _e('Active Theme', 'mk-simple-backups'); ?></label></li> 241 <li class="db"><label><input type="checkbox" name="options[]" value="db" checked="checked"><strong><? _e('SQL-Dump', 'mk-simple-backups'); ?></strong>, <? _e('Database', 'mk-simple-backups'); ?></label></li> 242 <li class="uploads"><label><input type="checkbox" name="options[]" value="uploads" checked="checked"><strong>/uploads</strong>, Uploads</label> 243 <select name="upload_options"> 244 <option value="file"><? printf( __('All files within %s', 'mk-simple-backups'), $bkp->upload_dir["baseurl"]); ?></option> 245 <option value="db" selected="selected"><? _e('Attachments from DB (post_type: attachment)', 'mk-simple-backups'); ?></option> 246 </select></li> 247 248 </ul> 249 250 <p><input type="submit" value="<? _e("create Backup", "mk-simple-backups");?>" class="button action"></p> 251 </form> 277 252 <p><hr /></p> 278 253 <p><? _e('Backup directory', 'mk-simple-backups'); ?>: <br /> 279 254 <em><?=$bkp->backup_dir?></em></p> 280 255 <p><hr /></p> 256 <h3><? _e("Info", "mk-simple-backups") ?></h3> 257 <ul class="actions"> 258 <li class="test"><strong><? _e('Blank File', 'mk-simple-backups'); ?></strong>, <? _e('test writing permissions', 'mk-simple-backups'); ?><br /> 259 <a href="<? bloginfo("siteurl"); ?>/wp-admin/tools.php?page=mk-simple-backups&action=createtestfile"><? _e('create Blank File', 'mk-simple-backups'); ?></a></li> 260 </ul> 281 261 <h4><? _e("What's going on?", "mk-simple-backups") ?></h4> 282 262 <p class="readable"><strong><? _e("Theme Backup", "mk-simple-backups");?></strong>: <? _e("The Theme Backup will create a ZIP Archive containing all files within the directory of your current active theme. If the active theme is a child-theme, the backup will detect this and include all files from the parent theme.", "mk-simple-backups")?></p> … … 286 266 <p class="readable"><strong><? _e("Upload Backups", "mk-simple-backups");?></strong>: <? _e("The file-based Upload Backup will scan the whole Upload Directory (including subfolders) and create a ZIP Archive containing all files found. If there are many files in the upload directory, the script might time out. The DB based Upload Backup will fetch Attachments from the DB and create a ZIP Archive with found files. In the DB approach, the thumbnails and scaled versions are not included, since they can be regenerated afterwards easily. By ommitting those files, the DB approach saves space and script execution time. The DB based approach can be incomplete when plugins create files in the upload directory that arent included in the DB as attachments. There are plugins that do this.", "mk-simple-backups")?></p> 287 267 288 <p class="readable"><strong><? _e("Complete Backup", "mk-simple-backups");?></strong>: <? _e("The complete Backup will automatically perform all single Backup Tasks and create a ZIP Archive containing the three resulting files. This can take some time, if performed within a big Wordpress installation. The complete includes the DB approach for Uploads.", "mk-simple-backups")?></p>289 290 268 <h4><? _e("How long does it take?", "mk-simple-backups") ?></h4> 291 <p class="readable"><? _e("Depending on the amount of files and data, Backups can widely vary in size and time taken to create. The script attempts to increase maximum execution time for php scripts to allow larger Backups to be created. While a backup is being created, don't close your tab/browser and don't navigate to another page as that would cancel unfinished backups and may leave temporary files in the backup directory. ", "mk-simple-backups")?></p>269 <p class="readable"><? _e("Depending on the amount of files and data, Backups can widely vary in size and time taken to create. The script attempts to increase maximum execution time for php scripts to allow larger Backups to be created. While a backup is being created, don't close your tab/browser and don't navigate to another page as that would cancel unfinished backups and may leave temporary files in the backup directory. If a complete Backup fails, you may want to try creating partial backups.", "mk-simple-backups")?></p> 292 270 293 271 <h4><? _e("My Backup has failed, why?", "mk-simple-backups") ?></h4> 294 272 <p class="readable"><? _e("Usually file-permissions are at fault if the plugins fails to create Backups. Use your FTP-Client to make sure writing permission on the Backup Directory (refer to the path displayed above) are set to writeable. If there's other problems, use the Plugin Page in the Plugin Repository to request support or patching.")?></p> 273 274 <p><hr /></p> 275 <p class="small">Plugin <a href="<?=$this_plugin_data["pluginURI"]?>" target="_blank"><?=$this_plugin_data["Name"] ?></a> v<?=$this_plugin_data["Version"]?></p> 276 295 277 <? 296 278 -
mk-simple-backups/tags/0.6/readme.txt
r892855 r892993 3 3 Tags: backup, db, uploads 4 4 Requires at least: 3.8 5 Stable tag: 0. 55 Stable tag: 0.6 6 6 Tested up to: 3.9RC1 7 7 License: GPLv2 or later … … 45 45 46 46 == Changelog == 47 48 = 0.6 = 49 * Simplified UI by shifting from single-action links to option-based form 50 * Backup Name uses Site Name 51 * Backup Name reflects contents 52 * Moved blank file link to info section 53 * Added plugin repository link to the footer 54 * Updated Language Files (german, english) 55 * Simplified Icons 56 * Updated Screenshot 57 * Updated Read-Me 47 58 48 59 = 0.5 = … … 94 105 == Upgrade Notice == 95 106 107 = 0.6 = 108 Switching to form based Backup Creation 109 96 110 = 0.5 = 97 111 Added features, check the changelog for detailed information -
mk-simple-backups/trunk/assets/css/general.css
r892855 r892993 1 2 3 /* 4 * icons for create backup links 5 */ 6 .actions a { 1 /* icons for creating backups/file */ 2 .actions a, .options strong { 7 3 padding-left: 20px; 8 4 } 9 5 10 .actions .db a{ background: url("../images/database_add.png") left center no-repeat; } 11 .actions .uploads a{ background: url("../images/camera_add.png") left center no-repeat; } 12 .actions .theme a{ background: url("../images/layout_add.png") left center no-repeat; } 6 .options .db strong { background: url("../images/database.png") left center no-repeat; } 7 .options .uploads strong { background: url("../images/pictures.png") left center no-repeat; } 8 .options .theme strong { background: url("../images/layout.png") left center no-repeat; } 9 13 10 .actions .test a{ background: url("../images/page_white_add.png") left center no-repeat; } 14 .actions .allinone a{ background: url("../images/add.png") left center no-repeat; }15 11 16 12 17 /* 18 * icons for file list 19 */ 13 /* remove text selection marker for backup options */ 14 .options label { 15 -webkit-touch-callout: none; 16 -webkit-user-select: none; 17 -khtml-user-select: none; 18 -moz-user-select: none; 19 -ms-user-select: none; 20 user-select: none; 21 } 22 23 .options li, .filelist li { 24 margin-top: 0.4em; 25 line-height: 2em; 26 } 27 28 29 /* icons for file list */ 20 30 .filelist li { 21 31 padding-left: 20px; 22 32 } 23 33 24 .filelist .uploads { background: url("../images/camera.png") left center no-repeat; } 25 .filelist .theme { background: url("../images/layout.png") left center no-repeat; } 26 .filelist .db { background: url("../images/database.png") left center no-repeat; } 27 .filelist .empty { background: url("../images/page_white.png") left center no-repeat; } 28 .filelist .archive { background: url("../images/compress.png") left center no-repeat; } 34 .filelist .default { background: url("../images/page_white.png") left center no-repeat; } 35 .filelist .archive { background: url("../images/page_white_zip.png") left center no-repeat; } 29 36 30 37 31 /* 32 * basic error class 33 */ 38 /* basic error class */ 34 39 .error { color: crimson; } 35 40 36 /* 37 * class for multiline text, to decrease text-line width 38 */ 41 42 /* class for multiline text, to decrease text-line width */ 39 43 .readable { 40 44 max-width: 50em; 41 45 } 46 47 /* small footer */ 48 .small { 49 font-size: 90%; 50 opacity: 0.8; 51 } 52 53 .small a { 54 color: inherit; 55 } -
mk-simple-backups/trunk/class.backuphandler.php
r892855 r892993 17 17 public $backup_dir_weburl = ""; 18 18 public $upload_dir = ""; 19 p rivate$sep = "-";19 public $sep = "-"; 20 20 21 21 function __construct() { … … 148 148 } 149 149 150 foreach($files_to_add as $file) { 151 $zip->addFile($file,$file); 152 } 150 if(count($files_to_add) > 0) { 151 foreach($files_to_add as $file) { 152 $zip->addFile($file,$file); 153 } 154 } else return false; 155 153 156 //debug 154 157 //echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status; -
mk-simple-backups/trunk/languages/mk-simple-backups-de_DE.po
r892855 r892993 2 2 msgstr "" 3 3 "Project-Id-Version: mk-simple-backups\n" 4 "POT-Creation-Date: 2014-04-14 1 3:47+0100\n"5 "PO-Revision-Date: 2014-04-14 1 3:47+0100\n"4 "POT-Creation-Date: 2014-04-14 17:57+0100\n" 5 "PO-Revision-Date: 2014-04-14 17:57+0100\n" 6 6 "Last-Translator: \n" 7 7 "Language-Team: \n" … … 16 16 "X-Poedit-SearchPath-0: ..\n" 17 17 18 #: ../mk-simple-backups.php:7 118 #: ../mk-simple-backups.php:72 19 19 msgid "Backup" 20 20 msgstr "Backup" 21 21 22 #: ../mk-simple-backups.php:8 522 #: ../mk-simple-backups.php:86 23 23 #, php-format 24 24 msgid "Blank File %s created" 25 25 msgstr "Leere Datei %s erstellt" 26 26 27 #: ../mk-simple-backups.php:8 627 #: ../mk-simple-backups.php:87 28 28 msgid "Blank File could not be created" 29 29 msgstr "Leere Datei konnte nicht erstellt werden" 30 30 31 #: ../mk-simple-backups.php:9132 #, php-format33 msgid "DB Backup %s created"34 msgstr "DB Backup %s erstellt"35 36 31 #: ../mk-simple-backups.php:92 37 msgid "DB Backup could not be created"38 msgstr "DB Backup konnte nicht erstellt werden"39 40 #: ../mk-simple-backups.php:9741 #, php-format42 msgid "Theme Backup %s created"43 msgstr "Theme Backup %s erstellt"44 45 #: ../mk-simple-backups.php:9846 msgid "Theme Backup could not be created"47 msgstr "Theme Backup konnte nicht erstellt werden"48 49 #: ../mk-simple-backups.php:10350 #, php-format51 msgid "Upload Backup %s created"52 msgstr "Upload Backup %s erstellt"53 54 #: ../mk-simple-backups.php:10455 msgid "Upload Backup could not be created"56 msgstr "Upload Backup konnte nicht erstellt werden"57 58 #: ../mk-simple-backups.php:10959 msgid "DB Backup failed, complete backup aborted"60 msgstr "DB Backup gescheitert, Komplettes Backup abgebrochen"61 62 #: ../mk-simple-backups.php:11163 msgid "Theme Backup failed, complete backup aborted"64 msgstr "Theme Backup gescheitert, Komplettes Backup abgebrochen"65 66 #: ../mk-simple-backups.php:11367 msgid "Media Backup failed, complete backup aborted"68 msgstr "Media Backup gescheitert, Komplettes Backup abgebrochen"69 70 #: ../mk-simple-backups.php:13271 msgid "Complete Backup successfully created"72 msgstr "Komplettes Backup wurde erstellt"73 74 #: ../mk-simple-backups.php:13475 msgid "Complete Backup could not be created"76 msgstr "Komplettes Backup konnte nicht erstellt werden"77 78 #: ../mk-simple-backups.php:14479 #, php-format80 msgid "Backup %s created"81 msgstr "Backup %s erstellt"82 83 #: ../mk-simple-backups.php:14584 msgid "Media Backup by DB could not be created"85 msgstr "Upload Backup (anhand DB) konnte nicht erstellt werden"86 87 #: ../mk-simple-backups.php:15088 32 msgid "Files in the backup directory were deleted" 89 33 msgstr "Dateien im Backup Verzeichnis gelöscht" 90 34 91 #: ../mk-simple-backups.php: 15135 #: ../mk-simple-backups.php:93 92 36 msgid "" 93 37 "Some files could not be removed by the script. Check File-Permissions or " … … 97 41 "prüfen und allenfalls manuell entfernen." 98 42 99 #: ../mk-simple-backups.php:187 43 #: ../mk-simple-backups.php:109 ../mk-simple-backups.php:241 44 msgid "Database" 45 msgstr "Datenbank" 46 47 #: ../mk-simple-backups.php:113 48 msgid "Theme" 49 msgstr "Theme" 50 51 #: ../mk-simple-backups.php:118 52 msgid "Uploads (file based)" 53 msgstr "Uploads (Verzeichnis-basierend)" 54 55 #: ../mk-simple-backups.php:122 56 msgid "Uploads (db based)" 57 msgstr "Uploads (DB-basierend)" 58 59 #: ../mk-simple-backups.php:131 60 #, php-format 61 msgid "Complete Backup failed upon attempting to backup %s" 62 msgstr "Backup gescheitert bei %s" 63 64 #: ../mk-simple-backups.php:144 65 #, php-format 66 msgid "Backup %s created (containing %s)" 67 msgstr "Backup %s erstellt (enthält %s)" 68 69 #: ../mk-simple-backups.php:148 70 #, php-format 71 msgid "ZIP Archive %s failed, partial Backups exist" 72 msgstr "" 73 "ZIP Archiv %s konnte nicht erstellt werden, einzelne Backups sind erstellt" 74 75 #: ../mk-simple-backups.php:188 100 76 msgid "One file" 101 77 msgstr "Eine Datei" 102 78 103 #: ../mk-simple-backups.php:18 879 #: ../mk-simple-backups.php:189 104 80 #, php-format 105 81 msgid "%s files" 106 82 msgstr "%s Dateien" 107 83 108 #: ../mk-simple-backups.php:2 4184 #: ../mk-simple-backups.php:219 109 85 msgid "Important" 110 86 msgstr "Wichtig" 111 87 112 #: ../mk-simple-backups.php:2 4188 #: ../mk-simple-backups.php:219 113 89 msgid "" 114 90 "Since the sql-dump-file will include usernames for your wp-installation, " … … 118 94 "Download gelöscht werden." 119 95 120 #: ../mk-simple-backups.php:2 4296 #: ../mk-simple-backups.php:220 121 97 msgid "Delete files in Backup directory." 122 98 msgstr "Dateien im Backup Verzeichnis löschen." 123 99 124 #: ../mk-simple-backups.php:2 46100 #: ../mk-simple-backups.php:224 125 101 msgid "Currently no backups stored on the server" 126 102 msgstr "Momentan keine Backups auf dem Server" 127 103 128 #: ../mk-simple-backups.php:2 59104 #: ../mk-simple-backups.php:237 129 105 msgid "Create Backup" 130 106 msgstr "Backup erstellen" 131 107 132 #: ../mk-simple-backups.php:2 61108 #: ../mk-simple-backups.php:240 133 109 msgid "Active Theme" 134 110 msgstr "Aktives Theme" 135 111 136 #: ../mk-simple-backups.php:262 137 msgid "create Theme Backup" 138 msgstr "Theme Backup erstellen" 139 140 #: ../mk-simple-backups.php:263 141 #, php-format 142 msgid "All uploads within %s" 143 msgstr "Alle Uploads in %s" 144 145 #: ../mk-simple-backups.php:264 ../mk-simple-backups.php:266 146 msgid "create Upload Backup" 147 msgstr "Upload Backup erstellen" 148 149 #: ../mk-simple-backups.php:265 150 msgid "Backup Attachments from DB (post_type: attachment)" 151 msgstr "Backup Attachments aus der DB (post_type: attachment)" 152 153 #: ../mk-simple-backups.php:267 112 #: ../mk-simple-backups.php:241 154 113 msgid "SQL-Dump" 155 114 msgstr "SQL-Dump" 156 115 157 #: ../mk-simple-backups.php:267 158 msgid "Database" 159 msgstr "Datenbank" 160 161 #: ../mk-simple-backups.php:268 162 msgid "create DB Backup" 163 msgstr "DB Backup erstellen" 164 165 #: ../mk-simple-backups.php:269 116 #: ../mk-simple-backups.php:244 117 #, fuzzy, php-format 118 msgid "All files within %s" 119 msgstr "Alle Uploads in %s" 120 121 #: ../mk-simple-backups.php:245 122 #, fuzzy 123 msgid "Attachments from DB (post_type: attachment)" 124 msgstr "Backup Attachments aus der DB (post_type: attachment)" 125 126 #: ../mk-simple-backups.php:250 127 #, fuzzy 128 msgid "create Backup" 129 msgstr "Backup erstellen" 130 131 #: ../mk-simple-backups.php:253 132 msgid "Backup directory" 133 msgstr "Backup Verzeichnis" 134 135 #: ../mk-simple-backups.php:256 136 msgid "Info" 137 msgstr "Info" 138 139 #: ../mk-simple-backups.php:258 166 140 msgid "Blank File" 167 141 msgstr "Leere Datei" 168 142 169 #: ../mk-simple-backups.php:2 69143 #: ../mk-simple-backups.php:258 170 144 msgid "test writing permissions" 171 145 msgstr "Schreibberechtigungen prüfen" 172 146 173 #: ../mk-simple-backups.php:2 70147 #: ../mk-simple-backups.php:259 174 148 msgid "create Blank File" 175 149 msgstr "Leere Datei erstellen" 176 150 177 #: ../mk-simple-backups.php:272 178 msgid "All-in-One" 179 msgstr "Alles-in-Einem" 180 181 #: ../mk-simple-backups.php:272 182 msgid "attempt to create all Backup-Types at once" 183 msgstr "Alle Einzelbackups auf einmal erstellen" 184 185 #: ../mk-simple-backups.php:273 186 msgid "script might time out" 187 msgstr "Script kann maximale Ausführzeit überschreiten" 188 189 #: ../mk-simple-backups.php:274 190 msgid "create DB, Media & Theme Backup" 191 msgstr "DB, Upload und Theme Backup erstellen" 192 193 #: ../mk-simple-backups.php:278 194 msgid "Backup directory" 195 msgstr "Backup Verzeichnis" 196 197 #: ../mk-simple-backups.php:281 151 #: ../mk-simple-backups.php:261 198 152 msgid "What's going on?" 199 153 msgstr "Was passiert im Hintergrund?" 200 154 201 #: ../mk-simple-backups.php:2 82155 #: ../mk-simple-backups.php:262 202 156 msgid "Theme Backup" 203 157 msgstr "Theme Backup" 204 158 205 #: ../mk-simple-backups.php:2 82159 #: ../mk-simple-backups.php:262 206 160 msgid "" 207 161 "The Theme Backup will create a ZIP Archive containing all files within the " … … 215 169 "Themes zum ZIP hinzugefügt." 216 170 217 #: ../mk-simple-backups.php:2 84171 #: ../mk-simple-backups.php:264 218 172 msgid "DB Backup" 219 173 msgstr "Datenbank Backup" 220 174 221 #: ../mk-simple-backups.php:2 84175 #: ../mk-simple-backups.php:264 222 176 msgid "" 223 177 "The DB Backup creates an SQL Dump that can be used to restore your Database " … … 237 191 "Zusatztabellen im Backup eingeschlossen." 238 192 239 #: ../mk-simple-backups.php:2 86193 #: ../mk-simple-backups.php:266 240 194 msgid "Upload Backups" 241 195 msgstr "Upload Backup" 242 196 243 #: ../mk-simple-backups.php:2 86197 #: ../mk-simple-backups.php:266 244 198 msgid "" 245 199 "The file-based Upload Backup will scan the whole Upload Directory (including " … … 267 221 "so speichern." 268 222 269 #: ../mk-simple-backups.php:288 270 msgid "Complete Backup" 271 msgstr "Komplettes Backup" 272 273 #: ../mk-simple-backups.php:288 274 msgid "" 275 "The complete Backup will automatically perform all single Backup Tasks and " 276 "create a ZIP Archive containing the three resulting files. This can take " 277 "some time, if performed within a big Wordpress installation. The complete " 278 "includes the DB approach for Uploads." 279 msgstr "" 280 "Das komplette Backup erstellt automatisch alle einzelnen Backups und kreiert " 281 "daraus ein ZIP Archiv mit den drei resultierenden Dateien. In einer grossen " 282 "Wordpress Installation kann dies einige Zeit in Anspruch nehmen. Das " 283 "komplette Backup verwendet den Datenbank-basierten Upload Backup." 284 285 #: ../mk-simple-backups.php:290 223 #: ../mk-simple-backups.php:268 286 224 msgid "How long does it take?" 287 225 msgstr "Wie lange dauert es?" 288 226 289 #: ../mk-simple-backups.php:291 227 #: ../mk-simple-backups.php:269 228 #, fuzzy 290 229 msgid "" 291 230 "Depending on the amount of files and data, Backups can widely vary in size " … … 294 233 "is being created, don't close your tab/browser and don't navigate to another " 295 234 "page as that would cancel unfinished backups and may leave temporary files " 296 "in the backup directory." 235 "in the backup directory. If a complete Backup fails, you may want to try " 236 "creating partial backups." 297 237 msgstr "" 298 238 "Je nach der Anzahl an Dateien und Informationen, kann die Grösse und " … … 304 244 "zurückbleiben." 305 245 306 #: ../mk-simple-backups.php:2 93246 #: ../mk-simple-backups.php:271 307 247 msgid "My Backup has failed, why?" 308 248 msgstr "Das Backup ist gescheitert, wieso?" 309 249 310 #: ../mk-simple-backups.php:2 94250 #: ../mk-simple-backups.php:272 311 251 msgid "" 312 252 "Usually file-permissions are at fault if the plugins fails to create " … … 322 262 "Verzeichnis von Wordpress. " 323 263 324 #: ../mk-simple-backups.php:2 99264 #: ../mk-simple-backups.php:281 325 265 #, php-format 326 266 msgid "Backup directory could not be created: %s" 327 267 msgstr "Backup Verzeichnis konnte nicht erstellt werden: %s" 268 269 #~ msgid "DB Backup %s created" 270 #~ msgstr "DB Backup %s erstellt" 271 272 #~ msgid "DB Backup could not be created" 273 #~ msgstr "DB Backup konnte nicht erstellt werden" 274 275 #~ msgid "Theme Backup %s created" 276 #~ msgstr "Theme Backup %s erstellt" 277 278 #~ msgid "Theme Backup could not be created" 279 #~ msgstr "Theme Backup konnte nicht erstellt werden" 280 281 #~ msgid "Upload Backup %s created" 282 #~ msgstr "Upload Backup %s erstellt" 283 284 #~ msgid "Upload Backup could not be created" 285 #~ msgstr "Upload Backup konnte nicht erstellt werden" 286 287 #~ msgid "DB Backup failed, complete backup aborted" 288 #~ msgstr "DB Backup gescheitert, Komplettes Backup abgebrochen" 289 290 #~ msgid "Media Backup failed, complete backup aborted" 291 #~ msgstr "Media Backup gescheitert, Komplettes Backup abgebrochen" 292 293 #~ msgid "Complete Backup successfully created" 294 #~ msgstr "Komplettes Backup wurde erstellt" 295 296 #~ msgid "Complete Backup could not be created" 297 #~ msgstr "Komplettes Backup konnte nicht erstellt werden" 298 299 #~ msgid "Media Backup by DB could not be created" 300 #~ msgstr "Upload Backup (anhand DB) konnte nicht erstellt werden" 301 302 #~ msgid "create Theme Backup" 303 #~ msgstr "Theme Backup erstellen" 304 305 #~ msgid "create Upload Backup" 306 #~ msgstr "Upload Backup erstellen" 307 308 #~ msgid "create DB Backup" 309 #~ msgstr "DB Backup erstellen" 310 311 #~ msgid "All-in-One" 312 #~ msgstr "Alles-in-Einem" 313 314 #~ msgid "attempt to create all Backup-Types at once" 315 #~ msgstr "Alle Einzelbackups auf einmal erstellen" 316 317 #~ msgid "script might time out" 318 #~ msgstr "Script kann maximale Ausführzeit überschreiten" 319 320 #~ msgid "create DB, Media & Theme Backup" 321 #~ msgstr "DB, Upload und Theme Backup erstellen" 322 323 #~ msgid "Complete Backup" 324 #~ msgstr "Komplettes Backup" 325 326 #~ msgid "" 327 #~ "The complete Backup will automatically perform all single Backup Tasks " 328 #~ "and create a ZIP Archive containing the three resulting files. This can " 329 #~ "take some time, if performed within a big Wordpress installation. The " 330 #~ "complete includes the DB approach for Uploads." 331 #~ msgstr "" 332 #~ "Das komplette Backup erstellt automatisch alle einzelnen Backups und " 333 #~ "kreiert daraus ein ZIP Archiv mit den drei resultierenden Dateien. In " 334 #~ "einer grossen Wordpress Installation kann dies einige Zeit in Anspruch " 335 #~ "nehmen. Das komplette Backup verwendet den Datenbank-basierten Upload " 336 #~ "Backup." -
mk-simple-backups/trunk/mk-simple-backups.php
r892855 r892993 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. 57 * Version: 0.6 8 8 * Author: Michael Kühni 9 9 * Author URI: http://michaelkuehni.ch … … 64 64 65 65 $msg = array(); 66 $this_plugin_data = get_plugin_data( __FILE__); 66 67 67 68 … … 87 88 break; 88 89 89 case "createdbbkp":90 $s = $bkp->createDBBackup();91 if($s != false) $msg[] = array("txt"=>sprintf(__( 'DB Backup %s created', 'mk-simple-backups' ), $s ));92 else $msg[] = array("txt"=>__( 'DB Backup could not be created', 'mk-simple-backups' ), "error"=>true);93 break;94 95 case "createthemebkp":96 $s = $bkp->createThemeBackup();97 if($s != false) $msg[] = array("txt"=>sprintf(__( 'Theme Backup %s created', 'mk-simple-backups' ), $s ));98 else $msg[] = array("txt"=>__( 'Theme Backup could not be created', 'mk-simple-backups' ), "error"=>true);99 break;100 101 case "createuploadbkp":102 $s = $bkp->createUploadBackup();103 if($s != false) $msg[] = array("txt"=>sprintf(__( 'Upload Backup %s created', 'mk-simple-backups' ), $s ));104 else $msg[] = array("txt"=>__( 'Upload Backup could not be created', 'mk-simple-backups' ), "error"=>true);105 break;106 107 case "createCompleteBackup":108 $s1 = $bkp->createDBBackup();109 if($s1 == false) $msg = array( "txt"=>__("DB Backup failed, complete backup aborted", "mk-simple-backups"), "error"=>true );110 $s2 = $bkp->createThemeBackup();111 if($s2 == false) $msg = array( "txt"=>__("Theme Backup failed, complete backup aborted", "mk-simple-backups"), "error"=>true );112 $s3 = $bkp->createUploadBackupByDB();113 if($s3 == false) $msg = array( "txt"=>__("Media Backup failed, complete backup aborted", "mk-simple-backups"), "error"=>true );114 115 // currently no zip will be done116 if($s1 != false && $s2 != false && $s3 != false) {117 118 // create array with backups119 $bkp_files = array(120 $s1=>$bkp->backup_dir . "/" . $s1,121 $s2=>$bkp->backup_dir . "/" . $s2,122 $s3=>$bkp->backup_dir . "/" . $s3 );123 124 // create zip125 $zip_path = $bkp->backup_dir . "/" . $bkp->getBackupName("complete", ".zip" );126 $s = $bkp->createZip( $zip_path , $bkp_files );127 128 // check if zip was created successfully129 if($s) {130 $bkp->removeFiles( array($s1, $s2, $s3) );131 $bkp->backups_exist = true;132 $msg[] = array( "txt"=>__("Complete Backup successfully created", "mk-simple-backups"));133 } else {134 $msg[] = array( "txt"=>__("Complete Backup could not be created", "mk-simple-backups"));135 }136 137 138 139 }140 break;141 142 case "createuploadbkpbydb":143 $s = $bkp->createUploadBackupByDB();144 if($s != false) $msg[] = array("txt"=> sprintf(__("Backup %s created", "mk-simple-backups"), $s));145 else $msg[] = array("txt"=>__("Media Backup by DB could not be created", "mk-simple-backups"), "error"=>true);146 break;147 148 90 case "flush"; 149 91 $s = $bkp->flushBackupDir(); … … 151 93 else $msg[] = array("txt"=>__("Some files could not be removed by the script. Check File-Permissions or delete the files manually.", "mk-simple-backups"), "error" => true); 152 94 break; 153 95 96 case "createBackup": 97 98 $bkp_options = $_POST["options"]; 99 $bkp_single_files_with_path = array(); 100 $bkp_single_files = array(); 101 102 103 if(count($bkp_options) > 0) { 104 foreach($bkp_options AS $o) { 105 106 switch($o) { 107 case "db": 108 $s = $bkp->createDBBackup(); 109 $desc = __("Database", "mk-simple-backups"); 110 break; 111 case "theme": 112 $s = $bkp->createThemeBackup(); 113 $desc = __("Theme", "mk-simple-backups"); 114 break; 115 case "uploads": 116 if($_POST["upload_options"] == "file") { 117 $s = $bkp->createUploadBackupByDB(); 118 $desc = __("Uploads (file based)", "mk-simple-backups"); 119 } 120 else { 121 $s = $bkp->createUploadBackup(); 122 $desc = __("Uploads (db based)", "mk-simple-backups"); 123 } 124 break; 125 } 126 127 if($s != false) { 128 $bkp_single_files[] = $s; 129 $bkp_single_files_with_path[] = $bkp->backup_dir . "/" . $s; 130 } else { 131 $msg[] = array( "txt"=>sprintf(__("Complete Backup failed upon attempting to backup %s", "mk-simple-backups"), $desc), "error"=>true ); 132 break; 133 } 134 } // end foreach 135 136 // create zip 137 $bkp_filename = $bkp->getBackupName( "bkp_" . sanitize_title(get_bloginfo("name"), "default"), "_" . implode($bkp->sep, $bkp_options) . ".zip"); 138 $s = $bkp->createZip( $bkp->backup_dir . "/" . $bkp_filename, $bkp_single_files_with_path); 139 140 if($s != false) { 141 142 $bkp->removeFiles($bkp_single_files); 143 $bkp->backups_exist = true; 144 $msg[] = array( "txt"=>sprintf(__("Backup %s created (containing %s)", "mk-simple-backups"), $bkp_filename, implode(", ", $bkp_options)) ); 145 146 } else { 147 148 $msg[] = array( "txt"=>sprintf(__("ZIP Archive %s failed, partial Backups exist", "mk-simple-backups"), $bkp_filename), "error"=>true ); 149 150 } 151 152 } // end if check for anything to backup 153 154 155 break; 154 156 } 155 156 157 157 158 // echo msg's … … 197 198 198 199 // determine type of file by the first 2 characters 199 $begin = substr($name, 0, 2); 200 201 switch($begin) 202 { 203 default: 204 $fileclass = ""; 205 break; 206 case "up": 207 $fileclass = "uploads"; 208 break; 209 210 case "db": 211 $fileclass = "db"; 212 break; 213 214 case "co": 215 $fileclass = "archive"; 216 break; 217 218 case "te": 219 $fileclass = "empty"; 220 break; 221 222 case "th": 223 $fileclass="theme"; 224 break; 225 } 200 $suffix = substr($name, strlen($name)-3); 201 202 if($suffix == "zip") $fileclass = "archive"; 203 else $fileclass = "default"; 226 204 227 205 // get filesize … … 258 236 ?> 259 237 <h3><? _e('Create Backup', 'mk-simple-backups'); ?></h3> 260 <ul class="actions"> 261 <li class="theme"><strong><?=wp_get_theme();?></strong>, <? _e('Active Theme', 'mk-simple-backups'); ?><br /> 262 <a href="<? bloginfo("siteurl"); ?>/wp-admin/tools.php?page=mk-simple-backups&action=createthemebkp"><? _e('create Theme Backup', 'mk-simple-backups'); ?></a></li> 263 <li class="uploads"><strong>/uploads</strong>, <? printf( __('All uploads within %s', 'mk-simple-backups'), $bkp->upload_dir["baseurl"]); ?><br /> 264 <a href="<? bloginfo("siteurl"); ?>/wp-admin/tools.php?page=mk-simple-backups&action=createuploadbkp"><? _e('create Upload Backup', 'mk-simple-backups'); ?></a></li> 265 <li class="uploads"><strong>/uploads</strong>, <? _e('Backup Attachments from DB (post_type: attachment)', 'mk-simple-backups'); ?><br /> 266 <a href="<? bloginfo("siteurl"); ?>/wp-admin/tools.php?page=mk-simple-backups&action=createuploadbkpbydb"><? _e('create Upload Backup', 'mk-simple-backups'); ?></a></li> 267 <li class="db"><strong><? _e('SQL-Dump', 'mk-simple-backups'); ?></strong>, <? _e('Database', 'mk-simple-backups'); ?><br /> 268 <a href="<? bloginfo("siteurl"); ?>/wp-admin/tools.php?page=mk-simple-backups&action=createdbbkp"><? _e('create DB Backup', 'mk-simple-backups'); ?></a></li> 269 <li class="test"><strong><? _e('Blank File', 'mk-simple-backups'); ?></strong>, <? _e('test writing permissions', 'mk-simple-backups'); ?><br /> 270 <a href="<? bloginfo("siteurl"); ?>/wp-admin/tools.php?page=mk-simple-backups&action=createtestfile"><? _e('create Blank File', 'mk-simple-backups'); ?></a></li> 271 <li class="allinone"> 272 <strong><? _e("All-in-One", "mk-simple-backups") ?></strong>, <? _e("attempt to create all Backup-Types at once", "mk-simple-backups") ?><br /> 273 <em><? _e("script might time out", "mk-simple-backups") ?></em><br /> 274 <a href="<? bloginfo("siteurl"); ?>/wp-admin/tools.php?page=mk-simple-backups&action=createCompleteBackup"><? _e("create DB, Media & Theme Backup", "mk-simple-backups")?></a> 275 </li> 276 </ul> 238 <form action="<? bloginfo("siteurl"); ?>/wp-admin/tools.php?page=mk-simple-backups&action=createBackup" method="post"> 239 <ul class="options"> 240 <li class="theme"><label><input type="checkbox" name="options[]" value="theme" checked="checked"><strong><?=wp_get_theme();?></strong>, <? _e('Active Theme', 'mk-simple-backups'); ?></label></li> 241 <li class="db"><label><input type="checkbox" name="options[]" value="db" checked="checked"><strong><? _e('SQL-Dump', 'mk-simple-backups'); ?></strong>, <? _e('Database', 'mk-simple-backups'); ?></label></li> 242 <li class="uploads"><label><input type="checkbox" name="options[]" value="uploads" checked="checked"><strong>/uploads</strong>, Uploads</label> 243 <select name="upload_options"> 244 <option value="file"><? printf( __('All files within %s', 'mk-simple-backups'), $bkp->upload_dir["baseurl"]); ?></option> 245 <option value="db" selected="selected"><? _e('Attachments from DB (post_type: attachment)', 'mk-simple-backups'); ?></option> 246 </select></li> 247 248 </ul> 249 250 <p><input type="submit" value="<? _e("create Backup", "mk-simple-backups");?>" class="button action"></p> 251 </form> 277 252 <p><hr /></p> 278 253 <p><? _e('Backup directory', 'mk-simple-backups'); ?>: <br /> 279 254 <em><?=$bkp->backup_dir?></em></p> 280 255 <p><hr /></p> 256 <h3><? _e("Info", "mk-simple-backups") ?></h3> 257 <ul class="actions"> 258 <li class="test"><strong><? _e('Blank File', 'mk-simple-backups'); ?></strong>, <? _e('test writing permissions', 'mk-simple-backups'); ?><br /> 259 <a href="<? bloginfo("siteurl"); ?>/wp-admin/tools.php?page=mk-simple-backups&action=createtestfile"><? _e('create Blank File', 'mk-simple-backups'); ?></a></li> 260 </ul> 281 261 <h4><? _e("What's going on?", "mk-simple-backups") ?></h4> 282 262 <p class="readable"><strong><? _e("Theme Backup", "mk-simple-backups");?></strong>: <? _e("The Theme Backup will create a ZIP Archive containing all files within the directory of your current active theme. If the active theme is a child-theme, the backup will detect this and include all files from the parent theme.", "mk-simple-backups")?></p> … … 286 266 <p class="readable"><strong><? _e("Upload Backups", "mk-simple-backups");?></strong>: <? _e("The file-based Upload Backup will scan the whole Upload Directory (including subfolders) and create a ZIP Archive containing all files found. If there are many files in the upload directory, the script might time out. The DB based Upload Backup will fetch Attachments from the DB and create a ZIP Archive with found files. In the DB approach, the thumbnails and scaled versions are not included, since they can be regenerated afterwards easily. By ommitting those files, the DB approach saves space and script execution time. The DB based approach can be incomplete when plugins create files in the upload directory that arent included in the DB as attachments. There are plugins that do this.", "mk-simple-backups")?></p> 287 267 288 <p class="readable"><strong><? _e("Complete Backup", "mk-simple-backups");?></strong>: <? _e("The complete Backup will automatically perform all single Backup Tasks and create a ZIP Archive containing the three resulting files. This can take some time, if performed within a big Wordpress installation. The complete includes the DB approach for Uploads.", "mk-simple-backups")?></p>289 290 268 <h4><? _e("How long does it take?", "mk-simple-backups") ?></h4> 291 <p class="readable"><? _e("Depending on the amount of files and data, Backups can widely vary in size and time taken to create. The script attempts to increase maximum execution time for php scripts to allow larger Backups to be created. While a backup is being created, don't close your tab/browser and don't navigate to another page as that would cancel unfinished backups and may leave temporary files in the backup directory. ", "mk-simple-backups")?></p>269 <p class="readable"><? _e("Depending on the amount of files and data, Backups can widely vary in size and time taken to create. The script attempts to increase maximum execution time for php scripts to allow larger Backups to be created. While a backup is being created, don't close your tab/browser and don't navigate to another page as that would cancel unfinished backups and may leave temporary files in the backup directory. If a complete Backup fails, you may want to try creating partial backups.", "mk-simple-backups")?></p> 292 270 293 271 <h4><? _e("My Backup has failed, why?", "mk-simple-backups") ?></h4> 294 272 <p class="readable"><? _e("Usually file-permissions are at fault if the plugins fails to create Backups. Use your FTP-Client to make sure writing permission on the Backup Directory (refer to the path displayed above) are set to writeable. If there's other problems, use the Plugin Page in the Plugin Repository to request support or patching.")?></p> 273 274 <p><hr /></p> 275 <p class="small">Plugin <a href="<?=$this_plugin_data["pluginURI"]?>" target="_blank"><?=$this_plugin_data["Name"] ?></a> v<?=$this_plugin_data["Version"]?></p> 276 295 277 <? 296 278 -
mk-simple-backups/trunk/readme.txt
r892855 r892993 3 3 Tags: backup, db, uploads 4 4 Requires at least: 3.8 5 Stable tag: 0. 55 Stable tag: 0.6 6 6 Tested up to: 3.9RC1 7 7 License: GPLv2 or later … … 45 45 46 46 == Changelog == 47 48 = 0.6 = 49 * Simplified UI by shifting from single-action links to option-based form 50 * Backup Name uses Site Name 51 * Backup Name reflects contents 52 * Moved blank file link to info section 53 * Added plugin repository link to the footer 54 * Updated Language Files (german, english) 55 * Simplified Icons 56 * Updated Screenshot 57 * Updated Read-Me 47 58 48 59 = 0.5 = … … 94 105 == Upgrade Notice == 95 106 107 = 0.6 = 108 Switching to form based Backup Creation 109 96 110 = 0.5 = 97 111 Added features, check the changelog for detailed information
Note: See TracChangeset
for help on using the changeset viewer.