Version Description
Download this release
Release Info
Developer | filosofo |
Plugin | WP-DB-Backup |
Version | 2.0.2 |
Comparing to | |
See all releases |
Code changes from version 2.0 to 2.0.2
- wp-db-backup.txt → readme.txt +40 -31
- wp-db-backup.mo +0 -0
- wp-db-backup.php +95 -75
- wp-db-backup.po +280 -0
- wp-db-backup.pot +135 -90
wp-db-backup.txt → readme.txt
RENAMED
@@ -1,8 +1,14 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
4 |
|
5 |
-
|
|
|
|
|
6 |
|
7 |
WP-DB-Backup allows you easily to backup your core WordPress database tables. You may also backup other tables in the same database.
|
8 |
|
@@ -11,20 +17,36 @@ Released under the terms of the GNU GPL, version 2.
|
|
11 |
|
12 |
NO WARRANTY.
|
13 |
|
|
|
|
|
14 |
== Installation ==
|
15 |
-
1.
|
16 |
-
|
|
|
|
|
17 |
For example:
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
== Usage ==
|
26 |
-
1
|
27 |
-
|
28 |
|
29 |
The following core WordPress tables will be included in every backup:
|
30 |
* wp_categories
|
@@ -38,18 +60,17 @@ The following core WordPress tables will be included in every backup:
|
|
38 |
* wp_users
|
39 |
(Where "wp_" will automatically be replaced by whatever table prefix you use.)
|
40 |
|
41 |
-
|
42 |
** NOTE **
|
43 |
-
Including other tables in your backup may substantially increase the
|
44 |
-
size of the backup file!
|
45 |
This may prevent you from emailing the backup file because it's too big.
|
46 |
|
47 |
-
|
48 |
* Save to server : this will create a file in /wp-content/backup-*/ for you to retreive later
|
49 |
* Download to your computer : this will send the backup file to your browser to be downloaded
|
50 |
* Email : this will email the backup file to the address you specify
|
51 |
|
52 |
-
|
53 |
|
54 |
The filename of the backup file will be of the form
|
55 |
DB_prefix_date.sql
|
@@ -73,17 +94,6 @@ When having the database backup emailed or sent to your browser for immediate do
|
|
73 |
If you are using WordPress version 2.1 or newer, you can schedule automated backups to be sent to the email address
|
74 |
of your choice.
|
75 |
|
76 |
-
== Frequently Asked Questions ==
|
77 |
-
Q. What are wp-db-backup.mo and wp-db-backup.pot for?
|
78 |
-
A. These files are used by non-English users to translate the display into their native language. Translators are encouraged to send me translated files, which will be made available to others here:
|
79 |
-
http://dev.wp-plugins.org/browser/wp-db-backup/i18n/
|
80 |
-
|
81 |
-
Q. Why are only the core database files backed up by default?
|
82 |
-
A. Because it's a fairly safe bet that the core WordPress files will be successfully backed up. Plugins vary wildly in the amount of data that they store. For instance, it's not uncommon for some statistics plugins to have tens of megabytes worth of visitor statistics. These are not exactly essential items to restore after a catastrophic failure. Most poeple can reasonably live without this data in their backups.
|
83 |
-
|
84 |
-
Q. Will you add a button so that I can automatically select all my other tables to back up?
|
85 |
-
A. No. Such a button would encourage people to click it. The way it is now, you must deliberately select which additional tables to include in the backup. This is a safety mechanism as much for me as it is for you.
|
86 |
-
|
87 |
== Changelog ==
|
88 |
2.0
|
89 |
Support for WordPress 2.1's built-in cron, for automated scheduled backups.
|
@@ -101,4 +111,3 @@ Applied patch from Owen (http://dev.wp-plugins.org/ticket/219)
|
|
101 |
|
102 |
1.4
|
103 |
Initial relase.
|
104 |
-
|
1 |
+
=== WP-DB-Backup ===
|
2 |
+
Contributors: filosofo, skippy, Firas, LaughingLizard, MtDewVirus, Podz, Ringmaster
|
3 |
+
Donate link: http://www.ilfilosofo.com/blog/wp-db-backup/
|
4 |
+
Tags: mysql, database, backup, cron
|
5 |
+
Requires at least: 2.0
|
6 |
+
Tested up to: 2.2
|
7 |
+
Stable tag: 2.0.2
|
8 |
|
9 |
+
On-demand backup of your WordPress database.
|
10 |
+
|
11 |
+
== Description ==
|
12 |
|
13 |
WP-DB-Backup allows you easily to backup your core WordPress database tables. You may also backup other tables in the same database.
|
14 |
|
17 |
|
18 |
NO WARRANTY.
|
19 |
|
20 |
+
Copyright (c) 2007 Austin Matzko
|
21 |
+
|
22 |
== Installation ==
|
23 |
+
1. Copy the wp-db-backup.php file to /wp-content/plugins/
|
24 |
+
1. Activate the plugin at your blog's Admin -> Plugins screen
|
25 |
+
1. The plugin will attempt to create a directory /wp-content/backup-*/ inside your WordPress directory.
|
26 |
+
1. You may need to make /wp-content writable (at least temporarily) for it to create this directory.
|
27 |
For example:
|
28 |
+
`$ cd /wordpress/`
|
29 |
+
`$ chgrp www-data wp-content` (where "`www-data`" is the group your FTP client uses)
|
30 |
+
`$ chmod g+w backup`
|
31 |
+
|
32 |
+
== Frequently Asked Questions ==
|
33 |
+
|
34 |
+
= What are wp-db-backup.mo and wp-db-backup.pot for? =
|
35 |
+
|
36 |
+
These files are used by non-English users to translate the display into their native language. Translators are encouraged to send me translated files, which will be made available to others here:
|
37 |
+
http://dev.wp-plugins.org/browser/wp-db-backup/i18n/
|
38 |
+
|
39 |
+
= Why are only the core database files backed up by default? =
|
40 |
+
|
41 |
+
Because it's a fairly safe bet that the core WordPress files will be successfully backed up. Plugins vary wildly in the amount of data that they store. For instance, it's not uncommon for some statistics plugins to have tens of megabytes worth of visitor statistics. These are not exactly essential items to restore after a catastrophic failure. Most poeple can reasonably live without this data in their backups.
|
42 |
+
|
43 |
+
= Will you add a button so that I can automatically select all my other tables to back up? =
|
44 |
+
|
45 |
+
No. Such a button would encourage people to click it. The way it is now, you must deliberately select which additional tables to include in the backup. This is a safety mechanism as much for me as it is for you.
|
46 |
|
47 |
== Usage ==
|
48 |
+
1. Click the Manage menu in your WordPress admin area.
|
49 |
+
1. Click the Backup sub-menu.
|
50 |
|
51 |
The following core WordPress tables will be included in every backup:
|
52 |
* wp_categories
|
60 |
* wp_users
|
61 |
(Where "wp_" will automatically be replaced by whatever table prefix you use.)
|
62 |
|
63 |
+
1. The plugin will look for other tables in the same database. You may elect to include other tables in the backup.
|
64 |
** NOTE **
|
65 |
+
Including other tables in your backup may substantially increase the size of the backup file!
|
|
|
66 |
This may prevent you from emailing the backup file because it's too big.
|
67 |
|
68 |
+
1. Select how you'd like the backup to be delivered:
|
69 |
* Save to server : this will create a file in /wp-content/backup-*/ for you to retreive later
|
70 |
* Download to your computer : this will send the backup file to your browser to be downloaded
|
71 |
* Email : this will email the backup file to the address you specify
|
72 |
|
73 |
+
1. Click "Backup!" and your database backup will be delivered to you.
|
74 |
|
75 |
The filename of the backup file will be of the form
|
76 |
DB_prefix_date.sql
|
94 |
If you are using WordPress version 2.1 or newer, you can schedule automated backups to be sent to the email address
|
95 |
of your choice.
|
96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
== Changelog ==
|
98 |
2.0
|
99 |
Support for WordPress 2.1's built-in cron, for automated scheduled backups.
|
111 |
|
112 |
1.4
|
113 |
Initial relase.
|
|
wp-db-backup.mo
DELETED
Binary file
|
wp-db-backup.php
CHANGED
@@ -3,14 +3,33 @@
|
|
3 |
Plugin Name: WordPress Database Backup
|
4 |
Plugin URI: http://www.ilfilosofo.com/blog/wp-db-backup
|
5 |
Description: On-demand backup of your WordPress database. Navigate to <a href="edit.php?page=wp-db-backup.php">Manage → Backup</a> to get started.
|
6 |
-
Author:
|
7 |
-
|
|
|
|
|
|
|
8 |
|
9 |
Much of this was modified from Mark Ghosh's One Click Backup, which
|
10 |
in turn was derived from phpMyAdmin.
|
11 |
|
12 |
Many thanks to Owen (http://asymptomatic.net/wp/) for his patch
|
13 |
http://dev.wp-plugins.org/ticket/219
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
*/
|
15 |
|
16 |
// CHANGE THIS IF YOU WANT TO USE A
|
@@ -36,6 +55,7 @@ class wpdbBackup {
|
|
36 |
|
37 |
function wpdbBackup() {
|
38 |
global $table_prefix, $wpdb;
|
|
|
39 |
add_action('wp_db_backup_cron', array(&$this, 'cron_backup'));
|
40 |
add_action('wp_cron_daily', array(&$this, 'wp_cron_daily'));
|
41 |
add_filter('cron_schedules', array(&$this, 'add_sched_options'));
|
@@ -51,7 +71,7 @@ class wpdbBackup {
|
|
51 |
$this->basename = preg_replace('/^.*wp-content[\\\\\/]plugins[\\\\\/]/', '', __FILE__);
|
52 |
|
53 |
if (isset($_POST['do_backup'])) {
|
54 |
-
if ( !$this->user_can_backup() ) die(__('You are not allowed to perform backups.'));
|
55 |
switch($_POST['do_backup']) {
|
56 |
case 'backup':
|
57 |
$this->perform_backup();
|
@@ -61,10 +81,10 @@ class wpdbBackup {
|
|
61 |
break;
|
62 |
}
|
63 |
} elseif (isset($_GET['fragment'] )) {
|
64 |
-
if ( !$this->user_can_backup() ) die(__('You are not allowed to perform backups.'));
|
65 |
add_action('init', array(&$this, 'init'));
|
66 |
} elseif (isset($_GET['backup'] )) {
|
67 |
-
if ( !$this->user_can_backup() ) die(__('You are not allowed to perform backups.'));
|
68 |
add_action('init', array(&$this, 'init'));
|
69 |
} else {
|
70 |
add_action('admin_menu', array(&$this, 'admin_menu'));
|
@@ -72,7 +92,7 @@ class wpdbBackup {
|
|
72 |
}
|
73 |
|
74 |
function init() {
|
75 |
-
if ( !$this->user_can_backup() ) die(__('You are not allowed to perform backups.'));
|
76 |
|
77 |
if (isset($_GET['backup'])) {
|
78 |
$via = isset($_GET['via']) ? $_GET['via'] : 'http';
|
@@ -94,7 +114,7 @@ class wpdbBackup {
|
|
94 |
}
|
95 |
}
|
96 |
echo '
|
97 |
-
alert("' . __('Backup Complete!') . '");
|
98 |
</script>
|
99 |
';
|
100 |
break;
|
@@ -121,17 +141,17 @@ class wpdbBackup {
|
|
121 |
|
122 |
echo "<div class='wrap'>";
|
123 |
//echo "<pre>" . print_r($_POST, 1) . "</pre>";
|
124 |
-
echo '<h2>' . __('Backup') . '</h2>
|
125 |
-
<fieldset class="options"><legend>' . __('Progress') . '</legend>
|
126 |
<p><strong>' .
|
127 |
-
__('DO NOT DO THE FOLLOWING AS IT WILL CAUSE YOUR BACKUP TO FAIL:').
|
128 |
'</strong></p>
|
129 |
<ol>
|
130 |
-
<li>'.__('Close this browser').'</li>
|
131 |
-
<li>'.__('Reload this page').'</li>
|
132 |
-
<li>'.__('Click the Stop or Back buttons in your browser').'</li>
|
133 |
</ol>
|
134 |
-
<p><strong>' . __('Progress:') . '</strong></p>
|
135 |
<div id="meterbox" style="height:11px;width:80%;padding:3px;border:1px solid #659fff;"><div id="meter" style="height:11px;background-color:#659fff;width:0%;text-align:center;font-size:6pt;"> </div></div>
|
136 |
<div id="progress_message"></div>
|
137 |
<div id="errors"></div>
|
@@ -174,19 +194,19 @@ class wpdbBackup {
|
|
174 |
switch($_POST['deliver']) {
|
175 |
case 'http':
|
176 |
echo '
|
177 |
-
setProgress("' . sprintf(__("Backup complete, preparing <a href=\\\"%s\\\">backup</a> for download..."), $download_uri) . '");
|
178 |
fram.src = "' . $download_uri . '";
|
179 |
';
|
180 |
break;
|
181 |
case 'smtp':
|
182 |
echo '
|
183 |
-
setProgress("' . sprintf(__("Backup complete, sending <a href=\\\"%s\\\">backup</a> via email..."), $download_uri) . '");
|
184 |
fram.src = "' . $download_uri . '&via=email&recipient=' . $_POST['backup_recipient'] . '";
|
185 |
';
|
186 |
break;
|
187 |
default:
|
188 |
echo '
|
189 |
-
setProgress("' . sprintf(__("Backup complete, download <a href=\\\"%s\\\">here</a>."), $download_uri) . '");
|
190 |
';
|
191 |
}
|
192 |
|
@@ -238,12 +258,12 @@ class wpdbBackup {
|
|
238 |
echo "$table:$segment:$filename";
|
239 |
|
240 |
if($table == '') {
|
241 |
-
$msg = __('Creating backup file...');
|
242 |
} else {
|
243 |
if($segment == -1) {
|
244 |
-
$msg = sprintf(__('Finished backing up table \\"%s\\".'), $table);
|
245 |
} else {
|
246 |
-
$msg = sprintf(__('Backing up table \\"%s\\"...'), $table);
|
247 |
}
|
248 |
}
|
249 |
|
@@ -255,8 +275,8 @@ class wpdbBackup {
|
|
255 |
if (is_writable(ABSPATH . $this->backup_dir)) {
|
256 |
$this->fp = $this->open(ABSPATH . $this->backup_dir . $filename, 'a');
|
257 |
if(!$this->fp) {
|
258 |
-
$this->backup_error(__('Could not open the backup file for writing!'));
|
259 |
-
$this->fatal_error = __('The backup file could not be saved. Please check the permissions for writing to your backup directory and try again.');
|
260 |
}
|
261 |
else {
|
262 |
if($table == '') {
|
@@ -281,8 +301,8 @@ class wpdbBackup {
|
|
281 |
}
|
282 |
}
|
283 |
} else {
|
284 |
-
$this->backup_error(__('The backup directory is not writeable!'));
|
285 |
-
$this->fatal_error = __('The backup directory is not writeable! Please check the permissions for writing to your backup directory and try again.');
|
286 |
}
|
287 |
|
288 |
if($this->fp) $this->close($this->fp);
|
@@ -330,11 +350,11 @@ class wpdbBackup {
|
|
330 |
}
|
331 |
|
332 |
function admin_menu() {
|
333 |
-
add_management_page(__('Backup'), __('Backup'), 'import', basename(__FILE__), array(&$this, 'backup_menu'));
|
334 |
}
|
335 |
|
336 |
function fragment_menu() {
|
337 |
-
add_management_page(__('Backup'), __('Backup'), 'import', basename(__FILE__), array(&$this, 'build_backup_script'));
|
338 |
}
|
339 |
|
340 |
function sql_addslashes($a_string = '', $is_like = FALSE) {
|
@@ -394,12 +414,12 @@ class wpdbBackup {
|
|
394 |
function stow($query_line) {
|
395 |
if ($this->gzip()) {
|
396 |
if(@gzwrite($this->fp, $query_line) === FALSE) {
|
397 |
-
backup_error(__('There was an error writing a line to the backup script:'));
|
398 |
backup_error(' ' . $query_line);
|
399 |
}
|
400 |
} else {
|
401 |
if(@fwrite($this->fp, $query_line) === FALSE) {
|
402 |
-
backup_error(__('There was an error writing a line to the backup script:'));
|
403 |
backup_error(' ' . $query_line);
|
404 |
}
|
405 |
}
|
@@ -409,7 +429,7 @@ class wpdbBackup {
|
|
409 |
if(count($this->backup_errors) < 20) {
|
410 |
$this->backup_errors[] = $err;
|
411 |
} elseif(count($this->backup_errors) == 20) {
|
412 |
-
$this->backup_errors[] = __('Subsequent errors have been omitted from this log.');
|
413 |
}
|
414 |
}
|
415 |
|
@@ -427,7 +447,7 @@ class wpdbBackup {
|
|
427 |
|
428 |
$table_structure = $wpdb->get_results("DESCRIBE $table");
|
429 |
if (! $table_structure) {
|
430 |
-
|
431 |
return FALSE;
|
432 |
}
|
433 |
|
@@ -450,13 +470,13 @@ class wpdbBackup {
|
|
450 |
|
451 |
$create_table = $wpdb->get_results("SHOW CREATE TABLE $table", ARRAY_N);
|
452 |
if (FALSE === $create_table) {
|
453 |
-
$this->backup_error(sprintf(__("Error with SHOW CREATE TABLE for %s."), $table));
|
454 |
$this->stow("#\n# Error with SHOW CREATE TABLE for $table!\n#\n");
|
455 |
}
|
456 |
$this->stow($create_table[0][1] . ' ;');
|
457 |
|
458 |
if (FALSE === $table_structure) {
|
459 |
-
$this->backup_error(sprintf(__("Error getting table structure of %s"), $table));
|
460 |
$this->stow("#\n# Error getting table structure of $table!\n#\n");
|
461 |
}
|
462 |
|
@@ -563,11 +583,11 @@ class wpdbBackup {
|
|
563 |
if (is_writable(ABSPATH . $this->backup_dir)) {
|
564 |
$this->fp = $this->open(ABSPATH . $this->backup_dir . $wp_backup_filename);
|
565 |
if(!$this->fp) {
|
566 |
-
$this->backup_error(__('Could not open the backup file for writing!'));
|
567 |
return false;
|
568 |
}
|
569 |
} else {
|
570 |
-
$this->backup_error(__('The backup directory is not writeable!'));
|
571 |
return false;
|
572 |
}
|
573 |
|
@@ -610,9 +630,9 @@ class wpdbBackup {
|
|
610 |
$diskfile = ABSPATH . $this->backup_dir . $filename;
|
611 |
if ('http' == $delivery) {
|
612 |
if (! file_exists($diskfile)) {
|
613 |
-
$msg = sprintf(__('File not found:%s'), "<br /><strong>$filename</strong><br />");
|
614 |
$this_basename = preg_replace('/^.*wp-content[\\\\\/]plugins[\\\\\/]/', '', __FILE__);
|
615 |
-
$msg .= '<br /><a href="' . get_option('siteurl') . "/wp-admin/edit.php?page={$this_basename}" . '">' . __('Return to Backup');
|
616 |
die($msg);
|
617 |
}
|
618 |
header('Content-Description: File Transfer');
|
@@ -637,7 +657,7 @@ class wpdbBackup {
|
|
637 |
$headers .= "Content-Type: multipart/mixed; boundary=\"$boundary\"\n";
|
638 |
$headers .= 'From: ' . get_option('admin_email') . "\n";
|
639 |
|
640 |
-
$message = sprintf(__("Attached to this email is\n %1s\n Size:%2s kilobytes\n"), $filename, round(filesize($diskfile)/1024));
|
641 |
// Add a multipart boundary above the plain message
|
642 |
$message = "This is a multi-part message in MIME format.\n\n" .
|
643 |
"--{$boundary}\n" .
|
@@ -656,9 +676,9 @@ class wpdbBackup {
|
|
656 |
"--{$boundary}--\n";
|
657 |
|
658 |
if (function_exists('wp_mail')) {
|
659 |
-
wp_mail ($recipient, get_bloginfo('name') . ' ' . __('Database Backup'), $message, $headers);
|
660 |
} else {
|
661 |
-
mail ($recipient, get_bloginfo('name') . ' ' . __('Database Backup'), $message, $headers);
|
662 |
}
|
663 |
|
664 |
unlink($diskfile);
|
@@ -673,11 +693,11 @@ class wpdbBackup {
|
|
673 |
|
674 |
// did we just do a backup? If so, let's report the status
|
675 |
if ( $this->backup_complete ) {
|
676 |
-
$feedback = '<div class="updated"><p>' . __('Backup Successful') . '!';
|
677 |
$file = $this->backup_file;
|
678 |
switch($_POST['deliver']) {
|
679 |
case 'http':
|
680 |
-
$feedback .= '<br />' . sprintf(__('Your backup file: <a href="%1s">%2s</a> should begin downloading shortly.'), get_option('siteurl') . "/{$this->backup_dir}{$this->backup_file}", $this->backup_file);
|
681 |
break;
|
682 |
case 'smtp':
|
683 |
if (! is_email($_POST['backup_recipient'])) {
|
@@ -685,17 +705,17 @@ class wpdbBackup {
|
|
685 |
} else {
|
686 |
$feedback .= $_POST['backup_recipient'];
|
687 |
}
|
688 |
-
$feedback = '<br />' . sprintf(__('Your backup has been emailed to %s'), $feedback);
|
689 |
break;
|
690 |
case 'none':
|
691 |
-
$feedback .= '<br />' . __('Your backup file has been saved on the server. If you would like to download it now, right click and select "Save As"');
|
692 |
-
$feedback .= ':<br /> <a href="' . get_option('siteurl') . "/{$this->backup_dir}$file\">$file</a> : " . sprintf(__('%s bytes'), filesize(ABSPATH . $this->backup_dir . $file));
|
693 |
}
|
694 |
$feedback .= '</p></div>';
|
695 |
}
|
696 |
|
697 |
if (count($this->backup_errors)) {
|
698 |
-
$feedback .= '<div class="updated error">' . __('The following errors were reported:') . "<pre>";
|
699 |
foreach($this->backup_errors as $error) {
|
700 |
$feedback .= "{$error}\n"; //Errors are already localized
|
701 |
}
|
@@ -723,7 +743,7 @@ class wpdbBackup {
|
|
723 |
if (is_email($_POST['cron_backup_recipient'])) {
|
724 |
update_option('wp_cron_backup_recipient', $_POST['cron_backup_recipient'], FALSE);
|
725 |
}
|
726 |
-
$feedback .= '<div class="updated"><p>' . __('Scheduled Backup Options Saved!') . '</p></div>';
|
727 |
endif;
|
728 |
|
729 |
$other_tables = array();
|
@@ -749,13 +769,13 @@ class wpdbBackup {
|
|
749 |
if ( @ mkdir( ABSPATH . $this->backup_dir) ) {
|
750 |
@ chmod( ABSPATH . $this->backup_dir, $dir_perms);
|
751 |
} else {
|
752 |
-
echo '<div class="updated error"><p align="center">' . __('WARNING: Your wp-content directory is <strong>NOT</strong> writable! We can not create the backup directory.') . '<br />' . ABSPATH . $this->backup_dir . "</p></div>";
|
753 |
$WHOOPS = TRUE;
|
754 |
}
|
755 |
}
|
756 |
|
757 |
if ( !is_writable( ABSPATH . $this->backup_dir) ) {
|
758 |
-
echo '<div class="updated error"><p align="center">' . __('WARNING: Your backup directory is <strong>NOT</strong> writable! We can not create the backup directory.') . '<br />' . ABSPATH . "</p></div>";
|
759 |
}
|
760 |
|
761 |
if ( !file_exists( ABSPATH . $this->backup_dir . 'index.php') ) {
|
@@ -763,30 +783,30 @@ class wpdbBackup {
|
|
763 |
}
|
764 |
|
765 |
?><div class='wrap'>
|
766 |
-
<h2><?php _e('Backup') ?></h2>
|
767 |
<form method="post" action="">
|
768 |
-
<fieldset class="options"><legend><?php _e('Tables') ?></legend>
|
769 |
<table align="center" cellspacing="5" cellpadding="5"><tr><td width="50%" align="left" class="alternate" valign="top">
|
770 |
-
<?php _e('These core WordPress tables will always be backed up:') ?><br /><ul><?php
|
771 |
foreach ($wp_backup_default_tables as $table) {
|
772 |
echo "<li><input type='hidden' name='core_tables[]' value='$table' />$table</li>";
|
773 |
}
|
774 |
?></ul></td><td width="50%" align="left" valign="top"><?php
|
775 |
if (count($other_tables) > 0) {
|
776 |
-
echo __('You may choose to include any of the following tables:') . ' <br />';
|
777 |
foreach ($other_tables as $table) {
|
778 |
echo "<label style=\"display:block;\"><input type='checkbox' name='other_tables[]' value='{$table}' /> {$table}</label>";
|
779 |
}
|
780 |
}
|
781 |
?></td></tr></table></fieldset>
|
782 |
-
<fieldset class="options"><legend><?php _e('Backup Options') ?></legend>
|
783 |
-
<?php _e('What to do with the backup file:') ?><br />
|
784 |
<label for="do_save" style="display:block;"><input type="radio" id="do_save" name="deliver" value="none" style="border:none;" />
|
785 |
-
<?php echo __('Save to server') . " ({$this->backup_dir})</label>";
|
786 |
?><label for="do_download" style="display:block;"><input type="radio" checked="checked" id="do_download" name="deliver" value="http" style="border:none;" />
|
787 |
-
<?php _e('Download to your computer') ?></label>
|
788 |
<label for="do_email"><input type="radio" name="deliver" id="do_email" value="smtp" style="border:none;" />
|
789 |
-
<?php _e('Email backup to:') ?></label><input type="text" name="backup_recipient" size="20" value="<?php echo get_option('admin_email') ?>" />
|
790 |
|
791 |
<?php
|
792 |
// Check DB dize.
|
@@ -805,9 +825,9 @@ class wpdbBackup {
|
|
805 |
|
806 |
if (! $WHOOPS) {
|
807 |
echo '<input type="hidden" name="do_backup" id="do_backup" value="backup" />';
|
808 |
-
echo '<p class="submit"><input type="submit" name="submit" onclick="document.getElementById(\'do_backup\').value=\'fragments\';" value="' . __('Backup') . '!" /></p>';
|
809 |
} else {
|
810 |
-
echo '<p class="alternate">' . __('WARNING: Your backup directory is <strong>NOT</strong> writable!') . '</p>';
|
811 |
}
|
812 |
echo '</fieldset>';
|
813 |
echo '</form>';
|
@@ -816,30 +836,30 @@ class wpdbBackup {
|
|
816 |
$cron = ( function_exists('wp_schedule_event') ) ? true : false; // wp-cron in WP 2.1+
|
817 |
$cron_old = ( function_exists('wp_cron_init') && ! $cron ) ? true : false; // wp-cron plugin by Skippy
|
818 |
if ( $cron_old || $cron ) :
|
819 |
-
echo '<fieldset class="options"><legend>' . __('Scheduled Backup') . '</legend>';
|
820 |
$datetime = get_option('date_format') . ' @ ' . get_option('time_format');
|
821 |
if ( $cron ) :
|
822 |
if ( ! ( 'never' == $this->get_sched() ) ) :
|
823 |
-
echo '<p>' . __('Next Backup') . ': ';
|
824 |
echo gmdate($datetime, wp_next_scheduled('wp_db_backup_cron') + (get_option('gmt_offset') * 3600)) . '</p>';
|
825 |
endif;
|
826 |
elseif ( $cron_old ) :
|
827 |
-
echo '<p>' . __('Last WP-Cron Daily Execution') . ': ' . gmdate($datetime, get_option('wp_cron_daily_lastrun') + (get_option('gmt_offset') * 3600)) . '<br />';
|
828 |
-
echo __('Next WP-Cron Daily Execution') . ': ' . gmdate($datetime, (get_option('wp_cron_daily_lastrun') + (get_option('gmt_offset') * 3600) + 86400)) . '</p>';
|
829 |
endif;
|
830 |
?><form method="post" action="">
|
831 |
<table width="100%" cellpadding="5" cellspacing="5">
|
832 |
<tr><td align="center"><?php
|
833 |
-
echo __('Schedule: ');
|
834 |
if ( $cron_old ) :
|
835 |
$wp_cron_backup_schedule = get_option('wp_cron_backup_schedule');
|
836 |
-
$schedule = array(0 => __('None'), 1 => __('Daily'));
|
837 |
foreach ($schedule as $value => $name) {
|
838 |
echo ' <input type="radio" style="border:none;" name="cron_schedule"';
|
839 |
if ($wp_cron_backup_schedule == $value) {
|
840 |
echo ' checked="checked" ';
|
841 |
}
|
842 |
-
echo 'value="' . $value . '" /> ' . __($name);
|
843 |
}
|
844 |
elseif ( $cron ) :
|
845 |
echo apply_filters('wp_db_b_schedule_choices', wp_get_schedules() );
|
@@ -849,14 +869,14 @@ class wpdbBackup {
|
|
849 |
if (! is_email($cron_recipient)) {
|
850 |
$cron_recipient = get_option('admin_email');
|
851 |
}
|
852 |
-
echo __('Email backup to:') . ' <input type="text" name="cron_backup_recipient" size="20" value="' . $cron_recipient . '" />';
|
853 |
echo '</td></tr>';
|
854 |
$cron_tables = get_option('wp_cron_backup_tables');
|
855 |
if (! is_array($cron_tables)) {
|
856 |
$cron_tables = array();
|
857 |
}
|
858 |
if (count($other_tables) > 0) {
|
859 |
-
echo '<tr><td colspan="2" align="left">' . __('Tables to include:') . '<br />';
|
860 |
foreach ($other_tables as $table) {
|
861 |
echo '<input type="checkbox" ';
|
862 |
if (in_array($table, $cron_tables)) {
|
@@ -866,7 +886,7 @@ class wpdbBackup {
|
|
866 |
}
|
867 |
echo '</td></tr>';
|
868 |
}
|
869 |
-
echo '<tr><td colspan="2" align="center"><input type="hidden" name="wp_cron_backup_options" value="SET" /><input type="submit" name="submit" value="' . __('Submit') . '" /></td></tr></table></form>';
|
870 |
echo '</fieldset>';
|
871 |
endif; // end of wp_cron (legacy) section
|
872 |
|
@@ -889,12 +909,12 @@ class wpdbBackup {
|
|
889 |
$schedule_sorted = array();
|
890 |
foreach ( (array) $sort as $key => $value ) $schedule_sorted[$key] = $schedule[$key];
|
891 |
$menu = '<ul style="list-style: none; text-align: left">';
|
892 |
-
$schedule = array_merge( array( 'never' => array( 'interval' => 0, 'display' => __('Never') ) ),
|
893 |
(array) $schedule_sorted );
|
894 |
foreach ( $schedule as $name => $settings) {
|
895 |
$interval = (int) $settings['interval'];
|
896 |
if ( 0 == $interval && ! 'never' == $name ) continue;
|
897 |
-
$display = ( ! '' == $settings['display'] ) ? $settings['display'] : sprintf(__('%s seconds'),$interval);
|
898 |
$menu .= "<li><input type='radio' name='wp_cron_schedule' style='border:none;'";
|
899 |
if ($wp_cron_backup_schedule == $name) {
|
900 |
$menu .= ' checked="checked" ';
|
@@ -932,7 +952,7 @@ class wpdbBackup {
|
|
932 |
}
|
933 |
|
934 |
function add_sched_options($sched) {
|
935 |
-
$sched['weekly'] = array('interval' => 604800, 'display' => __('Once Weekly'));
|
936 |
return $sched;
|
937 |
}
|
938 |
|
@@ -942,13 +962,13 @@ class wpdbBackup {
|
|
942 |
|
943 |
function validate_file($file) {
|
944 |
if (false !== strpos($file, '..'))
|
945 |
-
die(__("Cheatin' uh ?"));
|
946 |
|
947 |
if (false !== strpos($file, './'))
|
948 |
-
die(__("Cheatin' uh ?"));
|
949 |
|
950 |
if (':' == substr($file, 1, 1))
|
951 |
-
die(__("Cheatin' uh ?"));
|
952 |
}
|
953 |
|
954 |
}
|
3 |
Plugin Name: WordPress Database Backup
|
4 |
Plugin URI: http://www.ilfilosofo.com/blog/wp-db-backup
|
5 |
Description: On-demand backup of your WordPress database. Navigate to <a href="edit.php?page=wp-db-backup.php">Manage → Backup</a> to get started.
|
6 |
+
Author: Austin Matzko
|
7 |
+
Author URI: http://www.ilfilosofo.com/blog/
|
8 |
+
Version: 2.0.2
|
9 |
+
|
10 |
+
Development continued from that done by Skippy (http://www.skippy.net/)
|
11 |
|
12 |
Much of this was modified from Mark Ghosh's One Click Backup, which
|
13 |
in turn was derived from phpMyAdmin.
|
14 |
|
15 |
Many thanks to Owen (http://asymptomatic.net/wp/) for his patch
|
16 |
http://dev.wp-plugins.org/ticket/219
|
17 |
+
|
18 |
+
Copyright 2007 Austin Matzko (email : if.website at gmail.com)
|
19 |
+
|
20 |
+
This program is free software; you can redistribute it and/or modify
|
21 |
+
it under the terms of the GNU General Public License as published by
|
22 |
+
the Free Software Foundation; either version 2 of the License, or
|
23 |
+
(at your option) any later version.
|
24 |
+
|
25 |
+
This program is distributed in the hope that it will be useful,
|
26 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
27 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
28 |
+
GNU General Public License for more details.
|
29 |
+
|
30 |
+
You should have received a copy of the GNU General Public License
|
31 |
+
along with this program; if not, write to the Free Software
|
32 |
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
33 |
*/
|
34 |
|
35 |
// CHANGE THIS IF YOU WANT TO USE A
|
55 |
|
56 |
function wpdbBackup() {
|
57 |
global $table_prefix, $wpdb;
|
58 |
+
load_plugin_textdomain('wp-db-backup');
|
59 |
add_action('wp_db_backup_cron', array(&$this, 'cron_backup'));
|
60 |
add_action('wp_cron_daily', array(&$this, 'wp_cron_daily'));
|
61 |
add_filter('cron_schedules', array(&$this, 'add_sched_options'));
|
71 |
$this->basename = preg_replace('/^.*wp-content[\\\\\/]plugins[\\\\\/]/', '', __FILE__);
|
72 |
|
73 |
if (isset($_POST['do_backup'])) {
|
74 |
+
if ( !$this->user_can_backup() ) die(__('You are not allowed to perform backups.','wp-db-backup'));
|
75 |
switch($_POST['do_backup']) {
|
76 |
case 'backup':
|
77 |
$this->perform_backup();
|
81 |
break;
|
82 |
}
|
83 |
} elseif (isset($_GET['fragment'] )) {
|
84 |
+
if ( !$this->user_can_backup() ) die(__('You are not allowed to perform backups.','wp-db-backup'));
|
85 |
add_action('init', array(&$this, 'init'));
|
86 |
} elseif (isset($_GET['backup'] )) {
|
87 |
+
if ( !$this->user_can_backup() ) die(__('You are not allowed to perform backups.','wp-db-backup'));
|
88 |
add_action('init', array(&$this, 'init'));
|
89 |
} else {
|
90 |
add_action('admin_menu', array(&$this, 'admin_menu'));
|
92 |
}
|
93 |
|
94 |
function init() {
|
95 |
+
if ( !$this->user_can_backup() ) die(__('You are not allowed to perform backups.','wp-db-backup'));
|
96 |
|
97 |
if (isset($_GET['backup'])) {
|
98 |
$via = isset($_GET['via']) ? $_GET['via'] : 'http';
|
114 |
}
|
115 |
}
|
116 |
echo '
|
117 |
+
alert("' . __('Backup Complete!','wp-db-backup') . '");
|
118 |
</script>
|
119 |
';
|
120 |
break;
|
141 |
|
142 |
echo "<div class='wrap'>";
|
143 |
//echo "<pre>" . print_r($_POST, 1) . "</pre>";
|
144 |
+
echo '<h2>' . __('Backup','wp-db-backup') . '</h2>
|
145 |
+
<fieldset class="options"><legend>' . __('Progress','wp-db-backup') . '</legend>
|
146 |
<p><strong>' .
|
147 |
+
__('DO NOT DO THE FOLLOWING AS IT WILL CAUSE YOUR BACKUP TO FAIL:','wp-db-backup').
|
148 |
'</strong></p>
|
149 |
<ol>
|
150 |
+
<li>'.__('Close this browser','wp-db-backup').'</li>
|
151 |
+
<li>'.__('Reload this page','wp-db-backup').'</li>
|
152 |
+
<li>'.__('Click the Stop or Back buttons in your browser','wp-db-backup').'</li>
|
153 |
</ol>
|
154 |
+
<p><strong>' . __('Progress:','wp-db-backup') . '</strong></p>
|
155 |
<div id="meterbox" style="height:11px;width:80%;padding:3px;border:1px solid #659fff;"><div id="meter" style="height:11px;background-color:#659fff;width:0%;text-align:center;font-size:6pt;"> </div></div>
|
156 |
<div id="progress_message"></div>
|
157 |
<div id="errors"></div>
|
194 |
switch($_POST['deliver']) {
|
195 |
case 'http':
|
196 |
echo '
|
197 |
+
setProgress("' . sprintf(__("Backup complete, preparing <a href=\\\"%s\\\">backup</a> for download...",'wp-db-backup'), $download_uri) . '");
|
198 |
fram.src = "' . $download_uri . '";
|
199 |
';
|
200 |
break;
|
201 |
case 'smtp':
|
202 |
echo '
|
203 |
+
setProgress("' . sprintf(__("Backup complete, sending <a href=\\\"%s\\\">backup</a> via email...",'wp-db-backup'), $download_uri) . '");
|
204 |
fram.src = "' . $download_uri . '&via=email&recipient=' . $_POST['backup_recipient'] . '";
|
205 |
';
|
206 |
break;
|
207 |
default:
|
208 |
echo '
|
209 |
+
setProgress("' . sprintf(__("Backup complete, download <a href=\\\"%s\\\">here</a>.",'wp-db-backup'), $download_uri) . '");
|
210 |
';
|
211 |
}
|
212 |
|
258 |
echo "$table:$segment:$filename";
|
259 |
|
260 |
if($table == '') {
|
261 |
+
$msg = __('Creating backup file...','wp-db-backup');
|
262 |
} else {
|
263 |
if($segment == -1) {
|
264 |
+
$msg = sprintf(__('Finished backing up table \\"%s\\".','wp-db-backup'), $table);
|
265 |
} else {
|
266 |
+
$msg = sprintf(__('Backing up table \\"%s\\"...','wp-db-backup'), $table);
|
267 |
}
|
268 |
}
|
269 |
|
275 |
if (is_writable(ABSPATH . $this->backup_dir)) {
|
276 |
$this->fp = $this->open(ABSPATH . $this->backup_dir . $filename, 'a');
|
277 |
if(!$this->fp) {
|
278 |
+
$this->backup_error(__('Could not open the backup file for writing!','wp-db-backup'));
|
279 |
+
$this->fatal_error = __('The backup file could not be saved. Please check the permissions for writing to your backup directory and try again.','wp-db-backup');
|
280 |
}
|
281 |
else {
|
282 |
if($table == '') {
|
301 |
}
|
302 |
}
|
303 |
} else {
|
304 |
+
$this->backup_error(__('The backup directory is not writeable!','wp-db-backup'));
|
305 |
+
$this->fatal_error = __('The backup directory is not writeable! Please check the permissions for writing to your backup directory and try again.','wp-db-backup');
|
306 |
}
|
307 |
|
308 |
if($this->fp) $this->close($this->fp);
|
350 |
}
|
351 |
|
352 |
function admin_menu() {
|
353 |
+
add_management_page(__('Backup','wp-db-backup'), __('Backup','wp-db-backup'), 'import', basename(__FILE__), array(&$this, 'backup_menu'));
|
354 |
}
|
355 |
|
356 |
function fragment_menu() {
|
357 |
+
add_management_page(__('Backup','wp-db-backup'), __('Backup','wp-db-backup'), 'import', basename(__FILE__), array(&$this, 'build_backup_script'));
|
358 |
}
|
359 |
|
360 |
function sql_addslashes($a_string = '', $is_like = FALSE) {
|
414 |
function stow($query_line) {
|
415 |
if ($this->gzip()) {
|
416 |
if(@gzwrite($this->fp, $query_line) === FALSE) {
|
417 |
+
backup_error(__('There was an error writing a line to the backup script:','wp-db-backup'));
|
418 |
backup_error(' ' . $query_line);
|
419 |
}
|
420 |
} else {
|
421 |
if(@fwrite($this->fp, $query_line) === FALSE) {
|
422 |
+
backup_error(__('There was an error writing a line to the backup script:','wp-db-backup'));
|
423 |
backup_error(' ' . $query_line);
|
424 |
}
|
425 |
}
|
429 |
if(count($this->backup_errors) < 20) {
|
430 |
$this->backup_errors[] = $err;
|
431 |
} elseif(count($this->backup_errors) == 20) {
|
432 |
+
$this->backup_errors[] = __('Subsequent errors have been omitted from this log.','wp-db-backup');
|
433 |
}
|
434 |
}
|
435 |
|
447 |
|
448 |
$table_structure = $wpdb->get_results("DESCRIBE $table");
|
449 |
if (! $table_structure) {
|
450 |
+
backup_error(__('Error getting table details','wp-db-backup') . ": $table");
|
451 |
return FALSE;
|
452 |
}
|
453 |
|
470 |
|
471 |
$create_table = $wpdb->get_results("SHOW CREATE TABLE $table", ARRAY_N);
|
472 |
if (FALSE === $create_table) {
|
473 |
+
$this->backup_error(sprintf(__("Error with SHOW CREATE TABLE for %s.",'wp-db-backup'), $table));
|
474 |
$this->stow("#\n# Error with SHOW CREATE TABLE for $table!\n#\n");
|
475 |
}
|
476 |
$this->stow($create_table[0][1] . ' ;');
|
477 |
|
478 |
if (FALSE === $table_structure) {
|
479 |
+
$this->backup_error(sprintf(__("Error getting table structure of %s",'wp-db-backup'), $table));
|
480 |
$this->stow("#\n# Error getting table structure of $table!\n#\n");
|
481 |
}
|
482 |
|
583 |
if (is_writable(ABSPATH . $this->backup_dir)) {
|
584 |
$this->fp = $this->open(ABSPATH . $this->backup_dir . $wp_backup_filename);
|
585 |
if(!$this->fp) {
|
586 |
+
$this->backup_error(__('Could not open the backup file for writing!','wp-db-backup'));
|
587 |
return false;
|
588 |
}
|
589 |
} else {
|
590 |
+
$this->backup_error(__('The backup directory is not writeable!','wp-db-backup'));
|
591 |
return false;
|
592 |
}
|
593 |
|
630 |
$diskfile = ABSPATH . $this->backup_dir . $filename;
|
631 |
if ('http' == $delivery) {
|
632 |
if (! file_exists($diskfile)) {
|
633 |
+
$msg = sprintf(__('File not found:%s','wp-db-backup'), "<br /><strong>$filename</strong><br />");
|
634 |
$this_basename = preg_replace('/^.*wp-content[\\\\\/]plugins[\\\\\/]/', '', __FILE__);
|
635 |
+
$msg .= '<br /><a href="' . get_option('siteurl') . "/wp-admin/edit.php?page={$this_basename}" . '">' . __('Return to Backup','wp-db-backup');
|
636 |
die($msg);
|
637 |
}
|
638 |
header('Content-Description: File Transfer');
|
657 |
$headers .= "Content-Type: multipart/mixed; boundary=\"$boundary\"\n";
|
658 |
$headers .= 'From: ' . get_option('admin_email') . "\n";
|
659 |
|
660 |
+
$message = sprintf(__("Attached to this email is\n %1s\n Size:%2s kilobytes\n",'wp-db-backup'), $filename, round(filesize($diskfile)/1024));
|
661 |
// Add a multipart boundary above the plain message
|
662 |
$message = "This is a multi-part message in MIME format.\n\n" .
|
663 |
"--{$boundary}\n" .
|
676 |
"--{$boundary}--\n";
|
677 |
|
678 |
if (function_exists('wp_mail')) {
|
679 |
+
wp_mail ($recipient, get_bloginfo('name') . ' ' . __('Database Backup','wp-db-backup'), $message, $headers);
|
680 |
} else {
|
681 |
+
mail ($recipient, get_bloginfo('name') . ' ' . __('Database Backup','wp-db-backup'), $message, $headers);
|
682 |
}
|
683 |
|
684 |
unlink($diskfile);
|
693 |
|
694 |
// did we just do a backup? If so, let's report the status
|
695 |
if ( $this->backup_complete ) {
|
696 |
+
$feedback = '<div class="updated"><p>' . __('Backup Successful','wp-db-backup') . '!';
|
697 |
$file = $this->backup_file;
|
698 |
switch($_POST['deliver']) {
|
699 |
case 'http':
|
700 |
+
$feedback .= '<br />' . sprintf(__('Your backup file: <a href="%1s">%2s</a> should begin downloading shortly.','wp-db-backup'), get_option('siteurl') . "/{$this->backup_dir}{$this->backup_file}", $this->backup_file);
|
701 |
break;
|
702 |
case 'smtp':
|
703 |
if (! is_email($_POST['backup_recipient'])) {
|
705 |
} else {
|
706 |
$feedback .= $_POST['backup_recipient'];
|
707 |
}
|
708 |
+
$feedback = '<br />' . sprintf(__('Your backup has been emailed to %s','wp-db-backup'), $feedback);
|
709 |
break;
|
710 |
case 'none':
|
711 |
+
$feedback .= '<br />' . __('Your backup file has been saved on the server. If you would like to download it now, right click and select "Save As"','wp-db-backup');
|
712 |
+
$feedback .= ':<br /> <a href="' . get_option('siteurl') . "/{$this->backup_dir}$file\">$file</a> : " . sprintf(__('%s bytes','wp-db-backup'), filesize(ABSPATH . $this->backup_dir . $file));
|
713 |
}
|
714 |
$feedback .= '</p></div>';
|
715 |
}
|
716 |
|
717 |
if (count($this->backup_errors)) {
|
718 |
+
$feedback .= '<div class="updated error">' . __('The following errors were reported:','wp-db-backup') . "<pre>";
|
719 |
foreach($this->backup_errors as $error) {
|
720 |
$feedback .= "{$error}\n"; //Errors are already localized
|
721 |
}
|
743 |
if (is_email($_POST['cron_backup_recipient'])) {
|
744 |
update_option('wp_cron_backup_recipient', $_POST['cron_backup_recipient'], FALSE);
|
745 |
}
|
746 |
+
$feedback .= '<div class="updated"><p>' . __('Scheduled Backup Options Saved!','wp-db-backup') . '</p></div>';
|
747 |
endif;
|
748 |
|
749 |
$other_tables = array();
|
769 |
if ( @ mkdir( ABSPATH . $this->backup_dir) ) {
|
770 |
@ chmod( ABSPATH . $this->backup_dir, $dir_perms);
|
771 |
} else {
|
772 |
+
echo '<div class="updated error"><p align="center">' . __('WARNING: Your wp-content directory is <strong>NOT</strong> writable! We can not create the backup directory.','wp-db-backup') . '<br />' . ABSPATH . $this->backup_dir . "</p></div>";
|
773 |
$WHOOPS = TRUE;
|
774 |
}
|
775 |
}
|
776 |
|
777 |
if ( !is_writable( ABSPATH . $this->backup_dir) ) {
|
778 |
+
echo '<div class="updated error"><p align="center">' . __('WARNING: Your backup directory is <strong>NOT</strong> writable! We can not create the backup directory.','wp-db-backup') . '<br />' . ABSPATH . "</p></div>";
|
779 |
}
|
780 |
|
781 |
if ( !file_exists( ABSPATH . $this->backup_dir . 'index.php') ) {
|
783 |
}
|
784 |
|
785 |
?><div class='wrap'>
|
786 |
+
<h2><?php _e('Backup','wp-db-backup') ?></h2>
|
787 |
<form method="post" action="">
|
788 |
+
<fieldset class="options"><legend><?php _e('Tables','wp-db-backup') ?></legend>
|
789 |
<table align="center" cellspacing="5" cellpadding="5"><tr><td width="50%" align="left" class="alternate" valign="top">
|
790 |
+
<?php _e('These core WordPress tables will always be backed up:','wp-db-backup') ?><br /><ul><?php
|
791 |
foreach ($wp_backup_default_tables as $table) {
|
792 |
echo "<li><input type='hidden' name='core_tables[]' value='$table' />$table</li>";
|
793 |
}
|
794 |
?></ul></td><td width="50%" align="left" valign="top"><?php
|
795 |
if (count($other_tables) > 0) {
|
796 |
+
echo __('You may choose to include any of the following tables:','wp-db-backup') . ' <br />';
|
797 |
foreach ($other_tables as $table) {
|
798 |
echo "<label style=\"display:block;\"><input type='checkbox' name='other_tables[]' value='{$table}' /> {$table}</label>";
|
799 |
}
|
800 |
}
|
801 |
?></td></tr></table></fieldset>
|
802 |
+
<fieldset class="options"><legend><?php _e('Backup Options','wp-db-backup') ?></legend>
|
803 |
+
<?php _e('What to do with the backup file:','wp-db-backup') ?><br />
|
804 |
<label for="do_save" style="display:block;"><input type="radio" id="do_save" name="deliver" value="none" style="border:none;" />
|
805 |
+
<?php echo __('Save to server','wp-db-backup') . " ({$this->backup_dir})</label>";
|
806 |
?><label for="do_download" style="display:block;"><input type="radio" checked="checked" id="do_download" name="deliver" value="http" style="border:none;" />
|
807 |
+
<?php _e('Download to your computer','wp-db-backup') ?></label>
|
808 |
<label for="do_email"><input type="radio" name="deliver" id="do_email" value="smtp" style="border:none;" />
|
809 |
+
<?php _e('Email backup to:','wp-db-backup') ?></label><input type="text" name="backup_recipient" size="20" value="<?php echo get_option('admin_email') ?>" />
|
810 |
|
811 |
<?php
|
812 |
// Check DB dize.
|
825 |
|
826 |
if (! $WHOOPS) {
|
827 |
echo '<input type="hidden" name="do_backup" id="do_backup" value="backup" />';
|
828 |
+
echo '<p class="submit"><input type="submit" name="submit" onclick="document.getElementById(\'do_backup\').value=\'fragments\';" value="' . __('Backup','wp-db-backup') . '!" /></p>';
|
829 |
} else {
|
830 |
+
echo '<p class="alternate">' . __('WARNING: Your backup directory is <strong>NOT</strong> writable!','wp-db-backup') . '</p>';
|
831 |
}
|
832 |
echo '</fieldset>';
|
833 |
echo '</form>';
|
836 |
$cron = ( function_exists('wp_schedule_event') ) ? true : false; // wp-cron in WP 2.1+
|
837 |
$cron_old = ( function_exists('wp_cron_init') && ! $cron ) ? true : false; // wp-cron plugin by Skippy
|
838 |
if ( $cron_old || $cron ) :
|
839 |
+
echo '<fieldset class="options"><legend>' . __('Scheduled Backup','wp-db-backup') . '</legend>';
|
840 |
$datetime = get_option('date_format') . ' @ ' . get_option('time_format');
|
841 |
if ( $cron ) :
|
842 |
if ( ! ( 'never' == $this->get_sched() ) ) :
|
843 |
+
echo '<p>' . __('Next Backup','wp-db-backup') . ': ';
|
844 |
echo gmdate($datetime, wp_next_scheduled('wp_db_backup_cron') + (get_option('gmt_offset') * 3600)) . '</p>';
|
845 |
endif;
|
846 |
elseif ( $cron_old ) :
|
847 |
+
echo '<p>' . __('Last WP-Cron Daily Execution','wp-db-backup') . ': ' . gmdate($datetime, get_option('wp_cron_daily_lastrun') + (get_option('gmt_offset') * 3600)) . '<br />';
|
848 |
+
echo __('Next WP-Cron Daily Execution','wp-db-backup') . ': ' . gmdate($datetime, (get_option('wp_cron_daily_lastrun') + (get_option('gmt_offset') * 3600) + 86400)) . '</p>';
|
849 |
endif;
|
850 |
?><form method="post" action="">
|
851 |
<table width="100%" cellpadding="5" cellspacing="5">
|
852 |
<tr><td align="center"><?php
|
853 |
+
echo __('Schedule: ','wp-db-backup');
|
854 |
if ( $cron_old ) :
|
855 |
$wp_cron_backup_schedule = get_option('wp_cron_backup_schedule');
|
856 |
+
$schedule = array(0 => __('None','wp-db-backup'), 1 => __('Daily','wp-db-backup'));
|
857 |
foreach ($schedule as $value => $name) {
|
858 |
echo ' <input type="radio" style="border:none;" name="cron_schedule"';
|
859 |
if ($wp_cron_backup_schedule == $value) {
|
860 |
echo ' checked="checked" ';
|
861 |
}
|
862 |
+
echo 'value="' . $value . '" /> ' . __($name,'wp-db-backup');
|
863 |
}
|
864 |
elseif ( $cron ) :
|
865 |
echo apply_filters('wp_db_b_schedule_choices', wp_get_schedules() );
|
869 |
if (! is_email($cron_recipient)) {
|
870 |
$cron_recipient = get_option('admin_email');
|
871 |
}
|
872 |
+
echo __('Email backup to:','wp-db-backup') . ' <input type="text" name="cron_backup_recipient" size="20" value="' . $cron_recipient . '" />';
|
873 |
echo '</td></tr>';
|
874 |
$cron_tables = get_option('wp_cron_backup_tables');
|
875 |
if (! is_array($cron_tables)) {
|
876 |
$cron_tables = array();
|
877 |
}
|
878 |
if (count($other_tables) > 0) {
|
879 |
+
echo '<tr><td colspan="2" align="left">' . __('Tables to include:','wp-db-backup') . '<br />';
|
880 |
foreach ($other_tables as $table) {
|
881 |
echo '<input type="checkbox" ';
|
882 |
if (in_array($table, $cron_tables)) {
|
886 |
}
|
887 |
echo '</td></tr>';
|
888 |
}
|
889 |
+
echo '<tr><td colspan="2" align="center"><input type="hidden" name="wp_cron_backup_options" value="SET" /><input type="submit" name="submit" value="' . __('Submit','wp-db-backup') . '" /></td></tr></table></form>';
|
890 |
echo '</fieldset>';
|
891 |
endif; // end of wp_cron (legacy) section
|
892 |
|
909 |
$schedule_sorted = array();
|
910 |
foreach ( (array) $sort as $key => $value ) $schedule_sorted[$key] = $schedule[$key];
|
911 |
$menu = '<ul style="list-style: none; text-align: left">';
|
912 |
+
$schedule = array_merge( array( 'never' => array( 'interval' => 0, 'display' => __('Never','wp-db-backup') ) ),
|
913 |
(array) $schedule_sorted );
|
914 |
foreach ( $schedule as $name => $settings) {
|
915 |
$interval = (int) $settings['interval'];
|
916 |
if ( 0 == $interval && ! 'never' == $name ) continue;
|
917 |
+
$display = ( ! '' == $settings['display'] ) ? $settings['display'] : sprintf(__('%s seconds','wp-db-backup'),$interval);
|
918 |
$menu .= "<li><input type='radio' name='wp_cron_schedule' style='border:none;'";
|
919 |
if ($wp_cron_backup_schedule == $name) {
|
920 |
$menu .= ' checked="checked" ';
|
952 |
}
|
953 |
|
954 |
function add_sched_options($sched) {
|
955 |
+
$sched['weekly'] = array('interval' => 604800, 'display' => __('Once Weekly','wp-db-backup'));
|
956 |
return $sched;
|
957 |
}
|
958 |
|
962 |
|
963 |
function validate_file($file) {
|
964 |
if (false !== strpos($file, '..'))
|
965 |
+
die(__("Cheatin' uh ?",'wp-db-backup'));
|
966 |
|
967 |
if (false !== strpos($file, './'))
|
968 |
+
die(__("Cheatin' uh ?",'wp-db-backup'));
|
969 |
|
970 |
if (':' == substr($file, 1, 1))
|
971 |
+
die(__("Cheatin' uh ?",'wp-db-backup'));
|
972 |
}
|
973 |
|
974 |
}
|
wp-db-backup.po
ADDED
@@ -0,0 +1,280 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: wp-db-backup 2.0.1\n"
|
4 |
+
"POT-Creation-Date: \n"
|
5 |
+
"PO-Revision-Date: 2007-02-09 08:09-0500\n"
|
6 |
+
"Last-Translator: Austin Matzko <if.website@gmail.com>\n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
12 |
+
"X-Poedit-Basepath: .\n"
|
13 |
+
"X-Poedit-SearchPath-0: trunk\n"
|
14 |
+
|
15 |
+
#: wp-db-backup.php:55
|
16 |
+
#: wp-db-backup.php:65
|
17 |
+
#: wp-db-backup.php:68
|
18 |
+
#: wp-db-backup.php:76
|
19 |
+
msgid "You are not allowed to perform backups."
|
20 |
+
msgstr ""
|
21 |
+
|
22 |
+
#: wp-db-backup.php:98
|
23 |
+
msgid "Backup Complete!"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: wp-db-backup.php:125
|
27 |
+
#: wp-db-backup.php:334
|
28 |
+
#: wp-db-backup.php:338
|
29 |
+
#: wp-db-backup.php:767
|
30 |
+
#: wp-db-backup.php:809
|
31 |
+
msgid "Backup"
|
32 |
+
msgstr ""
|
33 |
+
|
34 |
+
#: wp-db-backup.php:126
|
35 |
+
msgid "Progress"
|
36 |
+
msgstr ""
|
37 |
+
|
38 |
+
#: wp-db-backup.php:128
|
39 |
+
msgid "DO NOT DO THE FOLLOWING AS IT WILL CAUSE YOUR BACKUP TO FAIL:"
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: wp-db-backup.php:131
|
43 |
+
msgid "Close this browser"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: wp-db-backup.php:132
|
47 |
+
msgid "Reload this page"
|
48 |
+
msgstr ""
|
49 |
+
|
50 |
+
#: wp-db-backup.php:133
|
51 |
+
msgid "Click the Stop or Back buttons in your browser"
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: wp-db-backup.php:135
|
55 |
+
msgid "Progress:"
|
56 |
+
msgstr ""
|
57 |
+
|
58 |
+
#: wp-db-backup.php:178
|
59 |
+
#, php-format
|
60 |
+
msgid "Backup complete, preparing <a href=\\\"%s\\\">backup</a> for download..."
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#: wp-db-backup.php:184
|
64 |
+
#, php-format
|
65 |
+
msgid "Backup complete, sending <a href=\\\"%s\\\">backup</a> via email..."
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: wp-db-backup.php:190
|
69 |
+
#, php-format
|
70 |
+
msgid "Backup complete, download <a href=\\\"%s\\\">here</a>."
|
71 |
+
msgstr ""
|
72 |
+
|
73 |
+
#: wp-db-backup.php:242
|
74 |
+
msgid "Creating backup file..."
|
75 |
+
msgstr ""
|
76 |
+
|
77 |
+
#: wp-db-backup.php:245
|
78 |
+
#, php-format
|
79 |
+
msgid "Finished backing up table \\\"%s\\\"."
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#: wp-db-backup.php:247
|
83 |
+
#, php-format
|
84 |
+
msgid "Backing up table \\\"%s\\\"..."
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: wp-db-backup.php:259
|
88 |
+
#: wp-db-backup.php:567
|
89 |
+
msgid "Could not open the backup file for writing!"
|
90 |
+
msgstr ""
|
91 |
+
|
92 |
+
#: wp-db-backup.php:260
|
93 |
+
msgid "The backup file could not be saved. Please check the permissions for writing to your backup directory and try again."
|
94 |
+
msgstr ""
|
95 |
+
|
96 |
+
#: wp-db-backup.php:285
|
97 |
+
#: wp-db-backup.php:571
|
98 |
+
msgid "The backup directory is not writeable!"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: wp-db-backup.php:286
|
102 |
+
msgid "The backup directory is not writeable! Please check the permissions for writing to your backup directory and try again."
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: wp-db-backup.php:398
|
106 |
+
#: wp-db-backup.php:403
|
107 |
+
msgid "There was an error writing a line to the backup script:"
|
108 |
+
msgstr ""
|
109 |
+
|
110 |
+
#: wp-db-backup.php:413
|
111 |
+
msgid "Subsequent errors have been omitted from this log."
|
112 |
+
msgstr ""
|
113 |
+
|
114 |
+
#: wp-db-backup.php:431
|
115 |
+
msgid "Error getting table details"
|
116 |
+
msgstr ""
|
117 |
+
|
118 |
+
#: wp-db-backup.php:454
|
119 |
+
#, php-format
|
120 |
+
msgid "Error with SHOW CREATE TABLE for %s."
|
121 |
+
msgstr ""
|
122 |
+
|
123 |
+
#: wp-db-backup.php:460
|
124 |
+
#, php-format
|
125 |
+
msgid "Error getting table structure of %s"
|
126 |
+
msgstr ""
|
127 |
+
|
128 |
+
#: wp-db-backup.php:614
|
129 |
+
#, php-format
|
130 |
+
msgid "File not found:%s"
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: wp-db-backup.php:616
|
134 |
+
msgid "Return to Backup"
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: wp-db-backup.php:641
|
138 |
+
#, php-format
|
139 |
+
msgid ""
|
140 |
+
"Attached to this email is\n"
|
141 |
+
" %1s\n"
|
142 |
+
" Size:%2s kilobytes\n"
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: wp-db-backup.php:660
|
146 |
+
#: wp-db-backup.php:662
|
147 |
+
msgid "Database Backup"
|
148 |
+
msgstr ""
|
149 |
+
|
150 |
+
#: wp-db-backup.php:677
|
151 |
+
msgid "Backup Successful"
|
152 |
+
msgstr ""
|
153 |
+
|
154 |
+
#: wp-db-backup.php:681
|
155 |
+
#, php-format
|
156 |
+
msgid "Your backup file: <a href=\"%1s\">%2s</a> should begin downloading shortly."
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: wp-db-backup.php:689
|
160 |
+
#, php-format
|
161 |
+
msgid "Your backup has been emailed to %s"
|
162 |
+
msgstr ""
|
163 |
+
|
164 |
+
#: wp-db-backup.php:692
|
165 |
+
msgid "Your backup file has been saved on the server. If you would like to download it now, right click and select \"Save As\""
|
166 |
+
msgstr ""
|
167 |
+
|
168 |
+
#: wp-db-backup.php:693
|
169 |
+
#, php-format
|
170 |
+
msgid "%s bytes"
|
171 |
+
msgstr ""
|
172 |
+
|
173 |
+
#: wp-db-backup.php:699
|
174 |
+
msgid "The following errors were reported:"
|
175 |
+
msgstr ""
|
176 |
+
|
177 |
+
#: wp-db-backup.php:727
|
178 |
+
msgid "Scheduled Backup Options Saved!"
|
179 |
+
msgstr ""
|
180 |
+
|
181 |
+
#: wp-db-backup.php:753
|
182 |
+
msgid "WARNING: Your wp-content directory is <strong>NOT</strong> writable! We can not create the backup directory."
|
183 |
+
msgstr ""
|
184 |
+
|
185 |
+
#: wp-db-backup.php:759
|
186 |
+
msgid "WARNING: Your backup directory is <strong>NOT</strong> writable! We can not create the backup directory."
|
187 |
+
msgstr ""
|
188 |
+
|
189 |
+
#: wp-db-backup.php:769
|
190 |
+
msgid "Tables"
|
191 |
+
msgstr ""
|
192 |
+
|
193 |
+
#: wp-db-backup.php:771
|
194 |
+
msgid "These core WordPress tables will always be backed up:"
|
195 |
+
msgstr ""
|
196 |
+
|
197 |
+
#: wp-db-backup.php:777
|
198 |
+
msgid "You may choose to include any of the following tables:"
|
199 |
+
msgstr ""
|
200 |
+
|
201 |
+
#: wp-db-backup.php:783
|
202 |
+
msgid "Backup Options"
|
203 |
+
msgstr ""
|
204 |
+
|
205 |
+
#: wp-db-backup.php:784
|
206 |
+
msgid "What to do with the backup file:"
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: wp-db-backup.php:786
|
210 |
+
msgid "Save to server"
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: wp-db-backup.php:788
|
214 |
+
msgid "Download to your computer"
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
#: wp-db-backup.php:790
|
218 |
+
#: wp-db-backup.php:853
|
219 |
+
msgid "Email backup to:"
|
220 |
+
msgstr ""
|
221 |
+
|
222 |
+
#: wp-db-backup.php:811
|
223 |
+
msgid "WARNING: Your backup directory is <strong>NOT</strong> writable!"
|
224 |
+
msgstr ""
|
225 |
+
|
226 |
+
#: wp-db-backup.php:820
|
227 |
+
msgid "Scheduled Backup"
|
228 |
+
msgstr ""
|
229 |
+
|
230 |
+
#: wp-db-backup.php:824
|
231 |
+
msgid "Next Backup"
|
232 |
+
msgstr ""
|
233 |
+
|
234 |
+
#: wp-db-backup.php:828
|
235 |
+
msgid "Last WP-Cron Daily Execution"
|
236 |
+
msgstr ""
|
237 |
+
|
238 |
+
#: wp-db-backup.php:829
|
239 |
+
msgid "Next WP-Cron Daily Execution"
|
240 |
+
msgstr ""
|
241 |
+
|
242 |
+
#: wp-db-backup.php:834
|
243 |
+
msgid "Schedule: "
|
244 |
+
msgstr ""
|
245 |
+
|
246 |
+
#: wp-db-backup.php:837
|
247 |
+
msgid "None"
|
248 |
+
msgstr ""
|
249 |
+
|
250 |
+
#: wp-db-backup.php:837
|
251 |
+
msgid "Daily"
|
252 |
+
msgstr ""
|
253 |
+
|
254 |
+
#: wp-db-backup.php:860
|
255 |
+
msgid "Tables to include:"
|
256 |
+
msgstr ""
|
257 |
+
|
258 |
+
#: wp-db-backup.php:870
|
259 |
+
msgid "Submit"
|
260 |
+
msgstr ""
|
261 |
+
|
262 |
+
#: wp-db-backup.php:893
|
263 |
+
msgid "Never"
|
264 |
+
msgstr ""
|
265 |
+
|
266 |
+
#: wp-db-backup.php:898
|
267 |
+
#, php-format
|
268 |
+
msgid "%s seconds"
|
269 |
+
msgstr ""
|
270 |
+
|
271 |
+
#: wp-db-backup.php:936
|
272 |
+
msgid "Once Weekly"
|
273 |
+
msgstr ""
|
274 |
+
|
275 |
+
#: wp-db-backup.php:946
|
276 |
+
#: wp-db-backup.php:949
|
277 |
+
#: wp-db-backup.php:952
|
278 |
+
msgid "Cheatin' uh ?"
|
279 |
+
msgstr ""
|
280 |
+
|
wp-db-backup.pot
CHANGED
@@ -1,235 +1,280 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
-
"Project-Id-Version: wp-db-backup 1
|
4 |
"POT-Creation-Date: \n"
|
5 |
-
"PO-Revision-Date:
|
6 |
-
"Last-Translator:
|
7 |
-
"Language-Team:
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"X-Poedit-Language: English\n"
|
12 |
-
"X-Poedit-Country: United States\n"
|
13 |
"X-Poedit-KeywordsList: __;_e\n"
|
14 |
"X-Poedit-Basepath: .\n"
|
15 |
-
"X-Poedit-SearchPath-0:
|
16 |
|
17 |
-
#: wp-db-backup.php:
|
18 |
-
|
|
|
|
|
|
|
19 |
msgstr ""
|
20 |
|
21 |
-
#: wp-db-backup.php:
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
msgid "Backup"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: wp-db-backup.php:
|
28 |
msgid "Progress"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: wp-db-backup.php:
|
32 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: wp-db-backup.php:
|
|
|
|
|
|
|
|
|
36 |
msgid "Progress:"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: wp-db-backup.php:
|
40 |
#, php-format
|
41 |
msgid "Backup complete, preparing <a href=\\\"%s\\\">backup</a> for download..."
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: wp-db-backup.php:
|
45 |
#, php-format
|
46 |
msgid "Backup complete, sending <a href=\\\"%s\\\">backup</a> via email..."
|
47 |
msgstr ""
|
48 |
|
49 |
-
#: wp-db-backup.php:
|
50 |
#, php-format
|
51 |
msgid "Backup complete, download <a href=\\\"%s\\\">here</a>."
|
52 |
msgstr ""
|
53 |
|
54 |
-
#: wp-db-backup.php:
|
55 |
msgid "Creating backup file..."
|
56 |
msgstr ""
|
57 |
|
58 |
-
#: wp-db-backup.php:
|
59 |
#, php-format
|
60 |
msgid "Finished backing up table \\\"%s\\\"."
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: wp-db-backup.php:
|
64 |
#, php-format
|
65 |
msgid "Backing up table \\\"%s\\\"..."
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: wp-db-backup.php:
|
69 |
-
#: wp-db-backup.php:
|
70 |
msgid "Could not open the backup file for writing!"
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: wp-db-backup.php:
|
74 |
-
|
|
|
|
|
|
|
|
|
75 |
msgid "The backup directory is not writeable!"
|
76 |
msgstr ""
|
77 |
|
78 |
-
#: wp-db-backup.php:
|
79 |
-
|
|
|
|
|
|
|
|
|
80 |
msgid "There was an error writing a line to the backup script:"
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: wp-db-backup.php:
|
84 |
msgid "Subsequent errors have been omitted from this log."
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: wp-db-backup.php:
|
88 |
msgid "Error getting table details"
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: wp-db-backup.php:
|
92 |
#, php-format
|
93 |
msgid "Error with SHOW CREATE TABLE for %s."
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: wp-db-backup.php:
|
97 |
#, php-format
|
98 |
msgid "Error getting table structure of %s"
|
99 |
msgstr ""
|
100 |
|
101 |
-
#: wp-db-backup.php:
|
102 |
-
|
|
|
103 |
msgstr ""
|
104 |
|
105 |
-
#: wp-db-backup.php:
|
106 |
msgid "Return to Backup"
|
107 |
msgstr ""
|
108 |
|
109 |
-
#: wp-db-backup.php:
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
msgstr ""
|
116 |
-
|
117 |
-
#: wp-db-backup.php:623
|
118 |
-
msgid "kilobytes"
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: wp-db-backup.php:
|
|
|
122 |
msgid "Database Backup"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: wp-db-backup.php:
|
126 |
msgid "Backup Successful"
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: wp-db-backup.php:
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
#: wp-db-backup.php:660
|
134 |
-
msgid "should begin downloading shortly."
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: wp-db-backup.php:
|
138 |
#, php-format
|
139 |
msgid "Your backup has been emailed to %s"
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: wp-db-backup.php:
|
143 |
msgid "Your backup file has been saved on the server. If you would like to download it now, right click and select \"Save As\""
|
144 |
msgstr ""
|
145 |
|
146 |
-
#: wp-db-backup.php:
|
147 |
-
|
|
|
148 |
msgstr ""
|
149 |
|
150 |
-
#: wp-db-backup.php:
|
151 |
-
msgid "The following errors were reported"
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: wp-db-backup.php:
|
155 |
msgid "Scheduled Backup Options Saved!"
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: wp-db-backup.php:
|
159 |
-
msgid "WARNING: Your
|
160 |
msgstr ""
|
161 |
|
162 |
-
#: wp-db-backup.php:
|
163 |
-
|
164 |
-
msgid "WARNING: Your backup directory is <strong>NOT</strong> writable!"
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: wp-db-backup.php:
|
168 |
msgid "Tables"
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: wp-db-backup.php:
|
172 |
-
msgid "These core WordPress tables will always be backed up"
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: wp-db-backup.php:
|
176 |
-
msgid "You may choose to include any of the following tables"
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: wp-db-backup.php:
|
180 |
msgid "Backup Options"
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: wp-db-backup.php:
|
184 |
-
msgid "What to do with the backup file"
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: wp-db-backup.php:
|
188 |
msgid "Save to server"
|
189 |
msgstr ""
|
190 |
|
191 |
-
#: wp-db-backup.php:
|
192 |
msgid "Download to your computer"
|
193 |
msgstr ""
|
194 |
|
195 |
-
#: wp-db-backup.php:
|
196 |
-
|
197 |
-
msgid "
|
|
|
|
|
|
|
|
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: wp-db-backup.php:
|
201 |
msgid "Scheduled Backup"
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: wp-db-backup.php:
|
|
|
|
|
|
|
|
|
205 |
msgid "Last WP-Cron Daily Execution"
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: wp-db-backup.php:
|
209 |
msgid "Next WP-Cron Daily Execution"
|
210 |
msgstr ""
|
211 |
|
212 |
-
#: wp-db-backup.php:
|
213 |
msgid "Schedule: "
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: wp-db-backup.php:
|
217 |
msgid "None"
|
218 |
msgstr ""
|
219 |
|
220 |
-
#: wp-db-backup.php:
|
221 |
msgid "Daily"
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: wp-db-backup.php:
|
225 |
-
msgid "
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: wp-db-backup.php:
|
229 |
-
msgid "
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: wp-db-backup.php:
|
233 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
msgstr ""
|
235 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
+
"Project-Id-Version: wp-db-backup 2.0.1\n"
|
4 |
"POT-Creation-Date: \n"
|
5 |
+
"PO-Revision-Date: 2007-02-09 08:09-0500\n"
|
6 |
+
"Last-Translator: Austin Matzko <if.website@gmail.com>\n"
|
7 |
+
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
|
11 |
"X-Poedit-KeywordsList: __;_e\n"
|
12 |
"X-Poedit-Basepath: .\n"
|
13 |
+
"X-Poedit-SearchPath-0: trunk\n"
|
14 |
|
15 |
+
#: wp-db-backup.php:55
|
16 |
+
#: wp-db-backup.php:65
|
17 |
+
#: wp-db-backup.php:68
|
18 |
+
#: wp-db-backup.php:76
|
19 |
+
msgid "You are not allowed to perform backups."
|
20 |
msgstr ""
|
21 |
|
22 |
+
#: wp-db-backup.php:98
|
23 |
+
msgid "Backup Complete!"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: wp-db-backup.php:125
|
27 |
+
#: wp-db-backup.php:334
|
28 |
+
#: wp-db-backup.php:338
|
29 |
+
#: wp-db-backup.php:767
|
30 |
+
#: wp-db-backup.php:809
|
31 |
msgid "Backup"
|
32 |
msgstr ""
|
33 |
|
34 |
+
#: wp-db-backup.php:126
|
35 |
msgid "Progress"
|
36 |
msgstr ""
|
37 |
|
38 |
+
#: wp-db-backup.php:128
|
39 |
+
msgid "DO NOT DO THE FOLLOWING AS IT WILL CAUSE YOUR BACKUP TO FAIL:"
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: wp-db-backup.php:131
|
43 |
+
msgid "Close this browser"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: wp-db-backup.php:132
|
47 |
+
msgid "Reload this page"
|
48 |
msgstr ""
|
49 |
|
50 |
+
#: wp-db-backup.php:133
|
51 |
+
msgid "Click the Stop or Back buttons in your browser"
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: wp-db-backup.php:135
|
55 |
msgid "Progress:"
|
56 |
msgstr ""
|
57 |
|
58 |
+
#: wp-db-backup.php:178
|
59 |
#, php-format
|
60 |
msgid "Backup complete, preparing <a href=\\\"%s\\\">backup</a> for download..."
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: wp-db-backup.php:184
|
64 |
#, php-format
|
65 |
msgid "Backup complete, sending <a href=\\\"%s\\\">backup</a> via email..."
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: wp-db-backup.php:190
|
69 |
#, php-format
|
70 |
msgid "Backup complete, download <a href=\\\"%s\\\">here</a>."
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: wp-db-backup.php:242
|
74 |
msgid "Creating backup file..."
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: wp-db-backup.php:245
|
78 |
#, php-format
|
79 |
msgid "Finished backing up table \\\"%s\\\"."
|
80 |
msgstr ""
|
81 |
|
82 |
+
#: wp-db-backup.php:247
|
83 |
#, php-format
|
84 |
msgid "Backing up table \\\"%s\\\"..."
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: wp-db-backup.php:259
|
88 |
+
#: wp-db-backup.php:567
|
89 |
msgid "Could not open the backup file for writing!"
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: wp-db-backup.php:260
|
93 |
+
msgid "The backup file could not be saved. Please check the permissions for writing to your backup directory and try again."
|
94 |
+
msgstr ""
|
95 |
+
|
96 |
+
#: wp-db-backup.php:285
|
97 |
+
#: wp-db-backup.php:571
|
98 |
msgid "The backup directory is not writeable!"
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: wp-db-backup.php:286
|
102 |
+
msgid "The backup directory is not writeable! Please check the permissions for writing to your backup directory and try again."
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: wp-db-backup.php:398
|
106 |
+
#: wp-db-backup.php:403
|
107 |
msgid "There was an error writing a line to the backup script:"
|
108 |
msgstr ""
|
109 |
|
110 |
+
#: wp-db-backup.php:413
|
111 |
msgid "Subsequent errors have been omitted from this log."
|
112 |
msgstr ""
|
113 |
|
114 |
+
#: wp-db-backup.php:431
|
115 |
msgid "Error getting table details"
|
116 |
msgstr ""
|
117 |
|
118 |
+
#: wp-db-backup.php:454
|
119 |
#, php-format
|
120 |
msgid "Error with SHOW CREATE TABLE for %s."
|
121 |
msgstr ""
|
122 |
|
123 |
+
#: wp-db-backup.php:460
|
124 |
#, php-format
|
125 |
msgid "Error getting table structure of %s"
|
126 |
msgstr ""
|
127 |
|
128 |
+
#: wp-db-backup.php:614
|
129 |
+
#, php-format
|
130 |
+
msgid "File not found:%s"
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: wp-db-backup.php:616
|
134 |
msgid "Return to Backup"
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: wp-db-backup.php:641
|
138 |
+
#, php-format
|
139 |
+
msgid ""
|
140 |
+
"Attached to this email is\n"
|
141 |
+
" %1s\n"
|
142 |
+
" Size:%2s kilobytes\n"
|
|
|
|
|
|
|
|
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: wp-db-backup.php:660
|
146 |
+
#: wp-db-backup.php:662
|
147 |
msgid "Database Backup"
|
148 |
msgstr ""
|
149 |
|
150 |
+
#: wp-db-backup.php:677
|
151 |
msgid "Backup Successful"
|
152 |
msgstr ""
|
153 |
|
154 |
+
#: wp-db-backup.php:681
|
155 |
+
#, php-format
|
156 |
+
msgid "Your backup file: <a href=\"%1s\">%2s</a> should begin downloading shortly."
|
|
|
|
|
|
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: wp-db-backup.php:689
|
160 |
#, php-format
|
161 |
msgid "Your backup has been emailed to %s"
|
162 |
msgstr ""
|
163 |
|
164 |
+
#: wp-db-backup.php:692
|
165 |
msgid "Your backup file has been saved on the server. If you would like to download it now, right click and select \"Save As\""
|
166 |
msgstr ""
|
167 |
|
168 |
+
#: wp-db-backup.php:693
|
169 |
+
#, php-format
|
170 |
+
msgid "%s bytes"
|
171 |
msgstr ""
|
172 |
|
173 |
+
#: wp-db-backup.php:699
|
174 |
+
msgid "The following errors were reported:"
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: wp-db-backup.php:727
|
178 |
msgid "Scheduled Backup Options Saved!"
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: wp-db-backup.php:753
|
182 |
+
msgid "WARNING: Your wp-content directory is <strong>NOT</strong> writable! We can not create the backup directory."
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: wp-db-backup.php:759
|
186 |
+
msgid "WARNING: Your backup directory is <strong>NOT</strong> writable! We can not create the backup directory."
|
|
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: wp-db-backup.php:769
|
190 |
msgid "Tables"
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: wp-db-backup.php:771
|
194 |
+
msgid "These core WordPress tables will always be backed up:"
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: wp-db-backup.php:777
|
198 |
+
msgid "You may choose to include any of the following tables:"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: wp-db-backup.php:783
|
202 |
msgid "Backup Options"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: wp-db-backup.php:784
|
206 |
+
msgid "What to do with the backup file:"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: wp-db-backup.php:786
|
210 |
msgid "Save to server"
|
211 |
msgstr ""
|
212 |
|
213 |
+
#: wp-db-backup.php:788
|
214 |
msgid "Download to your computer"
|
215 |
msgstr ""
|
216 |
|
217 |
+
#: wp-db-backup.php:790
|
218 |
+
#: wp-db-backup.php:853
|
219 |
+
msgid "Email backup to:"
|
220 |
+
msgstr ""
|
221 |
+
|
222 |
+
#: wp-db-backup.php:811
|
223 |
+
msgid "WARNING: Your backup directory is <strong>NOT</strong> writable!"
|
224 |
msgstr ""
|
225 |
|
226 |
+
#: wp-db-backup.php:820
|
227 |
msgid "Scheduled Backup"
|
228 |
msgstr ""
|
229 |
|
230 |
+
#: wp-db-backup.php:824
|
231 |
+
msgid "Next Backup"
|
232 |
+
msgstr ""
|
233 |
+
|
234 |
+
#: wp-db-backup.php:828
|
235 |
msgid "Last WP-Cron Daily Execution"
|
236 |
msgstr ""
|
237 |
|
238 |
+
#: wp-db-backup.php:829
|
239 |
msgid "Next WP-Cron Daily Execution"
|
240 |
msgstr ""
|
241 |
|
242 |
+
#: wp-db-backup.php:834
|
243 |
msgid "Schedule: "
|
244 |
msgstr ""
|
245 |
|
246 |
+
#: wp-db-backup.php:837
|
247 |
msgid "None"
|
248 |
msgstr ""
|
249 |
|
250 |
+
#: wp-db-backup.php:837
|
251 |
msgid "Daily"
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: wp-db-backup.php:860
|
255 |
+
msgid "Tables to include:"
|
256 |
msgstr ""
|
257 |
|
258 |
+
#: wp-db-backup.php:870
|
259 |
+
msgid "Submit"
|
260 |
msgstr ""
|
261 |
|
262 |
+
#: wp-db-backup.php:893
|
263 |
+
msgid "Never"
|
264 |
+
msgstr ""
|
265 |
+
|
266 |
+
#: wp-db-backup.php:898
|
267 |
+
#, php-format
|
268 |
+
msgid "%s seconds"
|
269 |
+
msgstr ""
|
270 |
+
|
271 |
+
#: wp-db-backup.php:936
|
272 |
+
msgid "Once Weekly"
|
273 |
+
msgstr ""
|
274 |
+
|
275 |
+
#: wp-db-backup.php:946
|
276 |
+
#: wp-db-backup.php:949
|
277 |
+
#: wp-db-backup.php:952
|
278 |
+
msgid "Cheatin' uh ?"
|
279 |
msgstr ""
|
280 |
|