PluginProbe ʕ •ᴥ•ʔ
Backup Migration / 2.1.2
Backup Migration v2.1.2
2.1.6 2.1.5.2 trunk 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.6.1 1.4.7 1.4.8 1.4.9 1.4.9.1 2.0.0 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.5.1
backup-backup / includes / dashboard / chapter / what_backed_up.php
backup-backup / includes / dashboard / chapter Last commit date
AA-Template.php 3 months ago other_config.php 3 months ago save-button.php 3 months ago staging.php 3 months ago store_config.php 3 months ago troubleshooting.php 3 months ago what_backed_up.php 3 months ago where_config.php 3 months ago
what_backed_up.php
436 lines
1 <?php
2
3 // Namespace
4 namespace BMI\Plugin\Dashboard;
5
6 // Use
7 use BMI\Plugin\Backup_Migration_Plugin as BMP;
8
9 // Exit on direct access
10 if (!defined('ABSPATH')) exit;
11
12 function siteURL() {
13 $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
14 $domainName = $_SERVER['HTTP_HOST'];
15
16 return $protocol . $domainName;
17 }
18
19 // Tooltips
20 $tooltip_files = __("Here are stored all plugin, theme, and WordPress installation files, as well as files from the Media Library and other folders and files located in your server's site directory. Note that WordPress keeps records of files such as those in the Media Library in the database, so you should also back up the database if you want WordPress to “see” recovered media files. The size defined here is the total size of raw files.", 'backup-backup');
21 $tooltip_database = __("Databases in WordPress store the website's critical content and settings, including posts, pages, comments, users, configuration options, lists of (in)active plugins and themes, etc. Note that images and other media from posts and pages are not kept here.", 'backup-backup');
22 $domain = site_url();
23 $tooltip_exclude_file = __("Enter the paths to the files you want to exclude from your backup (one per line).", 'backup-backup');
24 $tooltip_exclude_path = __("Enter the paths to the directories/folders you want to exclude from your backup (one per line).", 'backup-backup');
25 $tooltip_premium_details = __("You can already exclude files based on filters (click on “Yes” below), however in the premium plugin you’ll also be able to browse through them.", 'backup-backup');
26
27 $tooltip_files = str_replace('"', '', $tooltip_files);
28 $tooltip_premium_details = str_replace('"', '', $tooltip_premium_details);
29
30 if (defined('BMI_ALREADY_IN_PRO')) {
31 $tooltip_smart_exclusion = str_replace('"', "'", BMI_ALREADY_IN_PRO);
32 }
33
34 $tooltip_premium_details .= '';
35 if (!function_exists('bmi_cb_collapsible')) {
36 function bmi_cb_collapsible($c) {
37 echo ' class="bmi_will_collapse" data-if-checked="' . esc_attr($c) . '"';
38 }
39 }
40
41 $pros = false;
42 if (defined('BMI_BACKUP_PRO') && BMI_BACKUP_PRO == 1) {
43 $pros = true;
44 }
45
46 if (!function_exists('bmi_pro_features')) {
47 function bmi_pro_features($pros, $ready, $tooltip) {
48 if ($pros) {
49 echo 'function';
50 } else {
51 if ($ready) {
52 $tooltipAttr = "data-ready";
53 } else {
54 if (defined('BMI_PREMIUM_TOOLTIP')) {
55 $tooltip .= "<br><br>";
56 $tooltip .= str_replace('"', "'", BMI_PREMIUM_TOOLTIP);
57 }
58 $tooltipAttr = "tooltip";
59
60
61 }
62 echo 'wrapper"' . esc_attr( $tooltipAttr ) . '="' . esc_attr( $tooltip ) ;
63 }
64 }
65 }
66
67 ?>
68
69 <!-- Files -->
70 <div class="mm mt lh30">
71 <div class="mbl">
72 <?php esc_html_e("Here you can define what exactly will be included in the backup. If your site is very large, it may make sense to back up only certain parts of it.", 'backup-backup'); ?>
73 </div>
74
75 <div class="">
76
77 <label for="files-group-backup">
78 <input id="files-group-backup"<?php bmi_cb_collapsible('file_group_cb'); ?> type="checkbox"<?php bmi_try_checked('BACKUP:FILES'); ?>>
79 <span id="bmi-scan-total" class="relative">
80 <b><?php esc_html_e("Files", 'backup-backup'); ?></b>
81 <span class="value">(<div class="spinner-loader"></div>)</span>&nbsp;
82 <span class="bmi-info-icon tooltip" tooltip="<?php echo esc_attr( $tooltip_files ); ?>"></span>
83 </span>
84 </label>
85
86 </div>
87
88 </div>
89
90 <div id="file_group_cb">
91 <div class="mm92 lh30 file-checkboxes-wrapper mbl npb">
92 <div class="">
93 <span class="medium"><?php esc_html_e("Select which files you want to have backed up.", 'backup-backup'); ?></span>
94 </div>
95 <div class="flex file-checkboxes basic-file-exlusion">
96
97 <div class="backup-files-types">
98 <label for="files-group-plugins" class="fit-content">
99 <div class="cf nm">
100 <div class="left nm" id="bmi-scan-plugins">
101 <input type="checkbox" id="files-group-plugins"<?php bmi_try_checked('BACKUP:FILES::PLUGINS'); ?>>
102 <span class="medium"><?php esc_html_e("Plugins", 'backup-backup'); ?></span> <span class="value">(<div class="spinner-loader"></div>)</span>
103 </div>
104 </div>
105 </label>
106
107 <div class="browse-details-wrapper right mrr nm premium-<?php bmi_pro_features($pros, true, $tooltip_premium_details); ?>">
108 <div class="nm">
109 <a class="left f15 browse-details pointer" data-browsing-path="plugins">
110 <?php esc_html_e("Details", 'backup-backup'); ?>
111 </a>
112 <span class="right premium premium-img"></span>
113 </div>
114 </div>
115 </div>
116
117 <div class="backup-files-types">
118 <label for="files-group-uploads" class="fit-content">
119 <div class="cf nm">
120 <div class="left nm" id="bmi-scan-plugins">
121 <input type="checkbox" id="files-group-uploads"<?php bmi_try_checked('BACKUP:FILES::UPLOADS'); ?>>
122 <span id="bmi-scan-uploads">
123 <span class="medium"><?php esc_html_e("Uploads", 'backup-backup'); ?></span> <span class="value">(<div class="spinner-loader"></div>)</span>
124 </span>
125 </div>
126 </div>
127 </label>
128 <div class="browse-details-wrapper flex right mrr nm premium-<?php bmi_pro_features($pros, true, $tooltip_premium_details); ?>">
129 <div class="nm">
130 <a class="left f15 browse-details pointer" data-browsing-path="uploads">
131 <?php esc_html_e("Details", 'backup-backup'); ?>
132 </a>
133 <span class="right premium premium-img"></span>
134 </div>
135 </div>
136 </div>
137
138 <div class="backup-files-types">
139 <label for="files-group-themes" class="fit-content">
140 <div class="cf nm">
141 <div class="left nm" id="bmi-scan-plugins">
142 <input type="checkbox" id="files-group-themes"<?php bmi_try_checked('BACKUP:FILES::THEMES'); ?>>
143 <span id="bmi-scan-themes">
144 <span class="medium"><?php esc_html_e("Themes", 'backup-backup'); ?></span> <span class="value">(<div class="spinner-loader"></div>)</span>
145 </span>
146 </div>
147 </div>
148 </label>
149 <div class="browse-details-wrapper flex right mrr nm premium-<?php bmi_pro_features($pros, true, $tooltip_premium_details); ?>">
150 <div class="nm">
151 <a class="left f15 browse-details pointer" data-browsing-path="themes">
152 <?php esc_html_e("Details", 'backup-backup'); ?>
153 </a>
154 <span class="right premium premium-img"></span>
155 </div>
156 </div>
157 </div>
158
159 <div class="backup-files-types">
160 <label for="files-group-other-contents" class="fit-content">
161 <div class="cf nm">
162 <div class="left nm" id="bmi-scan-plugins">
163 <input type="checkbox" id="files-group-other-contents"<?php bmi_try_checked('BACKUP:FILES::OTHERS'); ?>>
164 <span id="bmi-scan-contents_others">
165 <span class="medium"><?php esc_html_e("Everything else in wp-content", 'backup-backup'); ?></span> <span class="value">(<div class="spinner-loader"></div>)</span>
166 </span>
167 </div>
168 </div>
169 </label>
170 <div class="browse-details-wrapper flex right mrr nm premium-<?php bmi_pro_features($pros, true, $tooltip_premium_details); ?>">
171 <div class="nm">
172 <a class="left f15 browse-details pointer" data-browsing-path="other-contents">
173 <?php esc_html_e("Details", 'backup-backup'); ?>
174 </a>
175 <span class="right premium premium-img"></span>
176 </div>
177 </div>
178 </div>
179
180 <div class="backup-files-types">
181 <label for="files-group-wp-install" class="fit-content">
182 <div class="cf nm">
183 <div class="left nm" id="bmi-scan-plugins">
184 <input type="checkbox" id="files-group-wp-install"<?php bmi_try_checked('BACKUP:FILES::WP'); ?>>
185 <span id="bmi-scan-wordpress">
186 <span class="medium"><?php esc_html_e("WordPress installation", 'backup-backup'); ?></span> <span class="value">(<div class="spinner-loader"></div>)</span>
187 </span>
188 </div>
189 </div>
190 </label>
191 <div class="browse-details-wrapper flex right mrr nm premium-<?php bmi_pro_features($pros, true, $tooltip_premium_details); ?>">
192 <div class="nm">
193 <a class="left f15 browse-details pointer" data-browsing-path="wp-install">
194 <?php esc_html_e("Details", 'backup-backup'); ?>
195 </a>
196 <span class="right premium premium-img"></span>
197 </div>
198 </div>
199 </div>
200
201 <?php if(has_action('bmi_pro_files_exclude')): ?>
202 <?php do_action('bmi_pro_files_exclude'); ?>
203 <?php endif; ?>
204
205 </div>
206 <div class="mtl cf">
207 <div class="left inline-radio">
208 <?php esc_html_e("Want to exclude files based on filters?", 'backup-backup'); ?>
209 </div>
210 <div class="left d-flex mr60 ia-center">
211 <label class="container-radio">
212 <?php esc_html_e("No", 'backup-backup'); ?>
213 <input id="dis_exclude_files_by_filters" type="radio" name="exclude_files_by_filters"<?php bmi_cb_collapsible('file_filters_exclusion'); ?> value="false"<?php bmi_try_checked('BACKUP:FILES::FILTER', true); ?>>
214 <span class="checkmark-radio"></span>
215 </label>
216 <label class="container-radio ml25">
217 <?php esc_html_e("Yes", 'backup-backup'); ?>
218 <input id="files_by_filters" type="radio" name="exclude_files_by_filters"<?php bmi_cb_collapsible('file_filters_exclusion'); ?> value="true"<?php bmi_try_checked('BACKUP:FILES::FILTER'); ?>>
219 <span class="checkmark-radio"></span>
220 </label>
221 </div>
222 </div>
223 </div>
224
225 <!-- Files @ Filter (Excluder) -->
226 <div class="mm mtl mbl lh30 bg-second" id="file_filters_exclusion">
227 <div class="rr">
228
229 <div>
230 <label for="ex_b_fs">
231 <input type="checkbox" id="ex_b_fs"<?php bmi_cb_collapsible('file_filters_size'); ?><?php bmi_try_checked('BACKUP:FILES::FILTER:SIZE'); ?>>
232 <span id="bmi-scan-plugins">
233 <span class="medium"><?php esc_html_e("Exclude by", 'backup-backup'); ?> <b><?php esc_html_e("file size", 'backup-backup'); ?></b></span><span id="bmi__collon">:</span>
234 </span>
235 </label>
236 <div class="rr mtll" id="file_filters_size">
237
238 <?php esc_html_e("Do not back up files that are larger than", 'backup-backup'); ?>
239 <input type="number" min="0" id="BFFSIN" class="mbfieldlimit" <?php bmi_try_value('BACKUP:FILES::FILTER:SIZE:IN'); ?>>
240 MB
241
242 </div>
243 </div>
244 <div class="mtl" side="left">
245 <label for="ex_b_names">
246 <input type="checkbox" id="ex_b_names"<?php bmi_cb_collapsible('file_filters_names'); ?><?php bmi_try_checked('BACKUP:FILES::FILTER:NAMES'); ?>>
247 <span id="bmi-scan-plugins">
248 <span class="medium"><?php esc_html_e("Exclude by", 'backup-backup'); ?> <b><?php esc_html_e("file / folder name", 'backup-backup'); ?></b> <?php esc_html_e("(case-sensitive)", 'backup-backup'); ?></span>
249 </span>
250 </label>
251 <div class="rr" id="file_filters_names">
252
253 <div id="bmi_exclusion_rules"></div>
254 <div class="f16 hoverable mtll inline">
255 <a href="#" id="add-exclusion-rule" class="nodec secondary hoverable">+ <?php esc_html_e("Add an exclusion rule", 'backup-backup'); ?></a>
256 </div>
257
258 <div class="mt">
259 <?php esc_html_e('File names include the extension, e.g. if you select to exclude all files which end with ".psd" at the end then all files in psd format will be excluded.', 'backup-backup'); ?>
260 </div>
261
262 <div class="mtl mbll">
263 <?php esc_html_e("The folder where backups are stored (i.e. the backups which this plugin creates) is always excluded, to prevent you from taking backups of your own backups.", 'backup-backup'); ?>
264 </div>
265
266 </div>
267 </div>
268
269 <div class="mtl" side="left">
270 <label for="ex_b_fpaths">
271 <input type="checkbox" id="ex_b_fpaths"<?php bmi_cb_collapsible('file_filters_fpaths'); ?><?php bmi_try_checked('BACKUP:FILES::FILTER:FPATHS'); ?>>
272 <span id="bmi-scan-plugins" class="relative">
273 <span class="medium"><?php esc_html_e("Exclude by", 'backup-backup'); ?> <b><?php esc_html_e("file path", 'backup-backup'); ?></b></span>&nbsp;
274 <span class="bmi-info-icon tooltip" tooltip="<?php echo esc_attr( $tooltip_exclude_file ); ?>"></span>
275 </span>
276 </label>
277 <div class="rr mtll" id="file_filters_fpaths">
278
279 <?php
280 $ex0 = __('Examples:', 'backup-backup');
281 $ex1 = BMP::fixSlashes(ABSPATH . 'wp-config.php');
282 $ex2 = BMP::fixSlashes(ABSPATH . 'debug.log');
283 $ex3 = BMP::fixSlashes(ABSPATH . 'readme.html');
284 ?>
285
286 <textarea id="dynamic-fpaths-names" class="fullwidth bmi-txtar" name="name" rows="6" cols="80" placeholder="<?php echo esc_attr( $ex0 . '&#10;' . $ex1 . '&#10;' . $ex2 . '&#10;' . $ex3 ); ?>">
287 </textarea>
288
289 <?php echo wp_kses_post( str_replace('%s', '<b>***ABSPATH***</b>', __('You can use there constant %s as your root path.', 'backup-backup')) ); ?>
290
291 </div>
292 </div>
293
294 <div class="mtl" side="left">
295 <label for="ex_b_dpaths">
296 <input type="checkbox" id="ex_b_dpaths"<?php bmi_cb_collapsible('file_filters_dpaths'); ?><?php bmi_try_checked('BACKUP:FILES::FILTER:DPATHS'); ?>>
297 <span id="bmi-scan-plugins" class="relative">
298 <span class="medium"><?php esc_html_e("Exclude by", 'backup-backup'); ?> <b><?php esc_html_e("directory path", 'backup-backup'); ?></b></span>&nbsp;
299 <span class="bmi-info-icon tooltip" tooltip="<?php echo esc_attr( $tooltip_exclude_path ); ?>"></span>
300 </span>
301 </label>
302 <div class="rr mtll" id="file_filters_dpaths">
303
304 <?php
305 $ex4 = BMP::fixSlashes(ABSPATH . 'wp-admin');
306 $ex5 = BMP::fixSlashes(ABSPATH . 'wp-includes');
307 $ex6 = BMP::fixSlashes(WP_CONTENT_DIR . '/uploads');
308 ?>
309
310 <textarea id="dynamic-dpaths-names" class="fullwidth bmi-txtar" name="name" rows="6" cols="80" placeholder="<?php echo esc_attr( $ex0 . '&#10;' . $ex4 . '&#10;' . $ex5 . '&#10;' . $ex6 ); ?>">
311 </textarea>
312
313 <?php echo wp_kses_post( str_replace('%s', '<b>***ABSPATH***</b>', __('You can use there constant %s as your root path.', 'backup-backup')) ); ?>
314
315 </div>
316 </div>
317
318 </div>
319 </div>
320 </div>
321
322 <!-- Database -->
323 <div class="mm mtl lh30">
324 <div class="">
325
326 <label for="database-group-backup">
327 <input id="database-group-backup"<?php bmi_cb_collapsible('database_group_cb'); ?> type="checkbox"<?php bmi_try_checked('BACKUP:DATABASE'); ?>>
328 <span class="relative" id="bmi-scan-database">
329 <b><?php esc_html_e("Databases", 'backup-backup'); ?>&nbsp;</b><span class="value">(<div class="spinner-loader"></div>)</span>
330 <span class="bmi-info-icon tooltip" tooltip="<?php echo esc_attr( $tooltip_database ); ?>"></span>
331 </span>
332 </label>
333
334 </div>
335 </div>
336
337 <div id="database_group_cb">
338 <div class="mm92 mbl lh30 file-checkboxes-wrapper">
339
340 <div class="mbl">
341 <span class="regular"><?php esc_html_e("All databases (on the domain", 'backup-backup'); ?> <a href="<?php echo esc_url( $domain ); ?>" target="_blank"><?php echo esc_html( $domain ); ?></a>) <?php esc_html_e("will be backed up unless you exclude them by defining exclusion rules.", 'backup-backup'); ?></span>
342 </div>
343
344 <?php if (has_action('bmi_pro_db_exclude_tables')): ?>
345 <?php do_action('bmi_pro_db_exclude_tables'); ?>
346 <?php else: ?>
347 <div class="flex file-checkboxes">
348 <div class="premium-wrapper" data-ready="Explore and select tables that you want to exclude from the backup">
349 <label class="autowidth premium premium-img">
350 <input type="checkbox" disabled>
351 <span>
352 <span class="regular text-muted"><?php esc_html_e("Exclude certain tables from backups", 'backup-backup'); ?></span>
353 </span>
354 </label>
355 </div>
356 </div>
357 <?php endif; ?>
358
359 </div>
360
361
362 </div>
363 <div class="mm mtl lh30">
364
365 <div class="cf">
366 <div class="left inline-radio semibold">
367 <?php esc_html_e('Want to apply "smart" exclusion rules?', 'backup-backup'); ?>
368 </div>
369
370 <div class="left d-flex mr60 ia-center">
371 <label id="nnmysql" class="container-radio active">
372 <?php esc_html_e("No", 'backup-backup'); ?>
373 <input id="nnmysql" type="radio" name="smart_exclusion_db_first_bm" value="false" <?php bmi_try_checked('SMART:EXCLUSION:ENABLED', true); ?> <?php bmi_cb_collapsible('smart-exclusion-wrapper'); ?>>
374 <span class="checkmark-radio"></span>
375 </label>
376 <span class="cf premium-<?php bmi_pro_features($pros, true, __("You will be able to exclude data from your database based on smart rules.", 'backup-backup')); ?>">
377 <label class="left container-radio ml25 <?php echo ($pros) ? '' : 'not-allowed'; ?>">
378 <?php esc_html_e("Yes", 'backup-backup'); ?>
379 <input type="radio" name="smart_exclusion_db_first_bm" <?php echo ($pros) ? '' : 'disabled'; ?> id="smart-exclusion-enabled" <?php bmi_try_checked('SMART:EXCLUSION:ENABLED'); ?> <?php bmi_cb_collapsible('smart-exclusion-wrapper'); ?> value="true">
380 <span class="checkmark-radio"></span>
381 </label>
382 <span class="left premium premium-img premium-nt mtf3"></span>
383 </span>
384 </div>
385 </div>
386
387 </div>
388
389 <div class="mm lh30 mbll">
390 <?php esc_html_e('With the "Files" and "Databases" options above you can already define what to include or exclude in your backup. However, you may want to exclude elements in your backups where you are not sure which file or table they reside in. For example, you may want to exclude all spam comments in your backups. This is what the "smart" exclusion rules are for. This is also a good way to clean your site of things you do not want.', 'backup-backup'); ?>
391 </div>
392
393 <div class="mm mtl mbl lh40 bg-second f20 overlayed" id="smart-exclusion-wrapper">
394
395 <?php if (!$pros):?>
396 <?php include BMI_INCLUDES . '/dashboard/templates/premium-function-overlay.php'; ?>
397 <?php endif; ?>
398
399
400 <div class="cf">
401 <label class="left half chhl">
402 <input type="checkbox" name="smart-exclusion-cache" value="" id="smart-exclusion-cache" <?php bmi_try_checked('SMART:EXCLUSION:CACHE'); ?>>
403 <span><?php esc_html_e("Exclude all", 'backup-backup'); ?> <b><?php esc_html_e("cache files", 'backup-backup'); ?></b></span>
404 </label>
405 <label class="left half chhl">
406 <input type="checkbox" name="smart-exclusion-deactivated-plugins" value="" <?php bmi_try_checked('SMART:EXCLUSION:DPLUGINS'); ?> id="smart-exclusion-deactivated-plugins">
407 <span><?php esc_html_e("Exclude all", 'backup-backup'); ?> <b><?php esc_html_e("deactivated plugins", 'backup-backup'); ?></b></span>
408 </label>
409 <label class="left half chhl">
410 <input type="checkbox" name="smart-exclusion-debug-logs" value="" id="smart-exclusion-debug-logs" <?php bmi_try_checked('SMART:EXCLUSION:DLOGS'); ?>>
411 <span><?php esc_html_e("Exclude all", 'backup-backup'); ?> <b><?php esc_html_e("debug logs", 'backup-backup'); ?></b></span>
412 </label>
413 <label class="left half chhl">
414 <input type="checkbox" name="smart-exclusion-non-used-themes" value="" id="smart-exclusion-non-used-themes" <?php bmi_try_checked('SMART:EXCLUSION:NUTHEMES'); ?>>
415 <span><?php esc_html_e("Exclude", 'backup-backup'); ?> <b><?php esc_html_e("all non-used themes", 'backup-backup'); ?></b></span>
416 </label>
417 <label class="left half chhl">
418 <input type="checkbox" name="smart-exclusion-post-revisions" value="" id="smart-exclusion-post-revisions" <?php bmi_try_checked('SMART:EXCLUSION:PREVISIONS'); ?>>
419 <span><?php esc_html_e("Exclude", 'backup-backup'); ?> <b><?php esc_html_e("post revisions", 'backup-backup'); ?></b></span>
420 </label>
421 </div>
422
423 </div>
424
425 <div class="mm mt mblll bold">
426 <?php esc_html_e("Summary / Sanity check", 'backup-backup'); ?>
427 </div>
428
429 <div class="mm mbl lh30 f20">
430 <?php esc_html_e("With above exclusion rules you excluded", 'backup-backup'); ?> <b id="esta-exclude">0 B</b>/<b id="esta-exclude-total">0 B</b> <?php esc_html_e("of data, which means your backup will be about", 'backup-backup'); ?> <b id="esta-size-for">0 B</b> <?php esc_html_e("large, unzipped.", 'backup-backup'); ?>
431 <br>
432 <a class="get-file-database-sizes nodec secondary hoverable"> <?php esc_html_e('Save and re-calculate with current filters.', 'backup-backup'); ?></a>
433 </div>
434
435 <?php include BMI_INCLUDES . '/dashboard/chapter/save-button.php'; ?>
436