PluginProbe ʕ •ᴥ•ʔ
Backup Migration / 1.3.0
Backup Migration v1.3.0
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 2 years ago other_config.php 2 years ago save-button.php 2 years ago staging.php 2 years ago store_config.php 2 years ago troubleshooting.php 2 years ago what_backed_up.php 2 years ago where_config.php 2 years ago
what_backed_up.php
407 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, WordPress installation files, but also files from Media library and other folders and files located in your server’s site directory. Note that WordPress keeps records of files such as Media library in the Databases, so you should also backup Databases if you want WordPress to “see” e.g. recovered media files. Size here is the total size you can get.", 'backup-backup');
21 $domain = site_url();
22 $tooltip_exclude_file = __("Enter the paths to the files you want to exclude from your backup (one per line).", 'backup-backup');
23 $tooltip_exclude_path = __("Enter the paths to the directories/folders you want to exclude from your backup (one per line).", 'backup-backup');
24 $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') . "<br><br>";
25
26 $tooltip_files = str_replace('"', '', $tooltip_files);
27 $tooltip_premium_details = str_replace('"', '', $tooltip_premium_details);
28
29 if (defined('BMI_PREMIUM_TOOLTIP')) {
30 $tooltip_premium_details .= str_replace('"', "'", BMI_PREMIUM_TOOLTIP);
31 $tooltip_smart_exclusion = str_replace('"', "'", BMI_PREMIUM_TOOLTIP);
32 }
33
34 $tooltip_premium_details .= '';
35 $tooltip_smart_exclusion = '';
36 if (!function_exists('bmi_cb_collapsible')) {
37 function bmi_cb_collapsible($c) {
38 echo ' class="bmi_will_collapse" data-if-checked="' . $c . '"';
39 }
40 }
41
42 ?>
43
44 <!-- Files -->
45 <div class="mm mt lh30">
46 <div class="mbl">
47 <?php _e("Here you can define what exactly will be included in the backup. If your site is very large it may make sense to only backup certain parts of it.", 'backup-backup'); ?>
48 </div>
49
50 <div class="">
51
52 <label for="files-group-backup">
53 <input id="files-group-backup"<?php bmi_cb_collapsible('file_group_cb'); ?> type="checkbox"<?php bmi_try_checked('BACKUP:FILES'); ?>>
54 <span id="bmi-scan-total" class="relative">
55 <b><?php _e("Files", 'backup-backup'); ?></b>
56 <span class="value">(<div class="spinner-loader"></div>)</span>&nbsp;
57 <span class="bmi-info-icon tooltip" tooltip="<?php echo $tooltip_files; ?>"></span>
58 </span>
59 </label>
60
61 </div>
62
63 </div>
64
65 <div id="file_group_cb">
66 <div class="mm92 lh30 file-checkboxes-wrapper mbl npb">
67 <div class="">
68 <span class="medium"><?php _e("Select which files you want to have backed up.", 'backup-backup'); ?></span>
69 </div>
70 <div class="flex file-checkboxes basic-file-exlusion">
71
72 <label for="files-group-plugins">
73 <div class="cf nm">
74 <div class="left nm" id="bmi-scan-plugins">
75 <input type="checkbox" id="files-group-plugins"<?php bmi_try_checked('BACKUP:FILES::PLUGINS'); ?>>
76 <span class="medium"><?php _e("Plugins", 'backup-backup'); ?></span> <span class="value">(<div class="spinner-loader"></div>)</span>
77 </div>
78 <div class="right mrr premium-wrapper nm" tooltip="<?php echo $tooltip_premium_details; ?>">
79 <div class="nm">
80 <span class="left f15">
81 <?php _e("Details", 'backup-backup'); ?>
82 </span>
83 <span class="right premium premium-img"></span>
84 </div>
85 </div>
86 </div>
87 </label>
88
89 <label for="files-group-uploads">
90 <div class="cf nm">
91 <div class="left nm" id="bmi-scan-plugins">
92 <input type="checkbox" id="files-group-uploads"<?php bmi_try_checked('BACKUP:FILES::UPLOADS'); ?>>
93 <span id="bmi-scan-uploads">
94 <span class="medium"><?php _e("Uploads", 'backup-backup'); ?></span> <span class="value">(<div class="spinner-loader"></div>)</span>
95 </span>
96 </div>
97 <div class="right mrr premium-wrapper nm" tooltip="<?php echo $tooltip_premium_details; ?>">
98 <div class="nm">
99 <span class="left f15">
100 <?php _e("Details", 'backup-backup'); ?>
101 </span>
102 <span class="right premium premium-img"></span>
103 </div>
104 </div>
105 </div>
106 </label>
107
108 <label for="files-group-themes">
109 <div class="cf nm">
110 <div class="left nm" id="bmi-scan-plugins">
111 <input type="checkbox" id="files-group-themes"<?php bmi_try_checked('BACKUP:FILES::THEMES'); ?>>
112 <span id="bmi-scan-themes">
113 <span class="medium"><?php _e("Themes", 'backup-backup'); ?></span> <span class="value">(<div class="spinner-loader"></div>)</span>
114 </span>
115 </div>
116 <div class="right mrr premium-wrapper nm" tooltip="<?php echo $tooltip_premium_details; ?>">
117 <div class="nm">
118 <span class="left f15">
119 <?php _e("Details", 'backup-backup'); ?>
120 </span>
121 <span class="right premium premium-img"></span>
122 </div>
123 </div>
124 </div>
125 </label>
126
127 <label for="files-group-other-contents">
128 <div class="cf nm">
129 <div class="left nm" id="bmi-scan-plugins">
130 <input type="checkbox" id="files-group-other-contents"<?php bmi_try_checked('BACKUP:FILES::OTHERS'); ?>>
131 <span id="bmi-scan-contents_others">
132 <span class="medium"><?php _e("Everything else in wp-content", 'backup-backup'); ?></span> <span class="value">(<div class="spinner-loader"></div>)</span>
133 </span>
134 </div>
135 <div class="right mrr premium-wrapper nm" tooltip="<?php echo $tooltip_premium_details; ?>">
136 <div class="nm">
137 <span class="left f15">
138 <?php _e("Details", 'backup-backup'); ?>
139 </span>
140 <span class="right premium premium-img"></span>
141 </div>
142 </div>
143 </div>
144 </label>
145
146 <label for="files-group-wp-install">
147 <div class="cf nm">
148 <div class="left nm" id="bmi-scan-plugins">
149 <input type="checkbox" id="files-group-wp-install"<?php bmi_try_checked('BACKUP:FILES::WP'); ?>>
150 <span id="bmi-scan-wordpress">
151 <span class="medium"><?php _e("WordPress installation", 'backup-backup'); ?></span> <span class="value">(<div class="spinner-loader"></div>)</span>
152 </span>
153 </div>
154 <div class="right mrr premium-wrapper nm" tooltip="<?php echo $tooltip_premium_details; ?>">
155 <div class="nm">
156 <span class="left f15">
157 <?php _e("Details", 'backup-backup'); ?>
158 </span>
159 <span class="right premium premium-img"></span>
160 </div>
161 </div>
162 </div>
163 </label>
164
165 </div>
166 <div class="mtl cf">
167 <div class="left inline-radio">
168 <?php _e("Want to exclude files based on filters?", 'backup-backup'); ?>
169 </div>
170 <div class="left d-flex mr60 ia-center">
171 <label class="container-radio">
172 <?php _e("No", 'backup-backup'); ?>
173 <input type="radio" name="exclude_files_by_filters"<?php bmi_cb_collapsible('file_filters_exclusion'); ?> value="false"<?php bmi_try_checked('BACKUP:FILES::FILTER', true); ?>>
174 <span class="checkmark-radio"></span>
175 </label>
176 <label class="container-radio ml25">
177 <?php _e("Yes", 'backup-backup'); ?>
178 <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'); ?>>
179 <span class="checkmark-radio"></span>
180 </label>
181 </div>
182 </div>
183 </div>
184
185 <!-- Files @ Filter (Excluder) -->
186 <div class="mm mtl mbl lh30 bg-second" id="file_filters_exclusion">
187 <div class="rr">
188
189 <div>
190 <label for="ex_b_fs">
191 <input type="checkbox" id="ex_b_fs"<?php bmi_cb_collapsible('file_filters_size'); ?><?php bmi_try_checked('BACKUP:FILES::FILTER:SIZE'); ?>>
192 <span id="bmi-scan-plugins">
193 <span class="medium"><?php _e("Exclude by", 'backup-backup'); ?> <b><?php _e("file size", 'backup-backup'); ?></b></span><span id="bmi__collon">:</span>
194 </span>
195 </label>
196 <div class="rr mtll" id="file_filters_size">
197
198 <?php _e("Do not backup files which are larger than", 'backup-backup'); ?>
199 <input type="number" min="0" id="BFFSIN" class="mbfieldlimit" <?php bmi_try_value('BACKUP:FILES::FILTER:SIZE:IN'); ?>>
200 MB
201
202 </div>
203 </div>
204 <div class="mtl" side="left">
205 <label for="ex_b_names">
206 <input type="checkbox" id="ex_b_names"<?php bmi_cb_collapsible('file_filters_names'); ?><?php bmi_try_checked('BACKUP:FILES::FILTER:NAMES'); ?>>
207 <span id="bmi-scan-plugins">
208 <span class="medium"><?php _e("Exclude by", 'backup-backup'); ?> <b><?php _e("file / folder name", 'backup-backup'); ?></b> <?php _e("(case-sensitive)", 'backup-backup'); ?></span>
209 </span>
210 </label>
211 <div class="rr" id="file_filters_names">
212
213 <div id="bmi_exclusion_rules"></div>
214 <div class="f16 hoverable mtll inline">
215 <a href="#" id="add-exclusion-rule" class="nodec secondary hoverable">+ <?php _e("Add an exclusion rule", 'backup-backup'); ?></a>
216 </div>
217
218 <div class="mt">
219 <?php _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'); ?>
220 </div>
221
222 <div class="mtl mbll">
223 <?php _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'); ?>
224 </div>
225
226 </div>
227 </div>
228
229 <div class="mtl" side="left">
230 <label for="ex_b_fpaths">
231 <input type="checkbox" id="ex_b_fpaths"<?php bmi_cb_collapsible('file_filters_fpaths'); ?><?php bmi_try_checked('BACKUP:FILES::FILTER:FPATHS'); ?>>
232 <span id="bmi-scan-plugins" class="relative">
233 <span class="medium"><?php _e("Exclude by", 'backup-backup'); ?> <b><?php _e("file path", 'backup-backup'); ?></b></span>&nbsp;
234 <span class="bmi-info-icon tooltip" tooltip="<?php echo $tooltip_exclude_file; ?>"></span>
235 </span>
236 </label>
237 <div class="rr mtll" id="file_filters_fpaths">
238
239 <?php
240 $ex0 = __('Examples:', 'backup-backup');
241 $ex1 = BMP::fixSlashes(ABSPATH . 'wp-config.php');
242 $ex2 = BMP::fixSlashes(ABSPATH . 'debug.log');
243 $ex3 = BMP::fixSlashes(ABSPATH . 'readme.html');
244 ?>
245
246 <textarea id="dynamic-fpaths-names" class="fullwidth bmi-txtar" name="name" rows="6" cols="80" placeholder="<?php echo $ex0 . '&#10;' . $ex1 . '&#10;' . $ex2 . '&#10;' . $ex3 ?>">
247 </textarea>
248
249 <?php echo str_replace('%s', '<b>***ABSPATH***</b>', __('You can use there constant %s as your root path.', 'backup-backup')); ?>
250
251 </div>
252 </div>
253
254 <div class="mtl" side="left">
255 <label for="ex_b_dpaths">
256 <input type="checkbox" id="ex_b_dpaths"<?php bmi_cb_collapsible('file_filters_dpaths'); ?><?php bmi_try_checked('BACKUP:FILES::FILTER:DPATHS'); ?>>
257 <span id="bmi-scan-plugins" class="relative">
258 <span class="medium"><?php _e("Exclude by", 'backup-backup'); ?> <b><?php _e("directory path", 'backup-backup'); ?></b></span>&nbsp;
259 <span class="bmi-info-icon tooltip" tooltip="<?php echo $tooltip_exclude_path; ?>"></span>
260 </span>
261 </label>
262 <div class="rr mtll" id="file_filters_dpaths">
263
264 <?php
265 $ex4 = BMP::fixSlashes(ABSPATH . 'wp-admin');
266 $ex5 = BMP::fixSlashes(ABSPATH . 'wp-includes');
267 $ex6 = BMP::fixSlashes(WP_CONTENT_DIR . '/uploads');
268 ?>
269
270 <textarea id="dynamic-dpaths-names" class="fullwidth bmi-txtar" name="name" rows="6" cols="80" placeholder="<?php echo $ex0 . '&#10;' . $ex4 . '&#10;' . $ex5 . '&#10;' . $ex6 ?>">
271 </textarea>
272
273 <?php echo str_replace('%s', '<b>***ABSPATH***</b>', __('You can use there constant %s as your root path.', 'backup-backup')); ?>
274
275 </div>
276 </div>
277
278 </div>
279 </div>
280 </div>
281
282 <!-- Database -->
283 <div class="mm mtl lh30">
284 <div class="">
285
286 <label for="database-group-backup">
287 <input id="database-group-backup"<?php bmi_cb_collapsible('database_group_cb'); ?> type="checkbox"<?php bmi_try_checked('BACKUP:DATABASE'); ?>>
288 <span class="relative" id="bmi-scan-database">
289 <b><?php _e("Databases", 'backup-backup'); ?>&nbsp;</b><span class="value">(<div class="spinner-loader"></div>)</span>
290 <span class="bmi-info-icon tooltip" tooltip="<?php echo $tooltip_files; ?>"></span>
291 </span>
292 </label>
293
294 </div>
295 </div>
296
297 <div id="database_group_cb">
298 <div class="mm92 mbl lh30 file-checkboxes-wrapper">
299
300 <div class="mbl">
301 <span class="regular"><?php _e("All databases (on the domain", 'backup-backup'); ?> <a href="<?php echo $domain; ?>" target="_blank"><?php echo $domain; ?></a>) <?php _e("will be backed up unless you exclude them by defining exclusion rules.", 'backup-backup'); ?></span>
302 </div>
303
304 <?php if (has_action('bmi_pro_db_exclude_tables')): ?>
305 <?php do_action('bmi_pro_db_exclude_tables'); ?>
306 <?php else: ?>
307 <div class="flex file-checkboxes">
308 <div class="premium-wrapper" data-ready="Explore and select tables that you want to exclude from the backup">
309 <label class="autowidth premium premium-img">
310 <input type="checkbox" disabled>
311 <span>
312 <span class="regular text-muted"><?php _e("Exclude certain tables from backups", 'backup-backup'); ?></span>
313 </span>
314 </label>
315 </div>
316 </div>
317 <?php endif; ?>
318
319 </div>
320
321
322 <div class="mm92 lh30 mbl npb">
323
324 <div class="cf">
325 <div class="left inline-radio semibold">
326 <?php _e('Want to apply "smart" exclusions rules?', 'backup-backup'); ?>
327 </div>
328
329 <div class="left d-flex mr60 ia-center">
330 <label id="nnmysql" class="container-radio active">
331 <?php _e("No", 'backup-backup'); ?>
332 <input id="nnmysql" type="radio" name="smart_exclusion_db_first_bm" value="true" checked>
333 <span class="checkmark-radio"></span>
334 </label>
335 <span class="cf premium-wrapper" tooltip="<?php echo $tooltip_smart_exclusion; ?>">
336 <label class="left container-radio ml25 not-allowed">
337 <?php _e("Yes", 'backup-backup'); ?>
338 <input type="radio" disabled name="smart_exclusion_db_first_bm">
339 <span class="checkmark-radio"></span>
340 </label>
341 <span class="left premium premium-img premium-nt mtf3"></span>
342 </span>
343 </div>
344 </div>
345
346 </div>
347
348 <div class="mm92 lh30 mbll">
349 <?php _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 in which file or table they reside. 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'); ?>
350 </div>
351
352 <div class="mm92 mtl mbl lh40 bg-second f20 overlayed">
353
354 <?php include BMI_INCLUDES . '/dashboard/templates/premium-overlay.php'; ?>
355
356 <div class="cf">
357 <label class="left half chhl">
358 <input type="checkbox" name="" value="">
359 <span><?php _e("Exclude", 'backup-backup'); ?> <b><?php _e("spam comments", 'backup-backup'); ?></b></span>
360 </label>
361 <label class="left half chhl">
362 <input type="checkbox" name="" value="">
363 <span><?php _e("Exclude all", 'backup-backup'); ?> <b><?php _e("cache files", 'backup-backup'); ?></b></span>
364 </label>
365 <label class="left half chhl">
366 <input type="checkbox" name="" value="">
367 <span><?php _e("Exclude all", 'backup-backup'); ?> <b><?php _e("deactivated plugins", 'backup-backup'); ?></b></span>
368 </label>
369 <label class="left half chhl">
370 <input type="checkbox" name="" value="">
371 <span><?php _e("Exclude all", 'backup-backup'); ?> <b><?php _e("debug logs", 'backup-backup'); ?></b></span>
372 </label>
373 <label class="left half chhl">
374 <input type="checkbox" name="" value="">
375 <span><?php _e("Exclude", 'backup-backup'); ?> <b><?php _e("all non-used themes", 'backup-backup'); ?></b></span>
376 </label>
377 <label class="left half chhl">
378 <input type="checkbox" name="" value="">
379 <span><?php _e("Exclude all", 'backup-backup'); ?> <b><?php _e("thumbnails", 'backup-backup'); ?></b></span>
380 </label>
381 <label class="left half chhl">
382 <input type="checkbox" name="" value="">
383 <span><?php _e("Exclude", 'backup-backup'); ?> <b><?php _e("post revisions", 'backup-backup'); ?></b></span>
384 </label>
385 </div>
386
387 </div>
388
389 </div>
390
391
392 <div class="mm mt mblll bold">
393 <?php _e("Summary / Sanity check", 'backup-backup'); ?>
394 </div>
395
396 <div class="mm mbl lh30 f20">
397 <?php _e("With above exclusion rules you excluded", 'backup-backup'); ?> <b id="esta-exclude">0 B</b> <?php _e("of data, which means your backup will be about", 'backup-backup'); ?> <b id="esta-size-for">0 B</b> <?php _e("large, unzipped.", 'backup-backup'); ?><br>
398 <!-- <?php _e("See the list of files you excluded.", 'backup-backup'); ?> -->
399 <?php _e("* At this moment excluded files are not counted here - yet (it will be in future of course!).", 'backup-backup'); ?>
400 <br>
401 <div>
402 <?php _e('You can force:', 'backup-backup'); ?> <a class="get-file-database-sizes nodec secondary hoverable"><?php _e('Database and files rescan', 'backup-backup'); ?></a>
403 </div>
404 </div>
405
406 <?php include BMI_INCLUDES . '/dashboard/chapter/save-button.php'; ?>
407