XCloner – Backup and Restore - Version 4.0.3

Version Description

  • added differential backups with the option to only backup files modified after a certain date
  • added localhost restore option with direct access to the restore restore
  • added schedule name fixes
  • added restore filter All Files, Only Plugins Files, Only Theme Files, Only Uploads Files, Only Database Backup
  • added remote backup list archive option on restore page
  • tmp directory cleanup on deactivate
  • sftp text fixes
Download this release

Release Info

Developer xcloner
Plugin Icon 128x128 XCloner – Backup and Restore
Version 4.0.3
Comparing to
See all releases

Code changes from version 4.0.2 to 4.0.3

README.txt CHANGED
@@ -1,16 +1,16 @@
1
  === XCloner - Backup and Restore===
2
  Contributors: xcloner
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AAPE8PLAE554S
4
- Tags: backup plugin, restore plugin, database backup, duplicate, full site backup, website cloner, wordpress backup, database restore, webdav, azure, ftp, sftp, amazon s3, dropbox, google drive
5
  Requires at least: 3.0.1
6
  Tested up to: 4.7
7
- Stable tag: 4.0.2
8
 
9
  Backup your site, restore to any web location, send your backups to Dropbox, Amazon S3, Azure, FTP, SFTP, WebDAV, Google Drive with XCloner plugin.
10
 
11
  == Description ==
12
 
13
- XCloner is a Backup and Restore plugin that is perfectly integrated with Wordpress.
14
 
15
  [youtube http://www.youtube.com/watch?v=V9iWpPyG1EE]
16
 
@@ -31,11 +31,12 @@ PHP 5.4+ with mod CURL installed
31
  * Create automated backups from your Scheduled Backups Section
32
  * Received email notifications of created backups
33
  * Generate automatic backups based on cronjobs, it can run daily, weekly, monthly or even hourly
34
- * Restore your backups on any other location, XCloner will attempt to extract the backup archive files for you, as well as import the mysql dump and update the Wordpress config details
35
  * Upload your backups to Remote Storage locations supporting FTP, SFTP, Dropbox, AWS, Azure Blog, BackBlaze, WebDAV, Google Drive and many more to come
36
  * Watch every step of XCloner through it's built in debugger
37
  * Althrough we have optimized XCloner to run properly on most hosts, we give Developers options to customize it's running speed and avoid backup timeouts, all from the XCloner Config-> System Options
38
  * Ability to split backups into multiple smaller parts if a certain size limit is reached
 
39
 
40
  == Installation ==
41
 
@@ -49,12 +50,12 @@ You can do it easily from the Wordpress backend.
49
 
50
  == Frequently Asked Questions ==
51
 
52
- = Where does XCloner keep it's database backups? =
53
 
54
  XCloner stores them in separate mysql dump files, inside a folder called xcloner-XXXXX inside the backup archive root path, where XXXXX is a hash number that is identical with the last 5 characters of the backup name,
55
  so if the backup name is backup_localhost-2017-02-16_15-36-sql-1c6c6.tgz , the mysql backup file will be stored in xcloner-1c6c6/ folder.
56
 
57
- = How do I restore my backup? =
58
 
59
  XCloner provide an easy to use restore script available in the Site Backup -> Restore Backups menu, the process is being described there as well.
60
 
@@ -64,14 +65,32 @@ If the XCloner Restore option fails, you can manually restore your backup as fol
64
  2. locate the xcloner-XXXXX folder inside your backup root folder, and look for the mysql backup in database-sql and import it through phpmyadmin
65
  3. update your wp-config.php file to reflect the new mysql details
66
 
67
- = How do I know which files were include in the backup? =
68
 
69
  The XCloner Manager Backups Panel provides an easy utility to view each backup content files list. It also stores a copy of the archived backup files inside the xcloner-XXXXX/backup_files.csv file in an easy to read CSV format.
70
 
71
- = Do you have a log for the created backup? =
72
 
73
  Yes, if XCloner Logger option is enabled, it will store a log file inside the xcloner-XXXXX folder inside the backup archive, file is named xcloner-xxxxx.log
74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  == Screenshots ==
76
 
77
  1. XCloner Dashboard
@@ -88,6 +107,15 @@ Yes, if XCloner Logger option is enabled, it will store a log file inside the xc
88
 
89
  == Changelog ==
90
 
 
 
 
 
 
 
 
 
 
91
  = 4.0.2 =
92
  * added WebDAV remote storage support
93
  * added Google Drive Suppor through XCloner-Google-Drive plugin
1
  === XCloner - Backup and Restore===
2
  Contributors: xcloner
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AAPE8PLAE554S
4
+ Tags: backup plugin, restore plugin, database backup, duplicate, full site backup, website cloner, wordpress backup, database restore, webdav, azure, ftp, sftp, amazon s3, dropbox, google drive, differential backup
5
  Requires at least: 3.0.1
6
  Tested up to: 4.7
7
+ Stable tag: 4.0.3
8
 
9
  Backup your site, restore to any web location, send your backups to Dropbox, Amazon S3, Azure, FTP, SFTP, WebDAV, Google Drive with XCloner plugin.
10
 
11
  == Description ==
12
 
13
+ XCloner is a Backup and Restore plugin that is perfectly integrated with Wordpress. It is able to create complete and differentials backups of your site, manually or automatically through the built-in scheduler.
14
 
15
  [youtube http://www.youtube.com/watch?v=V9iWpPyG1EE]
16
 
31
  * Create automated backups from your Scheduled Backups Section
32
  * Received email notifications of created backups
33
  * Generate automatic backups based on cronjobs, it can run daily, weekly, monthly or even hourly
34
+ * Restore your backups locally or to a remote location, XCloner will attempt to extract the backup archive files for you, as well as import the mysql dump and update the Wordpress config details
35
  * Upload your backups to Remote Storage locations supporting FTP, SFTP, Dropbox, AWS, Azure Blog, BackBlaze, WebDAV, Google Drive and many more to come
36
  * Watch every step of XCloner through it's built in debugger
37
  * Althrough we have optimized XCloner to run properly on most hosts, we give Developers options to customize it's running speed and avoid backup timeouts, all from the XCloner Config-> System Options
38
  * Ability to split backups into multiple smaller parts if a certain size limit is reached
39
+ * Generate Differential Backups so your backup will include only files modified after a certain date, giving you the option to decrease the total backup space disk usage
40
 
41
  == Installation ==
42
 
50
 
51
  == Frequently Asked Questions ==
52
 
53
+ = Where does XCloner keep it's Database Backups? =
54
 
55
  XCloner stores them in separate mysql dump files, inside a folder called xcloner-XXXXX inside the backup archive root path, where XXXXX is a hash number that is identical with the last 5 characters of the backup name,
56
  so if the backup name is backup_localhost-2017-02-16_15-36-sql-1c6c6.tgz , the mysql backup file will be stored in xcloner-1c6c6/ folder.
57
 
58
+ = How do I Restore my Backup? =
59
 
60
  XCloner provide an easy to use restore script available in the Site Backup -> Restore Backups menu, the process is being described there as well.
61
 
65
  2. locate the xcloner-XXXXX folder inside your backup root folder, and look for the mysql backup in database-sql and import it through phpmyadmin
66
  3. update your wp-config.php file to reflect the new mysql details
67
 
68
+ = How do I know which Files were include in the Backup? =
69
 
70
  The XCloner Manager Backups Panel provides an easy utility to view each backup content files list. It also stores a copy of the archived backup files inside the xcloner-XXXXX/backup_files.csv file in an easy to read CSV format.
71
 
72
+ = Do you have a Log for the created Backup? =
73
 
74
  Yes, if XCloner Logger option is enabled, it will store a log file inside the xcloner-XXXXX folder inside the backup archive, file is named xcloner-xxxxx.log
75
 
76
+ = What are Differentials Backups? =
77
+
78
+ Differential Backups contain files modified after a certian period of time. So each time backup runs, modified files after that period of time are added to a new Backup archive.
79
+ Compared to Incremental Backups, which contain only modified files from the previous run, they use more space but are more reliable for files restore.
80
+ They will use considerably less space than a full backup however.
81
+
82
+ = Why Differential Backups and will you support Incremental Backups? =
83
+
84
+ The main difference comes from how reliable a backup set it. For instance, if something happens to one backup archive from the Incremental Backup set, then it is possible you will lose
85
+ the files changes in that period of time, however if the same case happens to a Differential Backup, then the files can easily be recovered from any of the other Differential Backups. The
86
+ storage difference between Incremental Backups and Differential Backups is not significant and considering the reliability of the Differential Set so we have decided, for now, to not implement
87
+ further Incremental Backups.
88
+
89
+ = What would a good Backup Procedure be with Differential Backups? =
90
+
91
+ As a general rule, I would recommend setting a weekly full site backup schedule and then a daily schedule for a differential backup. You can also include a daily backup of the database in the same Differential Backup.
92
+ Of course, schedules can be adjusted accordingly to how often you update your site, the size of it and the storage space available.
93
+
94
  == Screenshots ==
95
 
96
  1. XCloner Dashboard
107
 
108
  == Changelog ==
109
 
110
+ = 4.0.3 =
111
+ * added differential backups with the option to only backup files modified after a certain date
112
+ * added localhost restore option with direct access to the restore restore
113
+ * added schedule name fixes
114
+ * added restore filter All Files, Only Plugins Files, Only Theme Files, Only Uploads Files, Only Database Backup
115
+ * added remote backup list archive option on restore page
116
+ * tmp directory cleanup on deactivate
117
+ * sftp text fixes
118
+
119
  = 4.0.2 =
120
  * added WebDAV remote storage support
121
  * added Google Drive Suppor through XCloner-Google-Drive plugin
admin/class-xcloner-admin.php CHANGED
@@ -143,10 +143,10 @@ class Xcloner_Admin {
143
  $xcloner_sanitization = $this->get_xcloner_container()->get_xcloner_sanitization();
144
  $remote_storage = $this->get_xcloner_container()->get_xcloner_remote_storage();
145
 
146
- $_POST['action'] = $xcloner_sanitization->sanitize_input_as_string($_POST['action']);
147
 
148
  if(isset($_POST['action']))
149
  {
 
150
  $remote_storage->save($_POST['action']);
151
  }
152
 
143
  $xcloner_sanitization = $this->get_xcloner_container()->get_xcloner_sanitization();
144
  $remote_storage = $this->get_xcloner_container()->get_xcloner_remote_storage();
145
 
 
146
 
147
  if(isset($_POST['action']))
148
  {
149
+ $_POST['action'] = $xcloner_sanitization->sanitize_input_as_string($_POST['action']);
150
  $remote_storage->save($_POST['action']);
151
  }
152
 
admin/css/xcloner-admin.css CHANGED
@@ -380,6 +380,7 @@ i.backup_warning{
380
  display: none;
381
  }
382
 
 
383
  @media only screen and (min-width: 993px){
384
  .dashboard .backup-ready{
385
  float: right;
380
  display: none;
381
  }
382
 
383
+
384
  @media only screen and (min-width: 993px){
385
  .dashboard .backup-ready{
386
  float: right;
admin/js/xcloner-restore-class.js CHANGED
@@ -11,6 +11,8 @@ class Xcloner_Restore{
11
  this.upload_file_event = new Event('upload_file_event');
12
  this.resume = new Object();
13
  this.hash = hash;
 
 
14
 
15
  document.addEventListener("backup_upload_finish", function (e) {
16
 
@@ -47,6 +49,7 @@ class Xcloner_Restore{
47
  document.addEventListener("xcloner_populate_remote_backup_files_list", function (e) {
48
 
49
  var files = e.detail.files
 
50
 
51
  jQuery('.xcloner-restore #remote_backup_file').find('option').not(':first').remove();
52
 
@@ -55,8 +58,10 @@ class Xcloner_Restore{
55
  {
56
  var selected = "not-selected";
57
 
58
- if(files[key].selected)
 
59
  selected = "selected";
 
60
 
61
  jQuery('.xcloner-restore #remote_backup_file').append("<option value='"+files[key].path+"' "+selected+">"+files[key].path+"("+e.detail.$this.getSize(files[key].size)+" MB)"+"</option>").addClass("file");
62
  }
@@ -66,12 +71,13 @@ class Xcloner_Restore{
66
  document.addEventListener("xcloner_populate_remote_mysqldump_files_list", function (e) {
67
 
68
  var files = e.detail.files
 
69
 
70
  jQuery('.xcloner-restore #remote_database_file').find('option').not(':first').remove();
71
 
72
  for( var key in files)
73
  {
74
- if(files[key].selected)
75
  var selected = "selected";
76
  else
77
  var selected = "not-selected";
@@ -134,6 +140,7 @@ class Xcloner_Restore{
134
 
135
  document.addEventListener("xcloner_populate_remote_restore_path", function (e) {
136
 
 
137
  if(e.detail.dir !== undefined)
138
  {
139
  if(!jQuery(".xcloner-restore #remote_restore_path").val())
@@ -143,10 +150,33 @@ class Xcloner_Restore{
143
  if(e.detail.restore_script_url !== undefined)
144
  {
145
  if(!jQuery(".xcloner-restore #remote_restore_url").val())
 
146
  jQuery(".xcloner-restore #remote_restore_url").val(e.detail.restore_script_url);
 
147
 
148
  if(!jQuery(".xcloner-restore #remote_restore_site_url").val())
 
149
  jQuery(".xcloner-restore #remote_restore_site_url").val(e.detail.restore_script_url);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  }
151
 
152
  }, false);
@@ -160,8 +190,11 @@ class Xcloner_Restore{
160
  {
161
  files_text[i] = "<li>"+(e.detail.files[i])+"</li>";
162
  }
163
- jQuery('.xcloner-restore .restore-remote-backup-step .files-list').prepend(files_text.reverse().join("\n"));
164
- }else{
 
 
 
165
  jQuery('.xcloner-restore .restore-remote-backup-step .files-list').html("");
166
  }
167
 
@@ -184,6 +217,7 @@ class Xcloner_Restore{
184
  document.addEventListener("xcloner_restore_finish", function (e) {
185
 
186
  jQuery(".xcloner-restore #xcloner_restore_finish").show();
 
187
 
188
  }, false);
189
 
@@ -261,7 +295,7 @@ class Xcloner_Restore{
261
  {
262
  if(status)
263
  {
264
- document.dispatchEvent(new CustomEvent("xcloner_populate_remote_restore_path", {detail: {dir: response.statusText.dir, restore_script_url: response.statusText.restore_script_url, $this: this }}))
265
  }
266
  }
267
 
@@ -301,7 +335,7 @@ class Xcloner_Restore{
301
  params.part = response.statusText.part
302
  params.processed = response.statusText.processed
303
 
304
- document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text", {detail: {message: 'Processing <strong>'+response.statusText.backup_file+'</strong>- wrote '+this.getSize(processed, 1024)+" KB to disk"}}));
305
 
306
  this.do_ajax('remote_restore_backup_file_callback', 'restore_backup_to_path', params)
307
  return
@@ -321,6 +355,7 @@ class Xcloner_Restore{
321
  var params = new Object()
322
  params.backup_file = backup_file
323
  params.remote_path = remote_path
 
324
 
325
  if(this.resume.callback == "remote_restore_backup_file_callback")
326
  {
@@ -532,43 +567,141 @@ class Xcloner_Restore{
532
  }
533
  }
534
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
535
  verify_restore_url(response, status, params = new Object())
536
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
537
  this.ajaxurl = this.restore_script_url;
538
 
 
539
  jQuery(".xcloner-restore #xcloner_restore_finish").hide();
540
 
541
- if(!response)
542
- {
543
- this.cancel = false;
544
- this.set_current_step = 0
545
- this.do_ajax("verify_restore_url");
546
- }else{
547
 
548
- if(!status)
549
- {
550
- document.dispatchEvent(new CustomEvent("restore_script_invalid"));
551
- document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text", {detail: {status:'error', message: response.status+" "+response.statusText }}));
552
- //document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress", {detail: {percent: 100 }}));
553
-
554
- }else{
555
-
556
- document.dispatchEvent(new CustomEvent("restore_script_valid"));
557
- document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text", {detail: {message: "Validation ok." }}));
558
-
559
- this.next_step();
560
- }
561
- }
562
  }
563
 
564
- next_step()
 
 
 
 
 
 
 
 
 
 
 
 
565
  {
566
  this.set_current_step = jQuery(".xcloner-restore li.active").attr("data-step");
567
 
 
 
568
  document.dispatchEvent(new CustomEvent("xcloner_restore_next_step", {detail: {$this: this}}));
569
 
570
  }
571
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
572
  init_resume()
573
  {
574
  this.resume = new Object()
@@ -582,7 +715,12 @@ class Xcloner_Restore{
582
  /** global: ajaxurl */
583
  do_ajax(callback, action="", params= new Object())
584
  {
585
- params.action = action
 
 
 
 
 
586
  params.hash = this.hash
587
  params.API_ID = ID()
588
 
@@ -616,6 +754,10 @@ class Xcloner_Restore{
616
  $this[callback](xhr, false);
617
  }
618
  }).done(function(json) {
 
 
 
 
619
 
620
  if(json.status != 200){
621
  if(json.error)
@@ -756,6 +898,10 @@ jQuery(document).ready(function(){
756
  xcloner_restore.restore_finish();
757
  })
758
 
 
 
 
 
759
  jQuery(".xcloner-restore #refresh_remote_backup_file").on("click", function(e){
760
  document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress", {detail: {percent: 0 }}));
761
  xcloner_restore.resume = new Object();
@@ -770,7 +916,7 @@ jQuery(document).ready(function(){
770
  e.stopPropagation();
771
  })
772
 
773
- jQuery(".xcloner-restore #toggle_file_restore_display").on("click", function(){
774
  jQuery(".xcloner-restore .restore-remote-backup-step .files-list").toggle();
775
  })
776
 
@@ -798,6 +944,16 @@ jQuery(document).ready(function(){
798
 
799
  })
800
 
 
 
 
 
 
 
 
 
 
 
801
  jQuery(".xcloner-restore .restore-remote-backup-step .restore_remote_backup").click(function(){
802
  if(jQuery(this).hasClass('cancel'))
803
  xcloner_restore.set_cancel(true);
11
  this.upload_file_event = new Event('upload_file_event');
12
  this.resume = new Object();
13
  this.hash = hash;
14
+ this.local_restore = 0;
15
+ this.file_counter = 0;
16
 
17
  document.addEventListener("backup_upload_finish", function (e) {
18
 
49
  document.addEventListener("xcloner_populate_remote_backup_files_list", function (e) {
50
 
51
  var files = e.detail.files
52
+ var original_value = jQuery('.xcloner-restore #remote_backup_file').val();
53
 
54
  jQuery('.xcloner-restore #remote_backup_file').find('option').not(':first').remove();
55
 
58
  {
59
  var selected = "not-selected";
60
 
61
+ if(files[key].selected || original_value == files[key].path)
62
+ {
63
  selected = "selected";
64
+ }
65
 
66
  jQuery('.xcloner-restore #remote_backup_file').append("<option value='"+files[key].path+"' "+selected+">"+files[key].path+"("+e.detail.$this.getSize(files[key].size)+" MB)"+"</option>").addClass("file");
67
  }
71
  document.addEventListener("xcloner_populate_remote_mysqldump_files_list", function (e) {
72
 
73
  var files = e.detail.files
74
+ var original_value = jQuery('.xcloner-restore #remote_database_file').val();
75
 
76
  jQuery('.xcloner-restore #remote_database_file').find('option').not(':first').remove();
77
 
78
  for( var key in files)
79
  {
80
+ if(files[key].selected || original_value == files[key].path)
81
  var selected = "selected";
82
  else
83
  var selected = "not-selected";
140
 
141
  document.addEventListener("xcloner_populate_remote_restore_path", function (e) {
142
 
143
+ //dir: response.statusText.dir, restore_script_url: response.statusText.restore_script_url
144
  if(e.detail.dir !== undefined)
145
  {
146
  if(!jQuery(".xcloner-restore #remote_restore_path").val())
150
  if(e.detail.restore_script_url !== undefined)
151
  {
152
  if(!jQuery(".xcloner-restore #remote_restore_url").val())
153
+ {
154
  jQuery(".xcloner-restore #remote_restore_url").val(e.detail.restore_script_url);
155
+ }
156
 
157
  if(!jQuery(".xcloner-restore #remote_restore_site_url").val())
158
+ {
159
  jQuery(".xcloner-restore #remote_restore_site_url").val(e.detail.restore_script_url);
160
+ }
161
+
162
+ if(!jQuery(".xcloner-restore #remote_mysql_host").val())
163
+ {
164
+ jQuery(".xcloner-restore #remote_mysql_host").val(e.detail.remote_mysql_host);
165
+ }
166
+ if(!jQuery(".xcloner-restore #remote_mysql_db").val())
167
+ {
168
+ jQuery(".xcloner-restore #remote_mysql_db").val(e.detail.remote_mysql_db);
169
+ }
170
+ if(!jQuery(".xcloner-restore #remote_mysql_user").val())
171
+ {
172
+ jQuery(".xcloner-restore #remote_mysql_user").val(e.detail.remote_mysql_user);
173
+ }
174
+
175
+ if(!jQuery(".xcloner-restore #remote_mysql_pass").val())
176
+ {
177
+ jQuery(".xcloner-restore #remote_mysql_pass").val(e.detail.remote_mysql_pass);
178
+ }
179
+
180
  }
181
 
182
  }, false);
190
  {
191
  files_text[i] = "<li>"+(e.detail.files[i])+"</li>";
192
  }
193
+ if(!jQuery('.xcloner-restore .restore-remote-backup-step .files-list').is(":hidden"))
194
+ {
195
+ jQuery('.xcloner-restore .restore-remote-backup-step .files-list').prepend(files_text.reverse().join("\n"));
196
+ }
197
+ }else if(!jQuery.isArray(e.detail.files)){
198
  jQuery('.xcloner-restore .restore-remote-backup-step .files-list').html("");
199
  }
200
 
217
  document.addEventListener("xcloner_restore_finish", function (e) {
218
 
219
  jQuery(".xcloner-restore #xcloner_restore_finish").show();
220
+ jQuery(".xcloner-restore #open_target_site a").removeAttr("disabled");
221
 
222
  }, false);
223
 
295
  {
296
  if(status)
297
  {
298
+ document.dispatchEvent(new CustomEvent("xcloner_populate_remote_restore_path", {detail: response.statusText}))
299
  }
300
  }
301
 
335
  params.part = response.statusText.part
336
  params.processed = response.statusText.processed
337
 
338
+ document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text", {detail: {message: 'Processing <strong>'+response.statusText.backup_file+'</strong>- processed '+this.getSize(processed, 1024)+" KB from archive"}}));
339
 
340
  this.do_ajax('remote_restore_backup_file_callback', 'restore_backup_to_path', params)
341
  return
355
  var params = new Object()
356
  params.backup_file = backup_file
357
  params.remote_path = remote_path
358
+ params.filter_files = jQuery(".xcloner-restore input[name=filter_files]:checked").val()
359
 
360
  if(this.resume.callback == "remote_restore_backup_file_callback")
361
  {
567
  }
568
  }
569
 
570
+ verify_restore_url_callback(response, status, params = new Object())
571
+ {
572
+ if(!status)
573
+ {
574
+ document.dispatchEvent(new CustomEvent("restore_script_invalid"));
575
+ document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text", {detail: {status:'error', message: "Could not access the restore script: "+response.status+" "+response.statusText }}));
576
+ //document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress", {detail: {percent: 100 }}));
577
+
578
+ }else{
579
+
580
+ document.dispatchEvent(new CustomEvent("restore_script_valid"));
581
+ document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text", {detail: {message: "Validation ok." }}));
582
+
583
+ if(this.local_restore)
584
+ {
585
+ this.next_step(1);
586
+ }else{
587
+ this.next_step();
588
+ }
589
+ }
590
+
591
+ }
592
+
593
  verify_restore_url(response, status, params = new Object())
594
  {
595
+ if(this.restore_script_url == "http://" || this.restore_script_url == "https://" || this.restore_script_url == "" || this.restore_script_url === undefined)
596
+ {
597
+ this.restore_script_url = ajaxurl+"?action=restore_backup";
598
+ this.local_restore = 1;
599
+ //jQuery("#remote-restore-options").hide();
600
+ //jQuery("#update_remote_site_url").attr("disabled", "disabled").removeAttr("checked");
601
+ jQuery("#delete_restore_script").attr("disabled", "disabled").removeAttr("checked");
602
+ }else{
603
+ this.local_restore = 0;
604
+ //jQuery("#remote-restore-options").show();
605
+ //jQuery("#update_remote_site_url").attr("checked", "checked").removeAttr("disabled");
606
+ jQuery("#delete_restore_script").attr("checked", "checked").removeAttr("disabled");
607
+ }
608
+
609
  this.ajaxurl = this.restore_script_url;
610
 
611
+
612
  jQuery(".xcloner-restore #xcloner_restore_finish").hide();
613
 
614
+ this.cancel = false;
615
+ this.set_current_step = 0
616
+
617
+ this.do_ajax("verify_restore_url_callback");
 
 
618
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
619
  }
620
 
621
+ open_target_site(elem)
622
+ {
623
+ var url = jQuery(".xcloner-restore #remote_restore_url").val();
624
+
625
+ if(!url )
626
+ {
627
+ jQuery(".xcloner-restore #wp_home_url").val();
628
+ }
629
+
630
+ jQuery(elem).attr("href", url);
631
+ }
632
+
633
+ next_step(inc = 0)
634
  {
635
  this.set_current_step = jQuery(".xcloner-restore li.active").attr("data-step");
636
 
637
+ this.set_current_step = parseInt(this.set_current_step) + parseInt(inc);
638
+
639
  document.dispatchEvent(new CustomEvent("xcloner_restore_next_step", {detail: {$this: this}}));
640
 
641
  }
642
 
643
+ list_backup_content_callback(response, status, params = new Object())
644
+ {
645
+ if(response.error)
646
+ {
647
+ jQuery("#backup_cotent_modal .files-list").addClass("error").prepend(response.statusText)
648
+ jQuery("#backup_cotent_modal .progress > div").addClass("determinate").removeClass(".indeterminate").css('width', "100%")
649
+ return;
650
+ }
651
+
652
+ response = response.statusText;
653
+
654
+ var files_text = [];
655
+
656
+ for(var i in response.files)
657
+ {
658
+
659
+ if(response.total_size !== undefined)
660
+ {
661
+ var percent = parseInt(response.start*100)/parseInt(response.total_size)
662
+ //jQuery("#backup_cotent_modal .progress .determinate").css('width', percent + "%")
663
+ }
664
+
665
+ this.file_counter++
666
+
667
+ files_text[i] = "<li>"+(this.file_counter +". <span title='"+response.files[i].mtime+"'>"+response.files[i].path+"</span> ("+response.files[i].size+" bytes)")+"</li>";
668
+ }
669
+
670
+ jQuery("#backup_cotent_modal .modal-content .files-list").prepend(files_text.reverse().join("\n"));
671
+
672
+ if(!response.finished && jQuery('#backup_cotent_modal').is(':visible'))
673
+ {
674
+ //$this.list_backup_content_callback(backup_file, response.start, response.part)
675
+ params.start = response.start
676
+ params.part = response.part
677
+
678
+ this.do_ajax("list_backup_content_callback", "list_backup_files", params);
679
+ }
680
+ else
681
+ {
682
+ jQuery("#backup_cotent_modal .progress > div").addClass('determinate').removeClass(".indeterminate").css('width', "100%")
683
+ }
684
+
685
+ }
686
+
687
+
688
+ list_backup_content(backup_file)
689
+ {
690
+ this.file_counter = 0
691
+ jQuery("#backup_cotent_modal .modal-content .files-list").text("").removeClass("error");
692
+ jQuery("#backup_cotent_modal .modal-content .backup-name").text(backup_file);
693
+ jQuery("#backup_cotent_modal").modal('open');
694
+ jQuery("#backup_cotent_modal .progress > div").removeClass('determinate').addClass("indeterminate");
695
+
696
+ //this.list_backup_content_callback(backup_file)
697
+ var params = new Object()
698
+ params.file = backup_file
699
+ params.start = 0
700
+ params.part = 0
701
+
702
+ this.do_ajax("list_backup_content_callback", "list_backup_files", params);
703
+ }
704
+
705
  init_resume()
706
  {
707
  this.resume = new Object()
715
  /** global: ajaxurl */
716
  do_ajax(callback, action="", params= new Object())
717
  {
718
+ if(action == "restore_upload_backup")
719
+ {
720
+ params.action = "restore_upload_backup";
721
+ }
722
+
723
+ params.xcloner_action = action
724
  params.hash = this.hash
725
  params.API_ID = ID()
726
 
754
  $this[callback](xhr, false);
755
  }
756
  }).done(function(json) {
757
+ if(!json)
758
+ {
759
+ document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text", {detail: {status: 'error', message: "Lost connection with the API, please try and authentificate again"}}));
760
+ }
761
 
762
  if(json.status != 200){
763
  if(json.error)
898
  xcloner_restore.restore_finish();
899
  })
900
 
901
+ jQuery(".xcloner-restore #open_target_site a").click(function(){
902
+ xcloner_restore.open_target_site(this);
903
+ })
904
+
905
  jQuery(".xcloner-restore #refresh_remote_backup_file").on("click", function(e){
906
  document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress", {detail: {percent: 0 }}));
907
  xcloner_restore.resume = new Object();
916
  e.stopPropagation();
917
  })
918
 
919
+ jQuery(".xcloner-restore #toggle_file_restore_display").on("click", function(e){
920
  jQuery(".xcloner-restore .restore-remote-backup-step .files-list").toggle();
921
  })
922
 
944
 
945
  })
946
 
947
+ jQuery(".xcloner-restore .list-backup-content").on("click", function(e){
948
+ var id = jQuery(".xcloner-restore #remote_backup_file").val()
949
+
950
+ if(id)
951
+ {
952
+ xcloner_restore.list_backup_content(id);
953
+ }
954
+ e.preventDefault();
955
+ });
956
+
957
  jQuery(".xcloner-restore .restore-remote-backup-step .restore_remote_backup").click(function(){
958
  if(jQuery(this).hasClass('cancel'))
959
  xcloner_restore.set_cancel(true);
admin/js/xcloner-scheduler-class.js CHANGED
@@ -74,7 +74,9 @@ jQuery(document).ready(function(){
74
  this.edit_modal.find("#schedule_name").val(response.name)
75
  this.edit_modal.find("#backup_name").val(response.backup_params.backup_name)
76
  this.edit_modal.find("#email_notification").val(response.backup_params.email_notification)
 
77
  this.edit_modal.find('#schedule_frequency>option[value="' + response.recurrence + '"]').prop('selected', true);
 
78
  this.edit_modal.find('#schedule_storage>option[value="' + response.remote_storage + '"]').prop('selected', true);
79
  //var date = new Date(response.start_at);
80
  this.edit_modal.find("#schedule_start_date").val(response.start_at)
@@ -229,4 +231,14 @@ jQuery(document).ready(function(){
229
  }
230
  });
231
 
 
 
 
 
 
 
 
 
 
 
232
  });
74
  this.edit_modal.find("#schedule_name").val(response.name)
75
  this.edit_modal.find("#backup_name").val(response.backup_params.backup_name)
76
  this.edit_modal.find("#email_notification").val(response.backup_params.email_notification)
77
+ this.edit_modal.find("#diff_start_date").val(response.backup_params.diff_start_date)
78
  this.edit_modal.find('#schedule_frequency>option[value="' + response.recurrence + '"]').prop('selected', true);
79
+ this.edit_modal.find('#backup_type>option[value="' + response.backup_type + '"]').prop('selected', true);
80
  this.edit_modal.find('#schedule_storage>option[value="' + response.remote_storage + '"]').prop('selected', true);
81
  //var date = new Date(response.start_at);
82
  this.edit_modal.find("#schedule_start_date").val(response.start_at)
231
  }
232
  });
233
 
234
+ var date_picker_allowed = jQuery('.datepicker_max_today').pickadate({
235
+ format: 'yyyy-mm-dd',
236
+ selectMonths: true, // Creates a dropdown to control month
237
+ selectYears: 15, // Creates a dropdown of 15 years to control year
238
+ max: +0.1,
239
+ onSet: function() {
240
+ //this.close();
241
+ }
242
+ });
243
+
244
  });
admin/partials/xcloner_generate_backups_page.php CHANGED
@@ -2,6 +2,7 @@
2
  $xcloner_settings = $this->get_xcloner_container()->get_xcloner_settings();
3
  $xcloner_remote_storage = $this->get_xcloner_container()->get_xcloner_remote_storage();
4
  $available_storages = $xcloner_remote_storage->get_available_storages();
 
5
  $tab = 1;
6
  ?>
7
 
@@ -36,7 +37,7 @@ $tab = 1;
36
 
37
  <div class="row">
38
  <div class="input-field inline col s12 m10 l6">
39
- <i class="material-icons prefix">input</i>
40
  <input name="email_notification" id="email_notification" type="text" value="<?php echo get_option('admin_email');?>" >
41
  <label for="email_notification"><?php echo __('Send Email Notification To','xcloner-backup-and-restore')?></label>
42
  </div>
@@ -45,6 +46,17 @@ $tab = 1;
45
  </div>
46
  </div>
47
 
 
 
 
 
 
 
 
 
 
 
 
48
  <div class="row">
49
  <div class="input-field col s12 m10 l6">
50
  <i class="material-icons prefix">input</i>
@@ -222,14 +234,8 @@ $tab = 1;
222
  </div>
223
  </div>
224
 
225
- <!--<div class="row server-time">
226
- <div class="col s12 m10 l6 teal lighten-1">
227
- <h2><?php echo __('Current Server Time', 'xcloner-backup-and-restore')?>: <span class="right"><?php echo date("Y/m/d H:i")?></span></h2>
228
- </div>
229
- </div>
230
- -->
231
  <div class="row">
232
- <div class="input-field inline col s12 m12 l7">
233
  <input type="text" id="schedule_name" class="" name="schedule_name" required>
234
  <label for="schedule_name"><?php echo __('Schedule Name', 'xcloner-backup-and-restore') ?></label>
235
  </div>
@@ -246,20 +252,44 @@ $tab = 1;
246
  </div>
247
  </div>
248
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
249
  <div class="row">
250
  <div class="input-field col s12 l7">
251
  <select name="schedule_frequency" id="schedule_frequency" class="validate" required>
252
  <option value="" disabled selected><?php echo __('please select', 'xcloner-backup-and-restore') ?></option>
253
- <option value="single"><?php echo __("Don't Repeat",'xcloner-backup-and-restore')?></option>
254
- <option value="hourly"><?php echo __("Hourly",'xcloner-backup-and-restore')?></option>
255
- <option value="daily"><?php echo __("Daily",'xcloner-backup-and-restore')?></option>
256
- <option value="weekly"><?php echo __("Weekly",'xcloner-backup-and-restore')?></option>
257
- <option value="monthly"><?php echo __("Monthly",'xcloner-backup-and-restore')?></option>
258
- </select>
259
- <label><?php echo __('Please Select Frequency to run', 'xcloner-backup-and-restore') ?></label>
 
 
 
 
 
260
  </div>
261
  </div>
262
-
263
  <?php if(sizeof($available_storages)):?>
264
  <div class="row">
265
  <div class="input-field col s12 m12 l7">
@@ -299,7 +329,6 @@ $tab = 1;
299
  </div>
300
 
301
  <!-- List Backup Content Modal-->
302
-
303
  <div id="backup_cotent_modal" class="modal">
304
  <div class="modal-content">
305
  <h4><?php echo sprintf(__("Listing Backup Content ",'xcloner-backup-and-restore'), "")?></h4>
@@ -411,6 +440,16 @@ jQuery(function () {
411
  }
412
  });
413
 
 
 
 
 
 
 
 
 
 
 
414
  <?php if($xcloner_settings->get_enable_mysql_backup()):?>
415
  jQuery('#jstree_database_container').jstree({
416
  'core' : {
2
  $xcloner_settings = $this->get_xcloner_container()->get_xcloner_settings();
3
  $xcloner_remote_storage = $this->get_xcloner_container()->get_xcloner_remote_storage();
4
  $available_storages = $xcloner_remote_storage->get_available_storages();
5
+ $xcloner_scheduler = $this->get_xcloner_container()->get_xcloner_scheduler();
6
  $tab = 1;
7
  ?>
8
 
37
 
38
  <div class="row">
39
  <div class="input-field inline col s12 m10 l6">
40
+ <i class="material-icons prefix">email</i>
41
  <input name="email_notification" id="email_notification" type="text" value="<?php echo get_option('admin_email');?>" >
42
  <label for="email_notification"><?php echo __('Send Email Notification To','xcloner-backup-and-restore')?></label>
43
  </div>
46
  </div>
47
  </div>
48
 
49
+ <div class="row">
50
+ <div class="input-field inline col s10 m10 l6">
51
+ <i class="material-icons prefix">access_time</i>
52
+ <input type="datetime-local" id="diff_start_date" class="datepicker_max_today" name="diff_start_date" >
53
+ <label for="diff_start_date"><?php echo __('Backup Only Files Modified/Created After','xcloner-backup-and-restore')?></label>
54
+ </div>
55
+ <div class="hide-on-small-only m2">
56
+ <a class="btn-floating tooltipped btn-small" data-html="true" data-position="center" data-delay="50" data-tooltip="<?php echo __("This option allows you to create a differential backup that will include only <br> changed files since the set date, leave blank to include all files", "xcloner-backup-and-restore")?>"><i class="material-icons">help_outline</i></a>
57
+ </div>
58
+ </div>
59
+
60
  <div class="row">
61
  <div class="input-field col s12 m10 l6">
62
  <i class="material-icons prefix">input</i>
234
  </div>
235
  </div>
236
 
 
 
 
 
 
 
237
  <div class="row">
238
+ <div class="input-field inline col s12 l7">
239
  <input type="text" id="schedule_name" class="" name="schedule_name" required>
240
  <label for="schedule_name"><?php echo __('Schedule Name', 'xcloner-backup-and-restore') ?></label>
241
  </div>
252
  </div>
253
  </div>
254
 
255
+ <!--
256
+ <div class="row">
257
+ <div class="input-field inline col s10 m11 l7">
258
+ <select id="backup_type" class="" name="backup_type">
259
+ <option value=""><?php echo __("Full Backup","xcloner-backup-and-restore");?></option>
260
+ <option value="diff"><?php echo __("Differential Backups","xcloner-backup-and-restore");?></option>
261
+ <option value="full_diff"><?php echo __("Full Backup + Differential Backups","xcloner-backup-and-restore");?></option>
262
+ </select>
263
+ <label for="backup_type"><?php echo __('Scheduled Backup Type','xcloner-backup-and-restore')?></label>
264
+ </div>
265
+ <div class="col s2 m1">
266
+ <a class="btn-floating tooltipped btn-small" data-html="true" data-position="center" data-delay="50" data-tooltip="<ul style='max-width:760px; text-align:left;'>
267
+ <li><?php echo __("Full Backup = it will generate a full backup of all included files each time schedule runs","xcloner-backup-and-restore");?></li>
268
+ <li><?php echo __("Differentials Backups = backups will include only changed files since the schedule started to run","xcloner-backup-and-restore");?></li>
269
+ <li><?php echo __("Full Backup + Differential Backups = the first time schedule runs, it will create a full backup and all next scheduled backups will include only files created/modified since that last full backup; a full backup is recreated when the number of changed files is bigger than the 'Differetial Backups Max Days' XCloner option.","xcloner-backup-and-restore");?></li>
270
+ </ul>"><i class="material-icons">help_outline</i></a>
271
+ </div>
272
+ </div>
273
+ -->
274
  <div class="row">
275
  <div class="input-field col s12 l7">
276
  <select name="schedule_frequency" id="schedule_frequency" class="validate" required>
277
  <option value="" disabled selected><?php echo __('please select', 'xcloner-backup-and-restore') ?></option>
278
+ <?php
279
+ $schedules = $xcloner_scheduler->get_available_intervals();
280
+
281
+ foreach($schedules as $key=>$schedule)
282
+ {
283
+ ?>
284
+ <option value="<?php echo $key?>"><?php echo $schedule['display']?></option>
285
+ <?php
286
+ }
287
+ ?>
288
+ </select>
289
+ <label><?php echo __('Schedule Frequency', 'xcloner-backup-and-restore') ?></label>
290
  </div>
291
  </div>
292
+
293
  <?php if(sizeof($available_storages)):?>
294
  <div class="row">
295
  <div class="input-field col s12 m12 l7">
329
  </div>
330
 
331
  <!-- List Backup Content Modal-->
 
332
  <div id="backup_cotent_modal" class="modal">
333
  <div class="modal-content">
334
  <h4><?php echo sprintf(__("Listing Backup Content ",'xcloner-backup-and-restore'), "")?></h4>
440
  }
441
  });
442
 
443
+ var date_picker_allowed = jQuery('.datepicker_max_today').pickadate({
444
+ format: 'd mmmm yyyy',
445
+ selectMonths: true, // Creates a dropdown to control month
446
+ selectYears: 15, // Creates a dropdown of 15 years to control year
447
+ max: +0.1,
448
+ onSet: function() {
449
+ //this.close();
450
+ }
451
+ });
452
+
453
  <?php if($xcloner_settings->get_enable_mysql_backup()):?>
454
  jQuery('#jstree_database_container').jstree({
455
  'core' : {
admin/partials/xcloner_init_page.php CHANGED
@@ -150,7 +150,11 @@ if($requirements->check_backup_ready_status())
150
  <li class="active">
151
  <div class="collapsible-header active">
152
  <i class="material-icons">bug_report</i><?php echo __('XCloner Debugger', 'xcloner-backup-and-restore')?>
153
- <span class="right"><a href="#<?php echo $logger_basename = basename($logger->get_main_logger_url())?>" class="download-logger"><?php echo $logger_basename?></a></span>
 
 
 
 
154
  </div>
155
  <div class="collapsible-body">
156
  <div class="console" id="xcloner-console"><?php if($logger_content) echo implode("<br />\n", array_reverse($logger_content)); ?></div>
150
  <li class="active">
151
  <div class="collapsible-header active">
152
  <i class="material-icons">bug_report</i><?php echo __('XCloner Debugger', 'xcloner-backup-and-restore')?>
153
+ <div class="right">
154
+ <a href="#<?php echo $logger_basename = basename($logger->get_main_logger_url())?>" class="download-logger" title="<?php echo $logger_basename?>">
155
+ <span class="shorten_string"><?php echo $logger_basename?>&nbsp;&nbsp;&nbsp;</span>
156
+ </a>
157
+ </div>
158
  </div>
159
  <div class="collapsible-body">
160
  <div class="console" id="xcloner-console"><?php if($logger_content) echo implode("<br />\n", array_reverse($logger_content)); ?></div>
admin/partials/xcloner_remote_storage_page.php CHANGED
@@ -172,10 +172,10 @@ $gdrive_construct = $remote_storage->gdrive_construct();
172
 
173
  <div class="row">
174
  <div class="col s12 m3 label">
175
- <label for="sftp_password"><?php echo __("SFTP Password",'xcloner-backup-and-restore')?></label>
176
  </div>
177
  <div class=" col s12 m6">
178
- <input placeholder="<?php echo __("SFTP Password",'xcloner-backup-and-restore')?>" id="ftp_spassword" type="password" name="xcloner_sftp_password" class="validate" value="<?php echo get_option("xcloner_sftp_password")?>" autocomplete="off" >
179
  </div>
180
  </div>
181
 
172
 
173
  <div class="row">
174
  <div class="col s12 m3 label">
175
+ <label for="sftp_password"><?php echo __("SFTP or Private Key Password",'xcloner-backup-and-restore')?></label>
176
  </div>
177
  <div class=" col s12 m6">
178
+ <input placeholder="<?php echo __("SFTP or Private Key Password",'xcloner-backup-and-restore')?>" id="ftp_spassword" type="password" name="xcloner_sftp_password" class="validate" value="<?php echo get_option("xcloner_sftp_password")?>" autocomplete="off" >
179
  </div>
180
  </div>
181
 
admin/partials/xcloner_restore_page.php CHANGED
@@ -25,7 +25,9 @@ $backup_list = $xcloner_file_system->get_latest_backups();
25
  <div class="collapsible-body row">
26
 
27
  <ul class="text-steps">
28
- <li><?php echo __("Please download the restore script from",'xcloner-backup-and-restore')?> <a href='#' onclick="window.location=ajaxurl+'?action=download_restore_script&phar=true'"><strong><?php echo __("here",'xcloner-backup-and-restore')?></strong></a>
 
 
29
  </li>
30
  <li>
31
  <?php echo __("Extract the files on your new host",'xcloner-backup-and-restore')?>
@@ -45,12 +47,12 @@ $backup_list = $xcloner_file_system->get_latest_backups();
45
  </ul>
46
 
47
  <div class="input-field col l9 s12">
48
- <input value="<?php echo (is_ssl())?"https://":"http://"?>" id="restore_script_url" type="text" class="validate" placeholder="Url to XCloner Restore Script, example http://myddns.com/xcloner/xcloner_restore.php" >
49
  <label for="restore_script_url"></label>
50
  <div id="url_validation_status" class="status"></div>
51
  </div>
52
  <div class="col l3 s12 right-align">
53
- <button class="btn waves-effect waves-light" type="submit" id="validate_url" name="action"><?php echo __("Check",'xcloner-backup-and-restore')?>
54
  <i class="material-icons right">send</i>
55
  </button>
56
  </div>
@@ -58,13 +60,13 @@ $backup_list = $xcloner_file_system->get_latest_backups();
58
  </li>
59
 
60
  <li data-step="2" class="backup-upload-step steps">
61
- <div class="collapsible-header active"><i class="material-icons">file_upload</i><?php echo __("Upload Local Backup Archive To Remote Host",'xcloner-backup-and-restore')?>
62
  </div>
63
  <div class="collapsible-body row">
64
  <p><?php echo __("You can skip this step if you want to transfer the archive in some other way, make sure you upload it in the same directory as the restore script from the previous step.",'xcloner-backup-and-restore')?></p>
65
  <div class="input-field col s12 l7">
66
  <select id="backup_file" name="backup_file" class="browser-default">
67
- <option value="" disabled selected><?php echo __("Please select a local backup archive to upload to remote host",'xcloner-backup-and-restore')?></option>
68
  <?php if(is_array($backup_list)):?>
69
  <?php foreach($backup_list as $file):?>
70
  <option value="<?php echo $file['basename']?>">
@@ -97,13 +99,13 @@ $backup_list = $xcloner_file_system->get_latest_backups();
97
  </li>
98
 
99
  <li data-step="3" class="restore-remote-backup-step steps active">
100
- <div class="collapsible-header"><i class="material-icons">folder_open</i><?php echo __("Restore Files Backup Available On Remote Host",'xcloner-backup-and-restore')?>
101
- <i class="material-icons right" title="Refresh Remote Backup Files List" id="refresh_remote_backup_file">cached</i>
102
 
103
  <div class="switch right">
104
  <label>
105
  <?php echo __('Verbose Output', 'xcloner-backup-and-restore')?>
106
- <input type="checkbox" id="toggle_file_restore_display" name="toggle_file_restore_display" checked value="1">
107
  <span class="lever"></span>
108
 
109
  </label>
@@ -111,17 +113,49 @@ $backup_list = $xcloner_file_system->get_latest_backups();
111
  </div>
112
  <div class="collapsible-body row">
113
 
114
- <div class=" col s12 l7">
115
  <div class="input-field row">
116
- <input type="text" name="remote_restore_path" id="remote_restore_path" class="validate" placeholder="Restore Target Path">
117
- <label><?php echo __("Remote Restore Target Path",'xcloner-backup-and-restore')?></label>
 
 
 
 
 
 
 
 
118
  </div>
119
 
120
  <div class="input-field row">
121
- <select id="remote_backup_file" name="remote_backup_file" class="browser-default">
122
- <option value="" disabled selected><?php echo __("Please select the remote backup file to restore",'xcloner-backup-and-restore')?></option>
123
- </select>
124
- <label></label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  </div>
126
 
127
  <div class="progress">
@@ -129,10 +163,10 @@ $backup_list = $xcloner_file_system->get_latest_backups();
129
  </div>
130
 
131
  <div class="status"></div>
132
- <ul class="files-list"></ul>
133
- </div>
134
 
135
- <div class="col s12 l5 right-align">
136
  <div class="toggler">
137
  <button class="btn waves-effect waves-light restore_remote_backup normal " type="submit" id="" name="action"><?php echo __("Restore",'xcloner-backup-and-restore')?>
138
  <i class="material-icons right">send</i>
@@ -149,41 +183,42 @@ $backup_list = $xcloner_file_system->get_latest_backups();
149
  </li>
150
 
151
  <li data-step="4" class="restore-remote-database-step steps active">
152
- <div class="collapsible-header"><i class="material-icons">list</i><?php echo __("Restore Remote Database - Search and Replace",'xcloner-backup-and-restore')?>
153
  <i class="material-icons right" title="Refresh Database Backup Files List" id="refresh_database_file">cached</i>
154
  </div>
155
  <div class="collapsible-body row">
156
 
 
157
  <div class="col s12">
158
- <a class="btn-floating tooltipped btn-small right" data-position="left" data-delay="50" data-tooltip="<?php echo __('Please provide below the mysql connection details for the remote host database.','xcloner-backup-and-restore')?>" data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i class="material-icons">help_outline</i></a>
159
- <h5><?php echo __('Remote Mysql Details','xcloner-backup-and-restore')?></h5>
160
  </div>
161
  <div class=" col s12">
162
  <div class="input-field col s12 m6">
163
- <input type="text" name="remote_mysql_host" id="remote_mysql_host" class="validate" placeholder="Remote Mysql Hostname" value="localhost">
164
- <label><?php echo __("Remote Mysql Hostname",'xcloner-backup-and-restore')?></label>
165
  </div>
166
 
167
  <div class="input-field col s12 m6">
168
- <input type="text" name="remote_mysql_db" id="remote_mysql_db" class="validate" placeholder="Remote Mysql Database">
169
- <label><?php echo __("Remote Mysql Database",'xcloner-backup-and-restore')?></label>
170
  </div>
171
 
172
  <div class="input-field col s12 m6">
173
- <input type="text" name="remote_mysql_user" id="remote_mysql_user" class="validate" placeholder="Remote Mysql Username">
174
- <label><?php echo __("Remote Mysql Username",'xcloner-backup-and-restore')?></label>
175
  </div>
176
 
177
 
178
  <div class="input-field col s12 m6">
179
- <input type="text" name="remote_mysql_pass" id="remote_mysql_pass" class="validate" placeholder="Remote Mysql Password">
180
- <label><?php echo __("Remote Mysql Password",'xcloner-backup-and-restore')?></label>
181
  </div>
182
 
183
  </div>
184
  <div class="col s12">
185
  <a class="btn-floating tooltipped btn-small right" data-position="left" data-delay="50" data-html="true" data-tooltip="<?php echo __('I will attempt to replace all mysql backup records matching the provided Source Url with the provided Target Url. <br />Leave blank the Target Url if you would like to skip this option. <br />As a bonus, I will also replace all matching serialized data and fix it\'s parsing.','xcloner-backup-and-restore')?>" data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i class="material-icons">help_outline</i></a>
186
- <h5><?php echo __('Remote Mysql Search and Replace','xcloner-backup-and-restore')?></h5>
187
  </div>
188
  <div class="col s12">
189
  <div class="input-field col s12 m6 ">
@@ -210,10 +245,12 @@ $backup_list = $xcloner_file_system->get_latest_backups();
210
  <?php endif;?>
211
  </div>
212
 
 
 
213
  <div class=" col s12 l7">
214
  <div class="input-field row">
215
  <select id="remote_database_file" name="remote_database_file" class="browser-default">
216
- <option value="" disabled selected><?php echo __("Please select the remote database backup file to restore",'xcloner-backup-and-restore')?></option>
217
  </select>
218
 
219
  <label></label>
@@ -225,7 +262,7 @@ $backup_list = $xcloner_file_system->get_latest_backups();
225
 
226
  <div class="status"></div>
227
  <div class="query-box">
228
- <h6><?php echo __('Use the field below to fix your mysql query and Retry again the Restore', 'xcloner-backup-and-restore')?></h6>
229
  <textarea class="query-list" cols="5"></textarea>
230
  </div>
231
  </div>
@@ -256,7 +293,7 @@ $backup_list = $xcloner_file_system->get_latest_backups();
256
 
257
  <div class="row">
258
  <div class="col s4">
259
- <label><?php echo __("Update wp-config.php mysql details and update the restored site Url",'xcloner-backup-and-restore')?></label>
260
  </div>
261
 
262
  <div class="col s8">
@@ -315,10 +352,19 @@ $backup_list = $xcloner_file_system->get_latest_backups();
315
  </div>
316
 
317
  <div class="col s12 center-align">
318
-
319
- <button class="btn waves-effect waves-light teal" type="submit" id="restore_finish" name="action"><?php echo __("Finish",'xcloner-backup-and-restore')?>
320
- <i class="material-icons right">navigate_next</i>
321
- </button>
 
 
 
 
 
 
 
 
 
322
  </div>
323
  </div>
324
  </li>
@@ -329,3 +375,15 @@ $backup_list = $xcloner_file_system->get_latest_backups();
329
 
330
 
331
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  <div class="collapsible-body row">
26
 
27
  <ul class="text-steps">
28
+ <li><?php echo __("If you want to do a local target system restore, leave Url field below empty and click 'Check Connection'",'xcloner-backup-and-restore')?>
29
+ </li>
30
+ <li><?php echo __("If you want to do a remote target system restore, please download the restore script from",'xcloner-backup-and-restore')?> <a href='#' onclick="window.location=ajaxurl+'?action=download_restore_script&phar=true'"><strong><?php echo __("here",'xcloner-backup-and-restore')?></strong></a>
31
  </li>
32
  <li>
33
  <?php echo __("Extract the files on your new host",'xcloner-backup-and-restore')?>
47
  </ul>
48
 
49
  <div class="input-field col l9 s12">
50
+ <input value="<?php echo (is_ssl())?"https://":""?>" id="restore_script_url" type="text" class="validate" placeholder="Url to XCloner Restore Script, example http://myddns.com/xcloner/xcloner_restore.php" >
51
  <label for="restore_script_url"></label>
52
  <div id="url_validation_status" class="status"></div>
53
  </div>
54
  <div class="col l3 s12 right-align">
55
+ <button class="btn waves-effect waves-light" type="submit" id="validate_url" name="action"><?php echo __("Check Connection",'xcloner-backup-and-restore')?>
56
  <i class="material-icons right">send</i>
57
  </button>
58
  </div>
60
  </li>
61
 
62
  <li data-step="2" class="backup-upload-step steps">
63
+ <div class="collapsible-header active"><i class="material-icons">file_upload</i><?php echo __("Upload Local Backup Archive To Target Host",'xcloner-backup-and-restore')?>
64
  </div>
65
  <div class="collapsible-body row">
66
  <p><?php echo __("You can skip this step if you want to transfer the archive in some other way, make sure you upload it in the same directory as the restore script from the previous step.",'xcloner-backup-and-restore')?></p>
67
  <div class="input-field col s12 l7">
68
  <select id="backup_file" name="backup_file" class="browser-default">
69
+ <option value="" disabled selected><?php echo __("Please select a local backup archive to upload to target host",'xcloner-backup-and-restore')?></option>
70
  <?php if(is_array($backup_list)):?>
71
  <?php foreach($backup_list as $file):?>
72
  <option value="<?php echo $file['basename']?>">
99
  </li>
100
 
101
  <li data-step="3" class="restore-remote-backup-step steps active">
102
+ <div class="collapsible-header"><i class="material-icons">folder_open</i><?php echo __("Restore Files Backup Available On Target Location",'xcloner-backup-and-restore')?>
103
+ <i class="material-icons right" title="Refresh Target Backup Files List" id="refresh_remote_backup_file">cached</i>
104
 
105
  <div class="switch right">
106
  <label>
107
  <?php echo __('Verbose Output', 'xcloner-backup-and-restore')?>
108
+ <input type="checkbox" id="toggle_file_restore_display" name="toggle_file_restore_display" class="" checked value="1">
109
  <span class="lever"></span>
110
 
111
  </label>
113
  </div>
114
  <div class="collapsible-body row">
115
 
116
+ <div class=" col s12 l8">
117
  <div class="input-field row">
118
+ <div class="col s12">
119
+ <a class="btn-floating tooltipped btn-small right" data-html="true" data-position="left" data-delay="50"
120
+ data-tooltip="<?php echo __("This is the directory where you would like to restore the backup archive files.<br />
121
+ Please use this with caution when restoring to a live site.",'xcloner-backup-and-restore')?>"><i class="material-icons">help_outline</i>
122
+ </a>
123
+ <h5><?php echo __("Restore Target Path:",'xcloner-backup-and-restore')?></h5>
124
+ <input type="text" name="remote_restore_path" id="remote_restore_path" class="validate" placeholder="Restore Target Path">
125
+ <label></label>
126
+ </div>
127
+
128
  </div>
129
 
130
  <div class="input-field row">
131
+ <div class="col s12">
132
+ <a href="#backup_localhost-2017-04-03_10-58-sql-diff2017-03-22_00-00-5b6c4.tgz"
133
+ class="list-backup-content btn-floating tooltipped btn-small right" data-tooltip="<?php echo __('Click To List The Selected Backup Content', 'xcloner-backup-and-restore') ?>">
134
+ <i class="material-icons">folder_open</i>
135
+ </a>
136
+ <h5><?php echo __("Restore Backup Archive:",'xcloner-backup-and-restore')?></h5>
137
+ <select id="remote_backup_file" name="remote_backup_file" class="browser-default">
138
+ <option value="" disabled selected><?php echo __("Please select the target backup file to restore",'xcloner-backup-and-restore')?></option>
139
+ </select>
140
+ <label></label>
141
+ </div>
142
+
143
+ <div class="col s12">
144
+ <input class="with-gap" name="filter_files" type="radio" id="filter_files_all" checked value="" />
145
+ <label for="filter_files_all"><?php echo __("Restore All Files","xcloner-backup-and-restore")?></label>
146
+
147
+ <input class="with-gap" name="filter_files" type="radio" id="filter_files_plugins" value="/^wp-content\/plugins(.*)/" />
148
+ <label for="filter_files_plugins"><?php echo __("Only Plugins","xcloner-backup-and-restore")?></label>
149
+
150
+ <input class="with-gap" name="filter_files" type="radio" id="filter_files_uploads" value="/^wp-content\/uploads(.*)/" />
151
+ <label for="filter_files_uploads"><?php echo __("Only Uploads","xcloner-backup-and-restore")?></label>
152
+
153
+ <input class="with-gap" name="filter_files" type="radio" id="filter_files_themes" value="/^wp-content\/themes(.*)/" />
154
+ <label for="filter_files_themes"><?php echo __("Only Themes","xcloner-backup-and-restore")?></label>
155
+
156
+ <input class="with-gap" name="filter_files" type="radio" id="filter_files_database" value="/^xcloner-(.*)\/(.*)\.sql/"/>
157
+ <label for="filter_files_database"><?php echo __("Only Database Backup","xcloner-backup-and-restore")?></label>
158
+ </div>
159
  </div>
160
 
161
  <div class="progress">
163
  </div>
164
 
165
  <div class="status"></div>
166
+ <ul class="files-list"></ul>
167
+ </div>
168
 
169
+ <div class="col s12 l4 right-align">
170
  <div class="toggler">
171
  <button class="btn waves-effect waves-light restore_remote_backup normal " type="submit" id="" name="action"><?php echo __("Restore",'xcloner-backup-and-restore')?>
172
  <i class="material-icons right">send</i>
183
  </li>
184
 
185
  <li data-step="4" class="restore-remote-database-step steps active">
186
+ <div class="collapsible-header"><i class="material-icons">list</i><?php echo __("Restore Target Database - Search and Replace",'xcloner-backup-and-restore')?>
187
  <i class="material-icons right" title="Refresh Database Backup Files List" id="refresh_database_file">cached</i>
188
  </div>
189
  <div class="collapsible-body row">
190
 
191
+ <div id="remote-restore-options">
192
  <div class="col s12">
193
+ <a class="btn-floating tooltipped btn-small right" data-position="left" data-delay="50" data-html="true" data-tooltip="<?php echo __('Please provide below the mysql connection details for the target host database.<br />For live sites we recommend using a new separate database.','xcloner-backup-and-restore')?>" data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i class="material-icons">help_outline</i></a>
194
+ <h5><?php echo __('Target Mysql Details','xcloner-backup-and-restore')?></h5>
195
  </div>
196
  <div class=" col s12">
197
  <div class="input-field col s12 m6">
198
+ <input type="text" name="remote_mysql_host" id="remote_mysql_host" class="validate" placeholder="Target Mysql Hostname">
199
+ <label><?php echo __("Target Mysql Hostname",'xcloner-backup-and-restore')?></label>
200
  </div>
201
 
202
  <div class="input-field col s12 m6">
203
+ <input type="text" name="remote_mysql_db" id="remote_mysql_db" class="validate" placeholder="Target Mysql Database">
204
+ <label><?php echo __("Target Mysql Database",'xcloner-backup-and-restore')?></label>
205
  </div>
206
 
207
  <div class="input-field col s12 m6">
208
+ <input type="text" name="remote_mysql_user" id="remote_mysql_user" class="validate" placeholder="Target Mysql Username">
209
+ <label><?php echo __("Target Mysql Username",'xcloner-backup-and-restore')?></label>
210
  </div>
211
 
212
 
213
  <div class="input-field col s12 m6">
214
+ <input type="text" name="remote_mysql_pass" id="remote_mysql_pass" class="validate" placeholder="Target Mysql Password">
215
+ <label><?php echo __("Target Mysql Password",'xcloner-backup-and-restore')?></label>
216
  </div>
217
 
218
  </div>
219
  <div class="col s12">
220
  <a class="btn-floating tooltipped btn-small right" data-position="left" data-delay="50" data-html="true" data-tooltip="<?php echo __('I will attempt to replace all mysql backup records matching the provided Source Url with the provided Target Url. <br />Leave blank the Target Url if you would like to skip this option. <br />As a bonus, I will also replace all matching serialized data and fix it\'s parsing.','xcloner-backup-and-restore')?>" data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i class="material-icons">help_outline</i></a>
221
+ <h5><?php echo __('Target Mysql Search and Replace','xcloner-backup-and-restore')?></h5>
222
  </div>
223
  <div class="col s12">
224
  <div class="input-field col s12 m6 ">
245
  <?php endif;?>
246
  </div>
247
 
248
+ </div>
249
+
250
  <div class=" col s12 l7">
251
  <div class="input-field row">
252
  <select id="remote_database_file" name="remote_database_file" class="browser-default">
253
+ <option value="" disabled selected><?php echo __("Please select the target database backup file to restore",'xcloner-backup-and-restore')?></option>
254
  </select>
255
 
256
  <label></label>
262
 
263
  <div class="status"></div>
264
  <div class="query-box">
265
+ <h6><?php echo __('Use the field below to fix your mysql query and Retry again the Restore, or replace with # to Skip next', 'xcloner-backup-and-restore')?></h6>
266
  <textarea class="query-list" cols="5"></textarea>
267
  </div>
268
  </div>
293
 
294
  <div class="row">
295
  <div class="col s4">
296
+ <label><?php echo __("Update wp-config.php mysql details and update the Target Site Url",'xcloner-backup-and-restore')?></label>
297
  </div>
298
 
299
  <div class="col s8">
352
  </div>
353
 
354
  <div class="col s12 center-align">
355
+ <div class="row">
356
+ <div class="col s6 right-align">
357
+ <button class="btn waves-effect waves-light teal" type="submit" id="restore_finish" name="action"><?php echo __("Finish",'xcloner-backup-and-restore')?>
358
+ <i class="material-icons right">navigate_next</i>
359
+ </button>
360
+ </div>
361
+
362
+ <div id="open_target_site" class="col s6 left-align">
363
+ <a disabled="disabled" href="#" class="btn waves-effect waves-light teal" type="button" target="_blank"><?php echo __("Open Target Site",'xcloner-backup-and-restore')?>
364
+ <i class="material-icons right">navigate_next</i>
365
+ </a>
366
+ </div>
367
+ </div>
368
  </div>
369
  </div>
370
  </li>
375
 
376
 
377
 
378
+ <!-- List Backup Content Modal-->
379
+ <div id="backup_cotent_modal" class="modal">
380
+ <div class="modal-content">
381
+ <h4><?php echo sprintf(__("Listing Backup Content ",'xcloner-backup-and-restore'), "")?></h4>
382
+ <h5 class="backup-name"></h5>
383
+
384
+ <div class="progress">
385
+ <div class="indeterminate"></div>
386
+ </div>
387
+ <ul class="files-list"></ul>
388
+ </div>
389
+ </div>
admin/partials/xcloner_scheduled_backups_page.php CHANGED
@@ -88,10 +88,18 @@ $available_storages = $xcloner_remote_storage->get_available_storages();
88
  <div id="scheduler_settings" class="tab-content active">
89
 
90
  <div class="row">
91
- <div class="input-field col s12 l12">
92
  <input placeholder="" name="schedule_name" id="schedule_name" type="text" required value="">
93
  <label for="schedule_name"><?php echo __('Schedule Name', 'xcloner-backup-and-restore') ?></label>
94
  </div>
 
 
 
 
 
 
 
 
95
  </div>
96
 
97
  <div class="row">
@@ -103,11 +111,16 @@ $available_storages = $xcloner_remote_storage->get_available_storages();
103
  <div class="input-field col s12 l6">
104
  <select name="schedule_frequency" id="schedule_frequency" class="validate" required>
105
  <option value="" disabled selected><?php echo __('Schedule Recurrence', 'xcloner-backup-and-restore') ?></option>
106
- <option value="single"><?php echo __("Don't Repeat",'xcloner-backup-and-restore')?></option>
107
- <option value="hourly"><?php echo __("Hourly",'xcloner-backup-and-restore')?></option>
108
- <option value="daily"><?php echo __("Daily",'xcloner-backup-and-restore')?></option>
109
- <option value="weekly"><?php echo __("Weekly",'xcloner-backup-and-restore')?></option>
110
- <option value="monthly"><?php echo __("Monthly",'xcloner-backup-and-restore')?></option>
 
 
 
 
 
111
  </select>
112
  </div>
113
  </div>
@@ -132,6 +145,13 @@ $available_storages = $xcloner_remote_storage->get_available_storages();
132
  <label for="email_notification"><?php echo __('Email Notification Address', 'xcloner-backup-and-restore') ?></label>
133
  </div>
134
  </div>
 
 
 
 
 
 
 
135
  </div>
136
 
137
  <div id="advanced_scheduler_settings" class="tab-content">
88
  <div id="scheduler_settings" class="tab-content active">
89
 
90
  <div class="row">
91
+ <div class="input-field col s12">
92
  <input placeholder="" name="schedule_name" id="schedule_name" type="text" required value="">
93
  <label for="schedule_name"><?php echo __('Schedule Name', 'xcloner-backup-and-restore') ?></label>
94
  </div>
95
+ <!--<div class="input-field inline col s12 l6">
96
+ <select id="backup_type" class="" name="backup_type" id="backup_type">
97
+ <option value=""><?php echo __("Full Backup","xcloner-backup-and-restore");?></option>
98
+ <option value="diff"><?php echo __("Differential Backups","xcloner-backup-and-restore");?></option>
99
+ <option value="full_diff"><?php echo __("Full Backup + Differential Backups","xcloner-backup-and-restore");?></option>
100
+ </select>
101
+ <label for="backup_type"><?php echo __('Scheduled Backup Type','xcloner-backup-and-restore')?></label>
102
+ </div>-->
103
  </div>
104
 
105
  <div class="row">
111
  <div class="input-field col s12 l6">
112
  <select name="schedule_frequency" id="schedule_frequency" class="validate" required>
113
  <option value="" disabled selected><?php echo __('Schedule Recurrence', 'xcloner-backup-and-restore') ?></option>
114
+ <?php
115
+ $schedules = $xcloner_scheduler->get_available_intervals();
116
+
117
+ foreach($schedules as $key=>$schedule)
118
+ {
119
+ ?>
120
+ <option value="<?php echo $key?>"><?php echo $schedule['display']?></option>
121
+ <?php
122
+ }
123
+ ?>
124
  </select>
125
  </div>
126
  </div>
145
  <label for="email_notification"><?php echo __('Email Notification Address', 'xcloner-backup-and-restore') ?></label>
146
  </div>
147
  </div>
148
+
149
+ <div class="row">
150
+ <div class="input-field col s12 l12">
151
+ <input placeholder="" name="diff_start_date" id="diff_start_date" type="text" class="datepicker_max_today" value="">
152
+ <label for="diff_start_date"><?php echo __('Backup Only Files Modified/Created After', 'xcloner-backup-and-restore') ?></label>
153
+ </div>
154
+ </div>
155
  </div>
156
 
157
  <div id="advanced_scheduler_settings" class="tab-content">
includes/class-xcloner-activator.php CHANGED
@@ -22,7 +22,7 @@
22
  */
23
  class Xcloner_Activator {
24
 
25
- const xcloner_db_version = '1.1.5';
26
  const xcloner_minimum_version = '5.4.0';
27
  /**
28
  * Short Description. (use period)
@@ -53,7 +53,7 @@ class Xcloner_Activator {
53
  $xcloner_schedule_sql="CREATE TABLE `".$xcloner_scheduler_table."` (
54
  `id` int(11) NOT NULL AUTO_INCREMENT,
55
  `name` varchar(255) NOT NULL,
56
- `recurrence` varchar(10) NOT NULL,
57
  `params` text NOT NULL,
58
  `start_at` datetime,
59
  `remote_storage` varchar(10) DEFAULT NULL,
@@ -70,44 +70,48 @@ class Xcloner_Activator {
70
  update_option( "xcloner_db_version", $xcloner_db_version );
71
  }
72
 
73
- if(!get_option('xcloner_backup_compression_level'))
74
  update_option('xcloner_backup_compression_level', 0);
75
 
76
- if(!get_option('xcloner_enable_log'))
77
  update_option('xcloner_enable_log', 1);
78
 
79
- if(!get_option('xcloner_enable_mysql_backup'))
80
  update_option('xcloner_enable_mysql_backup', 1);
81
 
82
- if(!get_option('xcloner_system_settings_page'))
83
  update_option('xcloner_system_settings_page', 100);
84
 
85
- if(!get_option('xcloner_files_to_process_per_request'))
86
  update_option('xcloner_files_to_process_per_request', 250);
87
 
88
- if(!get_option('xcloner_database_records_per_request'))
89
  update_option('xcloner_database_records_per_request', 10000);
90
 
91
- if(!get_option('xcloner_exclude_files_larger_than_mb'))
92
  update_option('xcloner_exclude_files_larger_than_mb', 0);
93
 
94
- if(!get_option('xcloner_split_backup_limit'))
95
  update_option('xcloner_split_backup_limit', 2048);
96
 
97
- if(!get_option('xcloner_size_limit_per_request'))
98
  update_option('xcloner_size_limit_per_request', 50);
99
 
100
- if(!get_option('xcloner_cleanup_retention_limit_days'))
101
  update_option('xcloner_cleanup_retention_limit_days', 60);
102
 
103
- if(!get_option('xcloner_cleanup_retention_limit_archives'))
104
  update_option('xcloner_cleanup_retention_limit_archives', 100);
105
 
106
- if(!get_option('xcloner_directories_to_scan_per_request'))
107
  update_option('xcloner_directories_to_scan_per_request', 25);
108
 
 
 
 
 
109
  if(!get_option('xcloner_regex_exclude'))
110
- update_option('xcloner_regex_exclude', "(wp-content\/updraft|wp-content\/uploads\/wp_all_backup)(.*)$".PHP_EOL."(.*)\.(svn|git)(.*)$".PHP_EOL."wp-content\/cache(.*)$");
111
 
112
  }
113
 
22
  */
23
  class Xcloner_Activator {
24
 
25
+ const xcloner_db_version = '1.1.7';
26
  const xcloner_minimum_version = '5.4.0';
27
  /**
28
  * Short Description. (use period)
53
  $xcloner_schedule_sql="CREATE TABLE `".$xcloner_scheduler_table."` (
54
  `id` int(11) NOT NULL AUTO_INCREMENT,
55
  `name` varchar(255) NOT NULL,
56
+ `recurrence` varchar(25) NOT NULL,
57
  `params` text NOT NULL,
58
  `start_at` datetime,
59
  `remote_storage` varchar(10) DEFAULT NULL,
70
  update_option( "xcloner_db_version", $xcloner_db_version );
71
  }
72
 
73
+ if(get_option('xcloner_backup_compression_level') === false)
74
  update_option('xcloner_backup_compression_level', 0);
75
 
76
+ if(get_option('xcloner_enable_log') === false)
77
  update_option('xcloner_enable_log', 1);
78
 
79
+ if(get_option('xcloner_enable_mysql_backup') === false)
80
  update_option('xcloner_enable_mysql_backup', 1);
81
 
82
+ if(get_option('xcloner_system_settings_page') === false)
83
  update_option('xcloner_system_settings_page', 100);
84
 
85
+ if(get_option('xcloner_files_to_process_per_request') === false)
86
  update_option('xcloner_files_to_process_per_request', 250);
87
 
88
+ if(get_option('xcloner_database_records_per_request') === false)
89
  update_option('xcloner_database_records_per_request', 10000);
90
 
91
+ if(get_option('xcloner_exclude_files_larger_than_mb') === false)
92
  update_option('xcloner_exclude_files_larger_than_mb', 0);
93
 
94
+ if(get_option('xcloner_split_backup_limit') === false)
95
  update_option('xcloner_split_backup_limit', 2048);
96
 
97
+ if(get_option('xcloner_size_limit_per_request') === false)
98
  update_option('xcloner_size_limit_per_request', 50);
99
 
100
+ if(get_option('xcloner_cleanup_retention_limit_days') === false)
101
  update_option('xcloner_cleanup_retention_limit_days', 60);
102
 
103
+ if(get_option('xcloner_cleanup_retention_limit_archives') === false)
104
  update_option('xcloner_cleanup_retention_limit_archives', 100);
105
 
106
+ if(get_option('xcloner_directories_to_scan_per_request') === false)
107
  update_option('xcloner_directories_to_scan_per_request', 25);
108
 
109
+ /*if(!get_option('xcloner_diff_backup_recreate_period'))
110
+ update_option('xcloner_diff_backup_recreate_period', 10);
111
+ * */
112
+
113
  if(!get_option('xcloner_regex_exclude'))
114
+ update_option('xcloner_regex_exclude', "(wp-content\/updraft|wp-content\/uploads\/wp_all_backup)(.*)$".PHP_EOL."(.*)\.(svn|git)(.*)$".PHP_EOL."wp-content\/cache(.*)$".PHP_EOL."(.*)error_log$");
115
 
116
  }
117
 
includes/class-xcloner-api.php CHANGED
@@ -27,7 +27,11 @@ class Xcloner_Api{
27
  {
28
  global $wpdb;
29
 
30
- error_reporting(0);
 
 
 
 
31
  if( ob_get_length() )
32
  ob_end_clean();
33
  ob_start();
@@ -45,14 +49,13 @@ class Xcloner_Api{
45
  $this->xcloner_database = $xcloner_container->get_xcloner_database();
46
  $this->xcloner_scheduler = $xcloner_container->get_xcloner_scheduler();
47
 
48
-
49
  if(isset($_POST['API_ID'])){
50
  $this->logger->info("Processing ajax request ID ".substr($this->xcloner_sanitization->sanitize_input_as_string($_POST['API_ID']), 0 , 15));
51
  }
52
 
53
  }
54
 
55
- private function get_xcloner_container()
56
  {
57
  return $this->xcloner_container;
58
  }
@@ -120,6 +123,11 @@ class Xcloner_Api{
120
 
121
  $this->form_params['backup_params']['backup_name'] = $this->xcloner_sanitization->sanitize_input_as_string($_POST['backup_name']);
122
  $this->form_params['backup_params']['email_notification'] = $this->xcloner_sanitization->sanitize_input_as_string($_POST['email_notification']);
 
 
 
 
 
123
  $this->form_params['backup_params']['schedule_name'] = $this->xcloner_sanitization->sanitize_input_as_string($_POST['schedule_name']);
124
  $this->form_params['backup_params']['start_at'] = strtotime($_POST['schedule_start_date']);
125
  $this->form_params['backup_params']['schedule_frequency'] = $this->xcloner_sanitization->sanitize_input_as_string($_POST['schedule_frequency']);
@@ -127,6 +135,8 @@ class Xcloner_Api{
127
  $this->form_params['database'] = (stripslashes($this->xcloner_sanitization->sanitize_input_as_raw($_POST['table_params'])));
128
  $this->form_params['excluded_files'] = (stripslashes($this->xcloner_sanitization->sanitize_input_as_raw($_POST['excluded_files'])));
129
 
 
 
130
  $tables = explode(PHP_EOL, $this->form_params['database']);
131
  $return = array();
132
 
@@ -163,6 +173,11 @@ class Xcloner_Api{
163
  $schedule['status'] = 1;
164
  $schedule['start_at'] = strtotime($this->form_params['backup_params']['schedule_start_date'] .
165
  " ".$this->form_params['backup_params']['schedule_start_time']);
 
 
 
 
 
166
  }
167
 
168
  if(!$schedule['start_at'])
@@ -171,13 +186,13 @@ class Xcloner_Api{
171
  }else{
172
  $schedule['start_at'] = date('Y-m-d H:i:s', $schedule['start_at'] - (get_option( 'gmt_offset' ) * HOUR_IN_SECONDS) );
173
  }
174
-
175
  $schedule['name'] = $this->form_params['backup_params']['schedule_name'];
176
  $schedule['recurrence'] = $this->form_params['backup_params']['schedule_frequency'];
177
  $schedule['remote_storage'] = $this->form_params['backup_params']['schedule_storage'];
178
-
179
  $schedule['params'] = json_encode($this->form_params);
180
-
181
  if(!isset($_POST['id']))
182
  {
183
  $wpdb->insert(
@@ -200,7 +215,9 @@ class Xcloner_Api{
200
  );
201
  }
202
  if(isset($_POST['id']))
 
203
  $scheduler->update_cron_hook($_POST['id']);
 
204
 
205
  if( $wpdb->last_error ) {
206
  $response['error'] = 1;
@@ -400,7 +417,13 @@ class Xcloner_Api{
400
  foreach($params->extra as $key=>$value)
401
  $this->form_params['extra'][$key] = $this->xcloner_sanitization->sanitize_input_as_raw($value);
402
  }
403
-
 
 
 
 
 
 
404
  return $this->xcloner_settings->get_hash();
405
  }
406
 
@@ -572,6 +595,10 @@ class Xcloner_Api{
572
  $data = $scheduler->get_schedule_by_id($schedule_id);
573
 
574
  $data['start_at'] = date("Y-m-d H:i", strtotime($data['start_at']) + (get_option( 'gmt_offset' ) * HOUR_IN_SECONDS));
 
 
 
 
575
 
576
  return $this->send_response($data);
577
  }
@@ -635,6 +662,13 @@ class Xcloner_Api{
635
 
636
  $backup_text = "<span title='".$backup_time."' class='shorten_string'>".$res->last_backup." (".$backup_size.")</span>";
637
  }
 
 
 
 
 
 
 
638
 
639
  $return['data'][] = array($res->id, $res->name, $res->recurrence,/*$res->start_at,*/ $next_run, $remote_storage, $backup_text, $status, $action);
640
  }
@@ -874,7 +908,7 @@ class Xcloner_Api{
874
  $tar->addFile(dirname(__DIR__).DS.$file['path'], $file['path']);
875
  }
876
 
877
- $content = file_get_contents(dirname(__DIR__)."/restore/xcloner_restore.php.txt");
878
  $content = str_replace("define('AUTH_KEY', '');", "define('AUTH_KEY', '".md5(AUTH_KEY)."');", $content);
879
 
880
  $tar->addData("xcloner_restore.php", $content);
@@ -1002,6 +1036,16 @@ class Xcloner_Api{
1002
 
1003
  $this->send_response( $return, 0);
1004
  }
 
 
 
 
 
 
 
 
 
 
1005
  /*
1006
  *
1007
  * Send the json response back
27
  {
28
  global $wpdb;
29
 
30
+ if(WP_DEBUG)
31
+ {
32
+ error_reporting(0);
33
+ }
34
+
35
  if( ob_get_length() )
36
  ob_end_clean();
37
  ob_start();
49
  $this->xcloner_database = $xcloner_container->get_xcloner_database();
50
  $this->xcloner_scheduler = $xcloner_container->get_xcloner_scheduler();
51
 
 
52
  if(isset($_POST['API_ID'])){
53
  $this->logger->info("Processing ajax request ID ".substr($this->xcloner_sanitization->sanitize_input_as_string($_POST['API_ID']), 0 , 15));
54
  }
55
 
56
  }
57
 
58
+ public function get_xcloner_container()
59
  {
60
  return $this->xcloner_container;
61
  }
123
 
124
  $this->form_params['backup_params']['backup_name'] = $this->xcloner_sanitization->sanitize_input_as_string($_POST['backup_name']);
125
  $this->form_params['backup_params']['email_notification'] = $this->xcloner_sanitization->sanitize_input_as_string($_POST['email_notification']);
126
+ if($_POST['diff_start_date']){
127
+ $this->form_params['backup_params']['diff_start_date'] = strtotime($this->xcloner_sanitization->sanitize_input_as_string($_POST['diff_start_date']));
128
+ }else{
129
+ $this->form_params['backup_params']['diff_start_date'] = "";
130
+ }
131
  $this->form_params['backup_params']['schedule_name'] = $this->xcloner_sanitization->sanitize_input_as_string($_POST['schedule_name']);
132
  $this->form_params['backup_params']['start_at'] = strtotime($_POST['schedule_start_date']);
133
  $this->form_params['backup_params']['schedule_frequency'] = $this->xcloner_sanitization->sanitize_input_as_string($_POST['schedule_frequency']);
135
  $this->form_params['database'] = (stripslashes($this->xcloner_sanitization->sanitize_input_as_raw($_POST['table_params'])));
136
  $this->form_params['excluded_files'] = (stripslashes($this->xcloner_sanitization->sanitize_input_as_raw($_POST['excluded_files'])));
137
 
138
+ //$this->form_params['backup_params']['backup_type'] = $this->xcloner_sanitization->sanitize_input_as_string($_POST['backup_type']);
139
+
140
  $tables = explode(PHP_EOL, $this->form_params['database']);
141
  $return = array();
142
 
173
  $schedule['status'] = 1;
174
  $schedule['start_at'] = strtotime($this->form_params['backup_params']['schedule_start_date'] .
175
  " ".$this->form_params['backup_params']['schedule_start_time']);
176
+
177
+ if($schedule['start_at'] <= time())
178
+ {
179
+ $schedule['start_at'] = "";
180
+ }
181
  }
182
 
183
  if(!$schedule['start_at'])
186
  }else{
187
  $schedule['start_at'] = date('Y-m-d H:i:s', $schedule['start_at'] - (get_option( 'gmt_offset' ) * HOUR_IN_SECONDS) );
188
  }
189
+
190
  $schedule['name'] = $this->form_params['backup_params']['schedule_name'];
191
  $schedule['recurrence'] = $this->form_params['backup_params']['schedule_frequency'];
192
  $schedule['remote_storage'] = $this->form_params['backup_params']['schedule_storage'];
193
+ //$schedule['backup_type'] = $this->form_params['backup_params']['backup_type'];
194
  $schedule['params'] = json_encode($this->form_params);
195
+
196
  if(!isset($_POST['id']))
197
  {
198
  $wpdb->insert(
215
  );
216
  }
217
  if(isset($_POST['id']))
218
+ {
219
  $scheduler->update_cron_hook($_POST['id']);
220
+ }
221
 
222
  if( $wpdb->last_error ) {
223
  $response['error'] = 1;
417
  foreach($params->extra as $key=>$value)
418
  $this->form_params['extra'][$key] = $this->xcloner_sanitization->sanitize_input_as_raw($value);
419
  }
420
+
421
+ if(isset($this->form_params['backup_params']['diff_start_date']) and $this->form_params['backup_params']['diff_start_date'])
422
+ {
423
+ $this->form_params['backup_params']['diff_start_date'] = strtotime($this->form_params['backup_params']['diff_start_date']);
424
+ $this->xcloner_file_system->set_diff_timestamp_start($this->form_params['backup_params']['diff_start_date']);
425
+ }
426
+
427
  return $this->xcloner_settings->get_hash();
428
  }
429
 
595
  $data = $scheduler->get_schedule_by_id($schedule_id);
596
 
597
  $data['start_at'] = date("Y-m-d H:i", strtotime($data['start_at']) + (get_option( 'gmt_offset' ) * HOUR_IN_SECONDS));
598
+ if(isset($data['backup_params']->diff_start_date) && $data['backup_params']->diff_start_date != "")
599
+ {
600
+ $data['backup_params']->diff_start_date = date("Y-m-d", ($data['backup_params']->diff_start_date) );
601
+ }
602
 
603
  return $this->send_response($data);
604
  }
662
 
663
  $backup_text = "<span title='".$backup_time."' class='shorten_string'>".$res->last_backup." (".$backup_size.")</span>";
664
  }
665
+
666
+ $schedules = wp_get_schedules();
667
+
668
+ if(isset($schedules[$res->recurrence]))
669
+ {
670
+ $res->recurrence = $schedules[$res->recurrence]['display'];
671
+ }
672
 
673
  $return['data'][] = array($res->id, $res->name, $res->recurrence,/*$res->start_at,*/ $next_run, $remote_storage, $backup_text, $status, $action);
674
  }
908
  $tar->addFile(dirname(__DIR__).DS.$file['path'], $file['path']);
909
  }
910
 
911
+ $content = file_get_contents(dirname(__DIR__)."/restore/xcloner_restore.php");
912
  $content = str_replace("define('AUTH_KEY', '');", "define('AUTH_KEY', '".md5(AUTH_KEY)."');", $content);
913
 
914
  $tar->addData("xcloner_restore.php", $content);
1036
 
1037
  $this->send_response( $return, 0);
1038
  }
1039
+
1040
+ public function restore_backup()
1041
+ {
1042
+ $this->check_access();
1043
+
1044
+ define("XCLONER_PLUGIN_ACCESS", 1);
1045
+ include_once(dirname(__DIR__) .DS."restore".DS."xcloner_restore.php");
1046
+ return;
1047
+ }
1048
+
1049
  /*
1050
  *
1051
  * Send the json response back
includes/class-xcloner-archive.php CHANGED
@@ -40,8 +40,10 @@ class Xcloner_Archive extends Tar
40
 
41
  $this->xcloner_split_backup_limit = $this->xcloner_split_backup_limit * 1024*1024; //transform to bytes
42
 
43
- if(isset($archive_name))
 
44
  $this->set_archive_name($archive_name);
 
45
  }
46
 
47
  /*
@@ -63,8 +65,21 @@ class Xcloner_Archive extends Tar
63
  */
64
  public function set_archive_name($name = "", $part = 0)
65
  {
 
66
  $this->archive_name = $this->filesystem->process_backup_name($name);
67
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  if(isset($part) and $part)
69
  {
70
  $new_name = preg_replace('/-part(\d*)/', "-part".$part, $this->archive_name);
@@ -73,7 +88,7 @@ class Xcloner_Archive extends Tar
73
 
74
  $this->archive_name = $new_name;
75
  }
76
-
77
  return $this;
78
  }
79
 
@@ -140,7 +155,9 @@ class Xcloner_Archive extends Tar
140
  public function send_notification($to, $from, $subject, $backup_name, $params, $error_message="", $additional = array())
141
  {
142
  if(!$from)
 
143
  $from = "XCloner Backup";
 
144
 
145
  if(($error_message))
146
  {
@@ -150,7 +167,9 @@ class Xcloner_Archive extends Tar
150
  $params = (array)$params;
151
 
152
  if(!$subject)
 
153
  $subject = sprintf(__("New backup generated %s") ,$backup_name);
 
154
 
155
  $body = sprintf(__("Generated Backup Size: %s"), size_format($this->filesystem->get_backup_size($backup_name)));
156
  $body .= "<br /><br />";
40
 
41
  $this->xcloner_split_backup_limit = $this->xcloner_split_backup_limit * 1024*1024; //transform to bytes
42
 
43
+ if(isset($archive_name) && $archive_name)
44
+ {
45
  $this->set_archive_name($archive_name);
46
+ }
47
  }
48
 
49
  /*
65
  */
66
  public function set_archive_name($name = "", $part = 0)
67
  {
68
+
69
  $this->archive_name = $this->filesystem->process_backup_name($name);
70
 
71
+ if($diff_timestamp_start = $this->filesystem->get_diff_timestamp_start())
72
+ {
73
+ //$this->archive_name = $this->archive_name."-diff-".date("Y-m-d_H-i",$diff_timestamp_start);
74
+ $new_name = $this->archive_name;
75
+
76
+ if(!stristr($new_name, "-diff"))
77
+ $new_name = $this->archive_name . "-diff".date("Y-m-d_H-i",$diff_timestamp_start);
78
+
79
+ $this->archive_name = $new_name;
80
+
81
+ }
82
+
83
  if(isset($part) and $part)
84
  {
85
  $new_name = preg_replace('/-part(\d*)/', "-part".$part, $this->archive_name);
88
 
89
  $this->archive_name = $new_name;
90
  }
91
+
92
  return $this;
93
  }
94
 
155
  public function send_notification($to, $from, $subject, $backup_name, $params, $error_message="", $additional = array())
156
  {
157
  if(!$from)
158
+ {
159
  $from = "XCloner Backup";
160
+ }
161
 
162
  if(($error_message))
163
  {
167
  $params = (array)$params;
168
 
169
  if(!$subject)
170
+ {
171
  $subject = sprintf(__("New backup generated %s") ,$backup_name);
172
+ }
173
 
174
  $body = sprintf(__("Generated Backup Size: %s"), size_format($this->filesystem->get_backup_size($backup_name)));
175
  $body .= "<br /><br />";
includes/class-xcloner-database.php CHANGED
@@ -50,11 +50,14 @@ class Xcloner_Database extends wpdb{
50
  if(!$this->recordsPerSession)
51
  $this->recordsPerSession = 100;
52
 
53
- $wp_host = $this->xcloner_settings->get_db_hostname();
54
- $wp_user = $this->xcloner_settings->get_db_username();
55
- $wp_pass = $this->xcloner_settings->get_db_password();
56
- $wp_db = $this->xcloner_settings->get_db_database();
57
-
 
 
 
58
  parent::__construct($wp_user, $wp_pass, $wp_db, $wp_host);
59
 
60
  //$this->use_mysqli = true;
50
  if(!$this->recordsPerSession)
51
  $this->recordsPerSession = 100;
52
 
53
+ if(!$wp_user && !$wp_pass && !$wp_host && !$wp_db )
54
+ {
55
+ $wp_host = $this->xcloner_settings->get_db_hostname();
56
+ $wp_user = $this->xcloner_settings->get_db_username();
57
+ $wp_pass = $this->xcloner_settings->get_db_password();
58
+ $wp_db = $this->xcloner_settings->get_db_database();
59
+ }
60
+
61
  parent::__construct($wp_user, $wp_pass, $wp_db, $wp_host);
62
 
63
  //$this->use_mysqli = true;
includes/class-xcloner-deactivator.php CHANGED
@@ -35,6 +35,13 @@ class Xcloner_Deactivator {
35
 
36
  if(is_a($xcloner_plugin, 'Xcloner'))
37
  {
 
 
 
 
 
 
 
38
  $xcloner_scheduler = $xcloner_plugin->get_xcloner_scheduler();
39
  $xcloner_scheduler->deactivate_wp_cron_hooks();
40
  }
35
 
36
  if(is_a($xcloner_plugin, 'Xcloner'))
37
  {
38
+ try{
39
+ $xcloner_plugin->get_xcloner_filesystem()->cleanup_tmp_directories();
40
+ }catch(Exception $e)
41
+ {
42
+ $xcloner_plugin->trigger_message_notice($e->getMessage());
43
+ }
44
+
45
  $xcloner_scheduler = $xcloner_plugin->get_xcloner_scheduler();
46
  $xcloner_scheduler->deactivate_wp_cron_hooks();
47
  }
includes/class-xcloner-file-system.php CHANGED
@@ -15,6 +15,7 @@ class Xcloner_File_System{
15
  public $storage_filesystem;
16
  private $xcloner_settings_append;
17
  private $xcloner_container;
 
18
 
19
  private $logger;
20
  private $start_adapter;
@@ -75,6 +76,20 @@ class Xcloner_File_System{
75
 
76
  }
77
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  private function get_xcloner_container()
79
  {
80
  return $this->xcloner_container;
@@ -430,6 +445,27 @@ class Xcloner_File_System{
430
  return;
431
  }
432
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
433
  private function do_system_init()
434
  {
435
  $this->files_counter = 0;
@@ -503,8 +539,10 @@ class Xcloner_File_System{
503
  elseif(!$matching_pattern = $this->is_excluded($file) ){
504
  $this->logger->info(sprintf(__("Adding %s to the filesystem list"), $file['path']), array("FILESYSTEM SCAN","INCLUDE"));
505
  $file['visibility'] = $this->start_filesystem->getVisibility($file['path']);
506
- $this->store_file($file);
507
- $this->files_counter++;
 
 
508
  if(isset($file['size']))
509
  $this->files_size += $file['size'];
510
 
@@ -682,6 +720,26 @@ class Xcloner_File_System{
682
  return array_pop($args);
683
  }
684
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
685
  public function is_excluded($file)
686
  {
687
  $this->logger->debug(sprintf(("Checking if %s is excluded"), $file['path']));
@@ -711,6 +769,15 @@ class Xcloner_File_System{
711
  if( $regex = $this->is_excluded_regex($file))
712
  return $regex;
713
 
 
 
 
 
 
 
 
 
 
714
  return false;
715
  }
716
 
@@ -796,6 +863,23 @@ class Xcloner_File_System{
796
 
797
  $this->last_logged_file = $file['path'];
798
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
799
  try{
800
  if(!$this->tmp_filesystem_append->has($this->get_included_files_handler()))
801
  {
@@ -811,13 +895,7 @@ class Xcloner_File_System{
811
  $this->logger->error($e->getMessage());
812
  }
813
 
814
- if($file['type'] == "dir"){
815
- try{
816
- $this->tmp_filesystem_append->write($this->get_temp_dir_handler(), $file['path']."\n");
817
- }catch(Exception $e){
818
- $this->logger->error($e->getMessage());
819
- }
820
- }
821
  }
822
 
823
  public function get_fileystem_handler()
15
  public $storage_filesystem;
16
  private $xcloner_settings_append;
17
  private $xcloner_container;
18
+ private $diff_timestamp_start = "";
19
 
20
  private $logger;
21
  private $start_adapter;
76
 
77
  }
78
 
79
+ public function set_diff_timestamp_start($timestamp = "")
80
+ {
81
+ if($timestamp)
82
+ {
83
+ $this->logger->info(sprintf("Setting Differential Timestamp To %s", date("Y-m-d", $timestamp)), array("FILESYSTEM", "DIFF"));
84
+ $this->diff_timestamp_start = $timestamp;
85
+ }
86
+ }
87
+
88
+ public function get_diff_timestamp_start()
89
+ {
90
+ return $this->diff_timestamp_start;
91
+ }
92
+
93
  private function get_xcloner_container()
94
  {
95
  return $this->xcloner_container;
445
  return;
446
  }
447
 
448
+ public function cleanup_tmp_directories()
449
+ {
450
+ $adapter = new Local($this->xcloner_settings->get_xcloner_tmp_path(false),LOCK_EX|FILE_APPEND, 'SKIP_LINKS');
451
+ $tmp_filesystem = new Filesystem($adapter, new Config([
452
+ 'disable_asserts' => true,
453
+ ]));
454
+
455
+ $contents = $tmp_filesystem->listContents();
456
+
457
+ foreach($contents as $file)
458
+ {
459
+ if(preg_match("/.xcloner-(.*)/",$file['path']))
460
+ {
461
+ $tmp_filesystem->deleteDir($file['path']);
462
+ $this->logger->info(sprintf("Delete temporary directory %s", $file['path']));
463
+ }
464
+ }
465
+
466
+ return true;
467
+ }
468
+
469
  private function do_system_init()
470
  {
471
  $this->files_counter = 0;
539
  elseif(!$matching_pattern = $this->is_excluded($file) ){
540
  $this->logger->info(sprintf(__("Adding %s to the filesystem list"), $file['path']), array("FILESYSTEM SCAN","INCLUDE"));
541
  $file['visibility'] = $this->start_filesystem->getVisibility($file['path']);
542
+ if($this->store_file($file))
543
+ {
544
+ $this->files_counter++;
545
+ }
546
  if(isset($file['size']))
547
  $this->files_size += $file['size'];
548
 
720
  return array_pop($args);
721
  }
722
 
723
+ private function check_file_diff_time($file)
724
+ {
725
+ if($this->get_diff_timestamp_start() != "")
726
+ {
727
+ $fileMeta = $this->getMetadataFull("start_adapter", $file['path']);
728
+ $timestamp = $fileMeta->getMTime();
729
+ if($timestamp < $fileMeta->getCTime())
730
+ {
731
+ $timestamp = $fileMeta->getCTime();
732
+ }
733
+
734
+ if($timestamp <= $this->get_diff_timestamp_start())
735
+ {
736
+ return " file DIFF timestamp ".$timestamp." < ". $this->diff_timestamp_start;
737
+ }
738
+ }
739
+
740
+ return false;
741
+ }
742
+
743
  public function is_excluded($file)
744
  {
745
  $this->logger->debug(sprintf(("Checking if %s is excluded"), $file['path']));
769
  if( $regex = $this->is_excluded_regex($file))
770
  return $regex;
771
 
772
+ if($file['type'] == "file")
773
+ {
774
+ $check_file_diff_timestamp = $this->check_file_diff_time($file);
775
+ if($check_file_diff_timestamp)
776
+ {
777
+ return $check_file_diff_timestamp;
778
+ }
779
+ }
780
+
781
  return false;
782
  }
783
 
863
 
864
  $this->last_logged_file = $file['path'];
865
 
866
+ if($file['type'] == "dir"){
867
+ try{
868
+ $this->tmp_filesystem_append->write($this->get_temp_dir_handler(), $file['path']."\n");
869
+ }catch(Exception $e){
870
+ $this->logger->error($e->getMessage());
871
+ }
872
+ }
873
+
874
+ if($this->get_diff_timestamp_start())
875
+ {
876
+ if($file['type'] != "file" && $response = $this->check_file_diff_time($file))
877
+ {
878
+ $this->logger->info(sprintf("Directory %s archiving skipped on differential backup %s", $file['path'], $response), array("FILESYSTEM SCAN","DIR DIFF"));
879
+ return false;
880
+ }
881
+ }
882
+
883
  try{
884
  if(!$this->tmp_filesystem_append->has($this->get_included_files_handler()))
885
  {
895
  $this->logger->error($e->getMessage());
896
  }
897
 
898
+ return true;
 
 
 
 
 
 
899
  }
900
 
901
  public function get_fileystem_handler()
includes/class-xcloner-file-transfer.php CHANGED
@@ -39,7 +39,7 @@ class Xcloner_File_Transfer extends Xcloner_File_System{
39
 
40
  $send_array['file'] = $file;
41
  $send_array['start'] = $start;
42
- $send_array['action'] = "write_file";
43
  $send_array['hash'] = $hash;
44
  #$send_array['blob'] = $binary_data;
45
  $send_array['blob'] = $this->curl_file_create($tmp_file_path,'application/x-binary',$tmp_filename);
39
 
40
  $send_array['file'] = $file;
41
  $send_array['start'] = $start;
42
+ $send_array['xcloner_action'] = "write_file";
43
  $send_array['hash'] = $hash;
44
  #$send_array['blob'] = $binary_data;
45
  $send_array['blob'] = $this->curl_file_create($tmp_file_path,'application/x-binary',$tmp_filename);
includes/class-xcloner-logger.php CHANGED
@@ -37,13 +37,13 @@ class Xcloner_Logger extends Logger{
37
 
38
  if(!is_dir($xcloner_settings->get_xcloner_store_path()) or !is_writable($xcloner_settings->get_xcloner_store_path()))
39
  {
40
- $logger_path = "php://stderr";
41
  $logger_path_tmp = "";
42
  }
43
 
44
  if(!$xcloner_settings->get_xcloner_option('xcloner_enable_log'))
45
  {
46
- $logger_path = "php://stderr";
47
  $logger_path_tmp = "";
48
  }
49
 
@@ -60,7 +60,13 @@ class Xcloner_Logger extends Logger{
60
 
61
  if($logger_path)
62
  {
63
- $stream = new RotatingFileHandler($logger_path, $this->max_logger_files, $debug_level);
 
 
 
 
 
 
64
  $this->pushHandler($stream);
65
 
66
  $this->main_logger_url = $stream->getUrl();
37
 
38
  if(!is_dir($xcloner_settings->get_xcloner_store_path()) or !is_writable($xcloner_settings->get_xcloner_store_path()))
39
  {
40
+ $logger_path = 'php://stderr';
41
  $logger_path_tmp = "";
42
  }
43
 
44
  if(!$xcloner_settings->get_xcloner_option('xcloner_enable_log'))
45
  {
46
+ $logger_path = 'php://stderr';
47
  $logger_path_tmp = "";
48
  }
49
 
60
 
61
  if($logger_path)
62
  {
63
+ if(!$xcloner_settings->get_xcloner_option('xcloner_enable_log'))
64
+ {
65
+ $stream = new StreamHandler($logger_path, $debug_level);
66
+ }else{
67
+ $stream = new RotatingFileHandler($logger_path, $this->max_logger_files, $debug_level);
68
+ }
69
+
70
  $this->pushHandler($stream);
71
 
72
  $this->main_logger_url = $stream->getUrl();
includes/class-xcloner-scheduler.php CHANGED
@@ -12,6 +12,7 @@ class Xcloner_Scheduler{
12
  private $logger;
13
  private $xcloner_file_system;
14
 
 
15
  /*public function __call($method, $args) {
16
  echo "$method is not defined";
17
  }*/
@@ -34,6 +35,11 @@ class Xcloner_Scheduler{
34
  return $this->xcloner_container;
35
  }
36
 
 
 
 
 
 
37
  public function get_scheduler_list($return_only_enabled = 0 )
38
  {
39
  $list = $this->db->get_results("SELECT * FROM ".$this->scheduler_table);
@@ -123,9 +129,11 @@ class Xcloner_Scheduler{
123
  if ( ! wp_next_scheduled( $hook, array($schedule->id) ) and $schedule->status) {
124
 
125
  if($schedule->recurrence == "single")
 
126
  wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
127
- else
128
  wp_schedule_event( strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id) );
 
129
 
130
  }elseif(!$schedule->status)
131
  {
@@ -147,8 +155,9 @@ class Xcloner_Scheduler{
147
  if ($schedule->status) {
148
 
149
  if($schedule->recurrence == "single")
 
150
  wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
151
- else{
152
  wp_schedule_event( strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id) );
153
  }
154
 
@@ -211,11 +220,22 @@ class Xcloner_Scheduler{
211
  {
212
  set_time_limit(0);
213
 
 
 
 
 
214
  $this->xcloner_file_system = $this->get_xcloner_container()->get_xcloner_filesystem();
215
  $this->xcloner_database = $this->get_xcloner_container()->get_xcloner_database();
216
  $this->archive_system = $this->get_xcloner_container()->get_archive_system();
217
  $this->logger = $this->get_xcloner_container()->get_xcloner_logger()->withName("xcloner_scheduler");
218
  $this->xcloner_remote_storage = $this->get_xcloner_container()->get_xcloner_remote_storage();
 
 
 
 
 
 
 
219
 
220
  if($schedule['recurrence'] == "single")
221
  {
@@ -293,9 +313,11 @@ class Xcloner_Scheduler{
293
  if(isset($schedule['backup_params']->email_notification) and $to=$schedule['backup_params']->email_notification)
294
  {
295
  try{
296
- $from = "XCloner Schedule - ".$schedule['name'];
297
  $additional['lines_total'] = $return['extra']['lines_total'];
298
- $this->archive_system->send_notification($to, $from, "", $return['extra']['backup_parent'], $schedule, "", $additional);
 
 
299
  }catch(Exception $e)
300
  {
301
  $this->logger->error($e->getMessage());
@@ -325,13 +347,30 @@ class Xcloner_Scheduler{
325
 
326
  if(isset($schedule['backup_params']->email_notification) && $to=$schedule['backup_params']->email_notification)
327
  {
328
- $from = "XCloner Schedule - ".$schedule['name'];
329
- $this->archive_system->send_notification($to, $from, "Scheduled backup error","", "", $e->getMessage());
330
  }
331
 
332
  }
333
 
334
  }
335
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
336
 
337
  }
12
  private $logger;
13
  private $xcloner_file_system;
14
 
15
+ private $allowed_schedules = array("hourly", "twicedaily", "daily", "weekly", "monthly");
16
  /*public function __call($method, $args) {
17
  echo "$method is not defined";
18
  }*/
35
  return $this->xcloner_container;
36
  }
37
 
38
+ private function set_xcloner_container(Xcloner $container)
39
+ {
40
+ $this->xcloner_container = $container;
41
+ }
42
+
43
  public function get_scheduler_list($return_only_enabled = 0 )
44
  {
45
  $list = $this->db->get_results("SELECT * FROM ".$this->scheduler_table);
129
  if ( ! wp_next_scheduled( $hook, array($schedule->id) ) and $schedule->status) {
130
 
131
  if($schedule->recurrence == "single")
132
+ {
133
  wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
134
+ }else{
135
  wp_schedule_event( strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id) );
136
+ }
137
 
138
  }elseif(!$schedule->status)
139
  {
155
  if ($schedule->status) {
156
 
157
  if($schedule->recurrence == "single")
158
+ {
159
  wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
160
+ }else{
161
  wp_schedule_event( strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id) );
162
  }
163
 
220
  {
221
  set_time_limit(0);
222
 
223
+ $xcloner = new XCloner();
224
+ $xcloner->init();
225
+ $this->set_xcloner_container($xcloner);
226
+
227
  $this->xcloner_file_system = $this->get_xcloner_container()->get_xcloner_filesystem();
228
  $this->xcloner_database = $this->get_xcloner_container()->get_xcloner_database();
229
  $this->archive_system = $this->get_xcloner_container()->get_archive_system();
230
  $this->logger = $this->get_xcloner_container()->get_xcloner_logger()->withName("xcloner_scheduler");
231
  $this->xcloner_remote_storage = $this->get_xcloner_container()->get_xcloner_remote_storage();
232
+
233
+ $this->logger->info(sprintf("New schedule hash is %s", $this->xcloner_settings->get_hash()));
234
+
235
+ if($schedule['backup_params']->diff_start_date)
236
+ {
237
+ $this->xcloner_file_system->set_diff_timestamp_start($schedule['backup_params']->diff_start_date);
238
+ }
239
 
240
  if($schedule['recurrence'] == "single")
241
  {
313
  if(isset($schedule['backup_params']->email_notification) and $to=$schedule['backup_params']->email_notification)
314
  {
315
  try{
316
+ $from = "XCloner Scheduler";
317
  $additional['lines_total'] = $return['extra']['lines_total'];
318
+ $subject = sprintf(__("%s - new backup generated %s") , $schedule['name'], $return['extra']['backup_parent']);
319
+
320
+ $this->archive_system->send_notification($to, $from, $subject, $return['extra']['backup_parent'], $schedule, "", $additional);
321
  }catch(Exception $e)
322
  {
323
  $this->logger->error($e->getMessage());
347
 
348
  if(isset($schedule['backup_params']->email_notification) && $to=$schedule['backup_params']->email_notification)
349
  {
350
+ $from = "XCloner Scheduler";
351
+ $this->archive_system->send_notification($to, $from, $schedule['name']." - backup error","", "", $e->getMessage());
352
  }
353
 
354
  }
355
 
356
  }
357
 
358
+ public function get_available_intervals()
359
+ {
360
+ $schedules = wp_get_schedules();
361
+ $new_schedules = array();
362
+
363
+ foreach ($schedules as $key => $row) {
364
+ if(in_array($key, $this->allowed_schedules))
365
+ {
366
+ $new_schedules[$key] = $row;
367
+ $intervals[$key] = $row['interval'];
368
+ }
369
+ }
370
+
371
+ array_multisort($intervals, SORT_ASC, $new_schedules);
372
+ return $new_schedules;
373
+ }
374
+
375
 
376
  }
includes/class-xcloner-settings.php CHANGED
@@ -63,9 +63,9 @@ class Xcloner_Settings
63
  }
64
 
65
 
66
- public function get_xcloner_tmp_path()
67
  {
68
- $path = sys_get_temp_dir().DS.".".$this->get_xcloner_tmp_path_suffix();
69
  if(!is_dir($path))
70
  {
71
  @mkdir($path);
@@ -73,7 +73,14 @@ class Xcloner_Settings
73
  }
74
 
75
  if(!is_dir($path) or !is_writeable($path) or get_option('xcloner_force_tmp_path_site_root'))
76
- $path = $this->get_xcloner_store_path().DS.".".$this->get_xcloner_tmp_path_suffix();
 
 
 
 
 
 
 
77
 
78
  return $path;
79
  }
@@ -131,7 +138,7 @@ class Xcloner_Settings
131
  {
132
  $data = parse_url(get_site_url());
133
 
134
- $backup_name = "backup_[domain]".(isset($data['port'])?":".$data['port']:"")."-[time]-".($this->get_enable_mysql_backup()?"sql":"nosql");
135
 
136
  return $backup_name;
137
  }
@@ -459,6 +466,18 @@ class Xcloner_Settings
459
  )
460
  );
461
 
 
 
 
 
 
 
 
 
 
 
 
 
462
  register_setting('xcloner_system_settings_group', 'xcloner_exclude_files_larger_than_mb', array($this->xcloner_sanitization, "sanitize_input_as_int"));
463
  add_settings_field(
464
  'xcloner_exclude_files_larger_than_mb',
@@ -621,6 +640,7 @@ class Xcloner_Settings
621
  <li>Exclude wp-content/updraft and wp/content/uploads/wp_all_backup folder :<span class="regex_pattern">\/(wp-content\/updraft|\/wp-content\/uploads\/wp_all_backup)(.*)$</span></li>
622
  <li>Exclude all cache folders from wp-content/ and it's subdirectories: <span class="regex_pattern"> <?php echo htmlentities('\/wp-content(.*)\/cache($|\/)(.*)')?></span></li>
623
  <li>Exclude wp-content/cache/ folder: <span class="regex_pattern"> <?php echo htmlentities('\/wp-content\/cache(.*)')?></span></li>
 
624
  </ul>
625
  </div>
626
  </div>
@@ -648,7 +668,7 @@ class Xcloner_Settings
648
  <input class="validate" <?php echo ($disabled)?"disabled":""?> name="<?php echo $fieldname?>" id="<?php echo $fieldname?>" type="number" class="validate" value="<?php echo isset($value) ? esc_attr($value) : ''; ?>">
649
  </div>
650
  <div class="col s2 m2 ">
651
- <a class="btn-floating tooltipped btn-small" data-position="center" data-delay="50" data-tooltip="<?php echo $label?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
652
  </div>
653
  </div>
654
 
@@ -671,7 +691,7 @@ class Xcloner_Settings
671
  </p>
672
  </div>
673
  <div class="col s2 m2 ">
674
- <a class="btn-floating tooltipped btn-small" data-position="center" data-delay="50" data-tooltip="<?php echo $label?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
675
  </div>
676
  </div>
677
  <?php
@@ -686,7 +706,7 @@ class Xcloner_Settings
686
  $value = get_option($fieldname);
687
  ?>
688
  <div class="row">
689
- <div class="input-field col s10 m10 l8">
690
  <div class="switch">
691
  <label>
692
  Off
63
  }
64
 
65
 
66
+ public function get_xcloner_tmp_path($suffix = true)
67
  {
68
+ $path = sys_get_temp_dir();
69
  if(!is_dir($path))
70
  {
71
  @mkdir($path);
73
  }
74
 
75
  if(!is_dir($path) or !is_writeable($path) or get_option('xcloner_force_tmp_path_site_root'))
76
+ {
77
+ $path = $this->get_xcloner_store_path();
78
+ }
79
+
80
+ if($suffix)
81
+ {
82
+ $path = $path.DS.".".$this->get_xcloner_tmp_path_suffix();
83
+ }
84
 
85
  return $path;
86
  }
138
  {
139
  $data = parse_url(get_site_url());
140
 
141
+ $backup_name = "backup_[domain]".(isset($data['port'])?"_".$data['port']:"")."-[time]-".($this->get_enable_mysql_backup()?"sql":"nosql");
142
 
143
  return $backup_name;
144
  }
466
  )
467
  );
468
 
469
+ /*register_setting('xcloner_system_settings_group', 'xcloner_diff_backup_recreate_period', array($this->xcloner_sanitization, "sanitize_input_as_int"));
470
+ add_settings_field(
471
+ 'xcloner_diff_backup_recreate_period',
472
+ __('Differetial Backups Max Days','xcloner-backup-and-restore'),
473
+ array($this, 'do_form_number_field'),
474
+ 'xcloner_system_settings_page',
475
+ 'xcloner_system_settings_group',
476
+ array('xcloner_diff_backup_recreate_period',
477
+ __('Use this option to set when a full backup should be recreated if the scheduled backup type is set to \'Full Backup+Differential Backups\' ','xcloner-backup-and-restore'),
478
+ )
479
+ );*/
480
+
481
  register_setting('xcloner_system_settings_group', 'xcloner_exclude_files_larger_than_mb', array($this->xcloner_sanitization, "sanitize_input_as_int"));
482
  add_settings_field(
483
  'xcloner_exclude_files_larger_than_mb',
640
  <li>Exclude wp-content/updraft and wp/content/uploads/wp_all_backup folder :<span class="regex_pattern">\/(wp-content\/updraft|\/wp-content\/uploads\/wp_all_backup)(.*)$</span></li>
641
  <li>Exclude all cache folders from wp-content/ and it's subdirectories: <span class="regex_pattern"> <?php echo htmlentities('\/wp-content(.*)\/cache($|\/)(.*)')?></span></li>
642
  <li>Exclude wp-content/cache/ folder: <span class="regex_pattern"> <?php echo htmlentities('\/wp-content\/cache(.*)')?></span></li>
643
+ <li>Exclude all error_log files: <span class="regex_pattern"> <?php echo htmlentities('(.*)error_log$')?></span></li>
644
  </ul>
645
  </div>
646
  </div>
668
  <input class="validate" <?php echo ($disabled)?"disabled":""?> name="<?php echo $fieldname?>" id="<?php echo $fieldname?>" type="number" class="validate" value="<?php echo isset($value) ? esc_attr($value) : ''; ?>">
669
  </div>
670
  <div class="col s2 m2 ">
671
+ <a class="btn-floating tooltipped btn-small" data-html="true" data-position="center" data-delay="50" data-tooltip="<?php echo $label?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
672
  </div>
673
  </div>
674
 
691
  </p>
692
  </div>
693
  <div class="col s2 m2 ">
694
+ <a class="btn-floating tooltipped btn-small" data-html="true" data-position="center" data-delay="50" data-tooltip="<?php echo $label?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
695
  </div>
696
  </div>
697
  <?php
706
  $value = get_option($fieldname);
707
  ?>
708
  <div class="row">
709
+ <div class="input-field col s10 m5 l3">
710
  <div class="switch">
711
  <label>
712
  Off
includes/class-xcloner.php CHANGED
@@ -83,7 +83,7 @@ class Xcloner {
83
  register_shutdown_function(array($this, 'exception_handler'));
84
 
85
  $this->plugin_name = 'xcloner';
86
- $this->version = '4.0.2';
87
 
88
  $this->load_dependencies();
89
  $this->set_locale();
@@ -410,6 +410,9 @@ class Xcloner {
410
  {
411
  $this->xcloner_logger = new XCloner_Logger($this, "xcloner_api");
412
  $this->xcloner_filesystem = new Xcloner_File_System($this);
 
 
 
413
  $this->archive_system = new Xcloner_Archive($this);
414
  $this->xcloner_database = new Xcloner_Database($this);
415
  $this->xcloner_scheduler = new Xcloner_Scheduler($this);
@@ -435,6 +438,7 @@ class Xcloner {
435
  add_action( 'wp_ajax_restore_upload_backup' , array($xcloner_api,'restore_upload_backup') );
436
  add_action( 'wp_ajax_download_restore_script', array($xcloner_api,'download_restore_script') );
437
  add_action( 'wp_ajax_copy_backup_remote_to_local', array($xcloner_api,'copy_backup_remote_to_local') );
 
438
  add_action( 'admin_notices', array($this, 'xcloner_error_admin_notices' ));
439
 
440
  }
@@ -468,15 +472,22 @@ class Xcloner {
468
 
469
  function add_new_intervals($schedules)
470
  {
471
- // add weekly and monthly intervals
472
  $schedules['weekly'] = array(
473
  'interval' => 604800,
474
- 'display' => __('Once Weekly')
475
  );
476
-
 
477
  $schedules['monthly'] = array(
478
  'interval' => 2635200,
479
- 'display' => __('Once a month')
 
 
 
 
 
 
480
  );
481
 
482
  return $schedules;
83
  register_shutdown_function(array($this, 'exception_handler'));
84
 
85
  $this->plugin_name = 'xcloner';
86
+ $this->version = '4.0.3';
87
 
88
  $this->load_dependencies();
89
  $this->set_locale();
410
  {
411
  $this->xcloner_logger = new XCloner_Logger($this, "xcloner_api");
412
  $this->xcloner_filesystem = new Xcloner_File_System($this);
413
+
414
+ //$this->xcloner_filesystem->set_diff_timestamp_start (strtotime("-15 days"));
415
+
416
  $this->archive_system = new Xcloner_Archive($this);
417
  $this->xcloner_database = new Xcloner_Database($this);
418
  $this->xcloner_scheduler = new Xcloner_Scheduler($this);
438
  add_action( 'wp_ajax_restore_upload_backup' , array($xcloner_api,'restore_upload_backup') );
439
  add_action( 'wp_ajax_download_restore_script', array($xcloner_api,'download_restore_script') );
440
  add_action( 'wp_ajax_copy_backup_remote_to_local', array($xcloner_api,'copy_backup_remote_to_local') );
441
+ add_action( 'wp_ajax_restore_backup', array($xcloner_api,'restore_backup') );
442
  add_action( 'admin_notices', array($this, 'xcloner_error_admin_notices' ));
443
 
444
  }
472
 
473
  function add_new_intervals($schedules)
474
  {
475
+ //weekly scheduler interval
476
  $schedules['weekly'] = array(
477
  'interval' => 604800,
478
+ 'display' => __('Once Weekly', 'xcloner-backup-and-restore')
479
  );
480
+
481
+ //monthly scheduler interval
482
  $schedules['monthly'] = array(
483
  'interval' => 2635200,
484
+ 'display' => __('Once Monthly', 'xcloner-backup-and-restore')
485
+ );
486
+
487
+ //monthly scheduler interval
488
+ $schedules['twicedaily'] = array(
489
+ 'interval' => 43200,
490
+ 'display' => __('Twice Daily', 'xcloner-backup-and-restore')
491
  );
492
 
493
  return $schedules;
languages/xcloner-backup-and-restore-ro_RO.mo CHANGED
Binary file
languages/xcloner-backup-and-restore-ro_RO.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: \n"
4
- "POT-Creation-Date: 2017-03-14 11:47+0200\n"
5
- "PO-Revision-Date: 2017-03-15 20:47+0200\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: ro_RO\n"
@@ -20,23 +20,23 @@ msgstr ""
20
  "X-Poedit-SearchPathExcluded-0: admin/js\n"
21
  "X-Poedit-SearchPathExcluded-1: vendor\n"
22
 
23
- #: admin/class-xcloner-admin.php:225
24
  msgid "Settings Saved"
25
  msgstr "Setari Salvate"
26
 
27
- #: admin/class-xcloner-admin.php:246
28
  msgid "General Options"
29
  msgstr "Optiuni Generale"
30
 
31
- #: admin/class-xcloner-admin.php:247
32
  msgid "Mysql Options"
33
  msgstr "Optiuni Mysql"
34
 
35
- #: admin/class-xcloner-admin.php:248
36
  msgid "System Options"
37
  msgstr "Optiuni Sistem"
38
 
39
- #: admin/class-xcloner-admin.php:249
40
  msgid "Cleanup Options"
41
  msgstr "Optiuni Curatare"
42
 
@@ -44,62 +44,76 @@ msgstr "Optiuni Curatare"
44
  msgid "XCloner Debugger Dashboard"
45
  msgstr "Consola Debug XCloner"
46
 
47
- #: admin/partials/xcloner_generate_backups_page.php:13
48
  msgid "Backup Options"
49
  msgstr "Optiuni Backup"
50
 
51
- #: admin/partials/xcloner_generate_backups_page.php:15
52
  msgid "Database Options"
53
  msgstr "Optiuni Baza Date"
54
 
55
- #: admin/partials/xcloner_generate_backups_page.php:17
56
  msgid "Files Options"
57
  msgstr "Optiuni Fisiere"
58
 
59
- #: admin/partials/xcloner_generate_backups_page.php:18
60
- #: includes/class-xcloner.php:448
61
  msgid "Generate Backup"
62
  msgstr "Creare Backup"
63
 
64
- #: admin/partials/xcloner_generate_backups_page.php:19
65
  msgid "Schedule Backup"
66
  msgstr "Programare Backup"
67
 
68
- #: admin/partials/xcloner_generate_backups_page.php:30
69
  #: admin/partials/xcloner_init_page.php:88
70
  #: admin/partials/xcloner_manage_backups_page.php:50
71
- #: admin/partials/xcloner_scheduled_backups_page.php:142
72
  msgid "Backup Name"
73
  msgstr "Nume Backup"
74
 
75
- #: admin/partials/xcloner_generate_backups_page.php:33
76
  msgid "The default backup name, supported tags [time], [hostname], [domain]"
77
  msgstr ""
78
  "Numele implicit al fisierului de backup, tag-uri suportate [time], "
79
  "[hostname], [domain] "
80
 
81
- #: admin/partials/xcloner_generate_backups_page.php:41
82
  msgid "Send Email Notification To"
83
  msgstr "Trimite Notificare E-Mail Catre"
84
 
85
- #: admin/partials/xcloner_generate_backups_page.php:44
86
  msgid "If left blank, no notification will be sent"
87
  msgstr "Daca lasat gol, nici o notificare nu va fi trimisa"
88
 
89
- #: admin/partials/xcloner_generate_backups_page.php:52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  msgid "Backup Comments"
91
  msgstr "Comentarii backup"
92
 
93
- #: admin/partials/xcloner_generate_backups_page.php:55
94
  msgid ""
95
  "Some default backup comments that will be stored inside the backup archive"
96
  msgstr "Comentarii implicite care for fi storcate inauntrul arhivei"
97
 
98
- #: admin/partials/xcloner_generate_backups_page.php:68
99
  msgid "Select database data to include in the backup"
100
  msgstr "Selectati baza de date pentru adaugare in backup"
101
 
102
- #: admin/partials/xcloner_generate_backups_page.php:69
103
  msgid ""
104
  "Enable the 'Backup only WP tables' setting if you don't want to show all "
105
  "other databases and tables not related to this Wordpress install"
@@ -107,14 +121,14 @@ msgstr ""
107
  "Activati “Backup doar tabele WP” daca nu vreti sa afisati si celelalte baze "
108
  "de date si tabele care nu sunt relationate de aceasta instalare"
109
 
110
- #: admin/partials/xcloner_generate_backups_page.php:89
111
  msgid ""
112
  "Select from below the files/folders you want to exclude from your Backup "
113
  "Archive"
114
  msgstr ""
115
  "Selectati de mai jos fisierele pe care vreti sa le excludeti din Backup"
116
 
117
- #: admin/partials/xcloner_generate_backups_page.php:90
118
  msgid ""
119
  "You can navigate below through all your site structure(Backup Start "
120
  "Location) to exclude any file/folder you need by clicking the checkbox near "
@@ -126,82 +140,77 @@ msgstr ""
126
  "fiecareia. <br /> Daca casuta nu poate fi deselectata, atunci fisierul este "
127
  "exclus de o regula Regex si nu poate fi inclus in Backup."
128
 
129
- #: admin/partials/xcloner_generate_backups_page.php:118
130
  msgid "Scanning The File System..."
131
  msgstr "Scanez Sistemul De Fisiere…"
132
 
133
- #: admin/partials/xcloner_generate_backups_page.php:120
134
  #, php-format
135
  msgid "Found %s files (%s)"
136
  msgstr "Am gasit %s fisiere (%s)"
137
 
138
- #: admin/partials/xcloner_generate_backups_page.php:135
139
  msgid "Generating the Mysql Backup..."
140
  msgstr "Creare Backup Mysql…"
141
 
142
- #: admin/partials/xcloner_generate_backups_page.php:137
143
  #, php-format
144
  msgid "Found %s tables in %s databases (%s)"
145
  msgstr "Am gasit %s tabele in %s baze de date (%s)"
146
 
147
- #: admin/partials/xcloner_generate_backups_page.php:161
148
  msgid "Adding Files to Archive..."
149
  msgstr "Adaug Fisierele in Arhiva…"
150
 
151
- #: admin/partials/xcloner_generate_backups_page.php:163
152
  #, php-format
153
  msgid "Adding %s files (%s)"
154
  msgstr "Adaug %s fisiere (%s)"
155
 
156
- #: admin/partials/xcloner_generate_backups_page.php:176
157
  msgid "Backup Parts"
158
  msgstr "Parti Backup"
159
 
160
- #: admin/partials/xcloner_generate_backups_page.php:186
161
  msgid "Backup Done"
162
  msgstr "Backup Terminat"
163
 
164
- #: admin/partials/xcloner_generate_backups_page.php:190
165
  #: admin/partials/xcloner_manage_backups_page.php:128
166
  msgid "Send Backup To Remote Storage"
167
  msgstr "Trimite Backup In Stocare La Distanta "
168
 
169
- #: admin/partials/xcloner_generate_backups_page.php:192
170
  #: admin/partials/xcloner_manage_backups_page.php:125
171
  msgid "Download Backup"
172
  msgstr "Descarcare Backup"
173
 
174
- #: admin/partials/xcloner_generate_backups_page.php:193
175
  #: admin/partials/xcloner_manage_backups_page.php:112
176
  #: admin/partials/xcloner_manage_backups_page.php:130
177
  msgid "List Backup Content"
178
  msgstr "Afiseaza Continutul Backup"
179
 
180
- #: admin/partials/xcloner_generate_backups_page.php:203
181
- #: admin/partials/xcloner_restore_page.php:311
182
  msgid "Thank you for using XCloner."
183
  msgstr "Multumim pentru ca utilizati XCloner."
184
 
185
- #: admin/partials/xcloner_generate_backups_page.php:204
186
- #: admin/partials/xcloner_restore_page.php:312
187
  #, php-format
188
  msgid "We would love to hear about your experience in the %s."
189
  msgstr "Ne-ar placea sa auzim despre experienta dumnevoastra in %s."
190
 
191
- #: admin/partials/xcloner_generate_backups_page.php:220
192
  msgid "Schedule Saved"
193
  msgstr "Program Salvat"
194
 
195
- #: admin/partials/xcloner_generate_backups_page.php:221
196
  msgid "(Dismiss this notice."
197
  msgstr "(Anuleaza aceasta notificare."
198
 
199
- #: admin/partials/xcloner_generate_backups_page.php:227
200
- #: admin/partials/xcloner_scheduled_backups_page.php:51
201
- msgid "Current Server Time"
202
- msgstr "Timpul Curent Pe Server"
203
-
204
- #: admin/partials/xcloner_generate_backups_page.php:234
205
  #: admin/partials/xcloner_init_page.php:132
206
  #: admin/partials/xcloner_scheduled_backups_page.php:23
207
  #: admin/partials/xcloner_scheduled_backups_page.php:35
@@ -209,88 +218,108 @@ msgstr "Timpul Curent Pe Server"
209
  msgid "Schedule Name"
210
  msgstr "Numele Programarii"
211
 
212
- #: admin/partials/xcloner_generate_backups_page.php:241
213
  msgid "Schedule Backup To Start On:"
214
  msgstr "Programeaza Backup-ul Sa Inceapa Pe:"
215
 
216
- #: admin/partials/xcloner_generate_backups_page.php:245
217
  msgid "At:"
218
  msgstr "La:"
219
 
220
- #: admin/partials/xcloner_generate_backups_page.php:252
221
- msgid "please select"
222
- msgstr "faceti o selectie"
 
223
 
224
- #: admin/partials/xcloner_generate_backups_page.php:253
225
- #: admin/partials/xcloner_scheduled_backups_page.php:106
226
- msgid "Don't Repeat"
227
- msgstr "O Singura Data"
228
 
229
- #: admin/partials/xcloner_generate_backups_page.php:254
230
- #: admin/partials/xcloner_scheduled_backups_page.php:107
231
- msgid "Hourly"
232
- msgstr "In Fiecare ora"
233
 
234
- #: admin/partials/xcloner_generate_backups_page.php:255
235
- #: admin/partials/xcloner_scheduled_backups_page.php:108
236
- msgid "Daily"
237
- msgstr "Zilnic"
 
 
 
 
 
 
 
 
238
 
239
- #: admin/partials/xcloner_generate_backups_page.php:256
240
- #: admin/partials/xcloner_scheduled_backups_page.php:109
241
- msgid "Weekly"
242
- msgstr "Saptamanal"
 
 
 
243
 
244
- #: admin/partials/xcloner_generate_backups_page.php:257
245
- #: admin/partials/xcloner_scheduled_backups_page.php:110
246
- msgid "Monthly"
247
- msgstr "Lunar"
 
 
 
 
248
 
249
- #: admin/partials/xcloner_generate_backups_page.php:259
250
- msgid "Please Select Frequency to run"
251
- msgstr "Selectati Frecventa De Rulare"
252
 
253
- #: admin/partials/xcloner_generate_backups_page.php:267
254
- #: admin/partials/xcloner_scheduled_backups_page.php:119
 
 
 
 
255
  msgid "none"
256
  msgstr "nici una"
257
 
258
- #: admin/partials/xcloner_generate_backups_page.php:272
259
  msgid "Send To Remote Storage"
260
  msgstr "Trimite In Spatiul De Storcare La Distanta"
261
 
262
- #: admin/partials/xcloner_generate_backups_page.php:278
263
  msgid "Submit"
264
  msgstr "Trimite"
265
 
266
- #: admin/partials/xcloner_generate_backups_page.php:292
267
  msgid "Message"
268
  msgstr "Mesaj"
269
 
270
- #: admin/partials/xcloner_generate_backups_page.php:293
271
  msgid "Response Code"
272
  msgstr "Cod Raspuns"
273
 
274
- #: admin/partials/xcloner_generate_backups_page.php:297
275
  msgid "Close"
276
  msgstr "Inchide"
277
 
278
- #: admin/partials/xcloner_generate_backups_page.php:305
279
  #: admin/partials/xcloner_manage_backups_page.php:153
280
  msgid "Listing Backup Content "
281
  msgstr "Continutul Fisierului De Backup"
282
 
283
- #: admin/partials/xcloner_generate_backups_page.php:320
284
  #: admin/partials/xcloner_manage_backups_page.php:183
285
  msgid "Remote Storage Transfer"
286
  msgstr "Transfer In Stocare Externa"
287
 
288
- #: admin/partials/xcloner_generate_backups_page.php:329
289
  #: admin/partials/xcloner_manage_backups_page.php:192
290
  msgid "please select..."
291
  msgstr "faceti o selectie…"
292
 
293
- #: admin/partials/xcloner_generate_backups_page.php:341
294
  #: admin/partials/xcloner_manage_backups_page.php:204
295
  msgid "Uploading backup to the selected remote storage..."
296
  msgstr "Incarc backup-ul in spatiul de stocare selectat"
@@ -361,70 +390,70 @@ msgstr "Neprogramat"
361
  msgid "XCloner Debugger"
362
  msgstr "Depanator XCloner"
363
 
364
- #: admin/partials/xcloner_init_page.php:180
365
  msgid "System Check"
366
  msgstr "Verificare Sistem"
367
 
368
- #: admin/partials/xcloner_init_page.php:183
369
  #: includes/class-xcloner-settings.php:287
370
  msgid "Backup Start Location"
371
  msgstr "Calea Inceput Backup"
372
 
373
- #: admin/partials/xcloner_init_page.php:186
374
  #: includes/class-xcloner-settings.php:301
375
  msgid "Backup Storage Location"
376
  msgstr "Calea Stocare Backup"
377
 
378
- #: admin/partials/xcloner_init_page.php:189
379
  msgid "Temporary Location"
380
  msgstr "Locatia Temporara"
381
 
382
- #: admin/partials/xcloner_init_page.php:193
383
  msgid "PHP Version Check"
384
  msgstr "Verificare Versiune PHP"
385
 
386
- #: admin/partials/xcloner_init_page.php:197
387
  msgid "PHP Safe Mode"
388
  msgstr ""
389
 
390
- #: admin/partials/xcloner_init_page.php:201
391
  msgid "BACKUP READY"
392
  msgstr "PREGATIT DE BACKUP"
393
 
394
- #: admin/partials/xcloner_init_page.php:201
395
  msgid "Backup not ready, please check above requirements"
396
  msgstr "Sistem Backup Invalid, va rog verificati cerintele date"
397
 
398
- #: admin/partials/xcloner_init_page.php:207
399
  msgid "PHP max_execution_time"
400
  msgstr ""
401
 
402
- #: admin/partials/xcloner_init_page.php:210
403
  msgid "PHP memory_limit"
404
  msgstr ""
405
 
406
- #: admin/partials/xcloner_init_page.php:213
407
  msgid "PHP open_basedir"
408
  msgstr ""
409
 
410
- #: admin/partials/xcloner_init_page.php:221
411
  msgid "Reading Time 1MB Block"
412
  msgstr "Timp citire bloc de 1MB "
413
 
414
- #: admin/partials/xcloner_init_page.php:221
415
- #: admin/partials/xcloner_init_page.php:224
416
  msgid "unknown"
417
  msgstr "necunoscut"
418
 
419
- #: admin/partials/xcloner_init_page.php:224
420
  msgid "Writing Time 1MB Block"
421
  msgstr "Timp scriere bloc de 1M"
422
 
423
- #: admin/partials/xcloner_init_page.php:227
424
  msgid "Free Disk Space"
425
  msgstr "Spatiul Disc Liber"
426
 
427
- #: admin/partials/xcloner_init_page.php:232
428
  msgid "Toggle Additional System Info"
429
  msgstr "Arata Informatii Sistem Aditionale"
430
 
@@ -544,34 +573,34 @@ msgstr "Curatare Ftp(zile)"
544
 
545
  #: admin/partials/xcloner_remote_storage_page.php:116
546
  #: admin/partials/xcloner_remote_storage_page.php:214
547
- #: admin/partials/xcloner_remote_storage_page.php:303
548
- #: admin/partials/xcloner_remote_storage_page.php:384
549
- #: admin/partials/xcloner_remote_storage_page.php:465
550
- #: admin/partials/xcloner_remote_storage_page.php:546
551
- #: admin/partials/xcloner_remote_storage_page.php:635
552
- #: admin/partials/xcloner_remote_storage_page.php:736
553
  msgid "how many days to keep the backups for"
554
  msgstr "pentru cate zile sa pastrez fisierele de backup"
555
 
556
  #: admin/partials/xcloner_remote_storage_page.php:122
557
  #: admin/partials/xcloner_remote_storage_page.php:220
558
- #: admin/partials/xcloner_remote_storage_page.php:309
559
- #: admin/partials/xcloner_remote_storage_page.php:390
560
- #: admin/partials/xcloner_remote_storage_page.php:471
561
- #: admin/partials/xcloner_remote_storage_page.php:552
562
- #: admin/partials/xcloner_remote_storage_page.php:641
563
- #: admin/partials/xcloner_remote_storage_page.php:742
564
  msgid "Save Settings"
565
  msgstr "Salveaza Setari"
566
 
567
  #: admin/partials/xcloner_remote_storage_page.php:127
568
  #: admin/partials/xcloner_remote_storage_page.php:225
569
- #: admin/partials/xcloner_remote_storage_page.php:314
570
- #: admin/partials/xcloner_remote_storage_page.php:395
571
- #: admin/partials/xcloner_remote_storage_page.php:476
572
- #: admin/partials/xcloner_remote_storage_page.php:557
573
- #: admin/partials/xcloner_remote_storage_page.php:646
574
- #: admin/partials/xcloner_remote_storage_page.php:747
575
  msgid "Verify"
576
  msgstr "Verifica"
577
 
@@ -595,12 +624,15 @@ msgstr ""
595
 
596
  #: admin/partials/xcloner_remote_storage_page.php:175
597
  #: admin/partials/xcloner_remote_storage_page.php:178
598
- msgid "SFTP Password"
599
  msgstr ""
600
 
601
  #: admin/partials/xcloner_remote_storage_page.php:184
 
 
 
602
  #: admin/partials/xcloner_remote_storage_page.php:187
603
- msgid "SFTP Private Key"
604
  msgstr ""
605
 
606
  #: admin/partials/xcloner_remote_storage_page.php:193
@@ -637,136 +669,143 @@ msgid "AWS Secret"
637
  msgstr ""
638
 
639
  #: admin/partials/xcloner_remote_storage_page.php:282
640
- #: admin/partials/xcloner_remote_storage_page.php:285
641
  msgid "AWS Region"
642
  msgstr ""
643
 
644
- #: admin/partials/xcloner_remote_storage_page.php:291
645
- #: admin/partials/xcloner_remote_storage_page.php:294
 
 
 
 
 
 
 
 
646
  msgid "AWS Bucket Name"
647
  msgstr ""
648
 
649
- #: admin/partials/xcloner_remote_storage_page.php:300
650
  msgid "AWS Cleanup (days)"
651
  msgstr "Curatare AWS(zile)"
652
 
653
- #: admin/partials/xcloner_remote_storage_page.php:326
654
  msgid "Dropbox Storage"
655
  msgstr "Stocare Dropbox"
656
 
657
- #: admin/partials/xcloner_remote_storage_page.php:346
658
  #, php-format
659
  msgid "Visit %s and get your \"App secret\"."
660
- msgstr ""
661
 
662
- #: admin/partials/xcloner_remote_storage_page.php:353
663
- #: admin/partials/xcloner_remote_storage_page.php:356
664
  msgid "Dropbox Access Token"
665
  msgstr ""
666
 
667
- #: admin/partials/xcloner_remote_storage_page.php:363
668
- #: admin/partials/xcloner_remote_storage_page.php:366
669
  msgid "Dropbox App Secret"
670
  msgstr ""
671
 
672
- #: admin/partials/xcloner_remote_storage_page.php:372
673
- #: admin/partials/xcloner_remote_storage_page.php:375
674
  msgid "Dropbox Prefix"
675
  msgstr ""
676
 
677
- #: admin/partials/xcloner_remote_storage_page.php:381
678
  msgid "Dropbox Cleanup (days)"
679
  msgstr "Curatare Dropbox(zile)"
680
 
681
- #: admin/partials/xcloner_remote_storage_page.php:407
682
  msgid "Azure Blog Storage"
683
  msgstr ""
684
 
685
- #: admin/partials/xcloner_remote_storage_page.php:427
686
  #, php-format
687
  msgid "Visit %s and get your \"Api Key\"."
688
  msgstr "Vizitati %s pentru a obtine cheia \"Api Key\""
689
 
690
- #: admin/partials/xcloner_remote_storage_page.php:434
691
- #: admin/partials/xcloner_remote_storage_page.php:437
692
  msgid "Azure Account Name"
693
  msgstr ""
694
 
695
- #: admin/partials/xcloner_remote_storage_page.php:444
696
- #: admin/partials/xcloner_remote_storage_page.php:447
697
  msgid "Azure Api Key"
698
  msgstr ""
699
 
700
- #: admin/partials/xcloner_remote_storage_page.php:453
701
- #: admin/partials/xcloner_remote_storage_page.php:456
702
  msgid "Azure Container"
703
  msgstr ""
704
 
705
- #: admin/partials/xcloner_remote_storage_page.php:462
706
  msgid "Azure Cleanup (days)"
707
  msgstr "Curatare Azure(zile)"
708
 
709
- #: admin/partials/xcloner_remote_storage_page.php:488
710
  msgid "BackBlaze Storage"
711
- msgstr ""
712
 
713
- #: admin/partials/xcloner_remote_storage_page.php:508
714
  #, php-format
715
  msgid "Visit %s and get your Account Id and Application Key."
716
- msgstr ""
717
 
718
- #: admin/partials/xcloner_remote_storage_page.php:515
719
- #: admin/partials/xcloner_remote_storage_page.php:518
720
  msgid "BackBlaze Account Id"
721
  msgstr ""
722
 
723
- #: admin/partials/xcloner_remote_storage_page.php:525
724
- #: admin/partials/xcloner_remote_storage_page.php:528
725
  msgid "BackBlaze Application Key"
726
  msgstr ""
727
 
728
- #: admin/partials/xcloner_remote_storage_page.php:534
729
- #: admin/partials/xcloner_remote_storage_page.php:537
730
  msgid "BackBlaze Bucket Name"
731
  msgstr ""
732
 
733
- #: admin/partials/xcloner_remote_storage_page.php:543
734
  msgid "BackBlaze Cleanup (days)"
735
  msgstr ""
736
 
737
- #: admin/partials/xcloner_remote_storage_page.php:569
738
  msgid "WebDAV Storage"
739
- msgstr ""
740
 
741
- #: admin/partials/xcloner_remote_storage_page.php:596
742
- #: admin/partials/xcloner_remote_storage_page.php:599
743
  msgid "WebDAV Base Url"
744
  msgstr ""
745
 
746
- #: admin/partials/xcloner_remote_storage_page.php:605
747
- #: admin/partials/xcloner_remote_storage_page.php:608
748
  msgid "WebDAV Username"
749
  msgstr ""
750
 
751
- #: admin/partials/xcloner_remote_storage_page.php:614
752
- #: admin/partials/xcloner_remote_storage_page.php:617
753
  msgid "WebDAV Password"
754
  msgstr ""
755
 
756
- #: admin/partials/xcloner_remote_storage_page.php:623
757
- #: admin/partials/xcloner_remote_storage_page.php:626
758
  msgid "WebDAV Target Folder"
759
  msgstr ""
760
 
761
- #: admin/partials/xcloner_remote_storage_page.php:632
762
  msgid "WebDAV Cleanup (days)"
763
  msgstr ""
764
 
765
- #: admin/partials/xcloner_remote_storage_page.php:658
766
  msgid "Google Drive Storage"
767
- msgstr ""
768
 
769
- #: admin/partials/xcloner_remote_storage_page.php:682
770
  #, php-format
771
  msgid ""
772
  "Visit %s to create a new application and get your Client ID and Client "
@@ -775,7 +814,7 @@ msgstr ""
775
  "Vizitati %s pentru a crea o noua aplicatie si a obtine Client ID si Client "
776
  "Secret."
777
 
778
- #: admin/partials/xcloner_remote_storage_page.php:684
779
  #, php-format
780
  msgid ""
781
  "Click here to view a short video explaining how to create the Client ID and "
@@ -785,35 +824,35 @@ msgstr ""
785
  "parametrii Client ID si Client Secret si despre cum puteti conecta XCloner "
786
  "la Google Drive API %s"
787
 
788
- #: admin/partials/xcloner_remote_storage_page.php:691
789
  msgid "Client ID"
790
  msgstr ""
791
 
792
- #: admin/partials/xcloner_remote_storage_page.php:694
793
  msgid "Google Client ID"
794
  msgstr ""
795
 
796
- #: admin/partials/xcloner_remote_storage_page.php:700
797
  msgid "Client Secret"
798
  msgstr ""
799
 
800
- #: admin/partials/xcloner_remote_storage_page.php:703
801
  msgid "Google Client Secret"
802
  msgstr ""
803
 
804
- #: admin/partials/xcloner_remote_storage_page.php:713
805
  msgid "Authorize Google Drive"
806
  msgstr "Autorizati Google Drive"
807
 
808
- #: admin/partials/xcloner_remote_storage_page.php:714
809
  msgid "Paste Authorization Code Here"
810
  msgstr "Copiati Codul de Autorizare Aici"
811
 
812
- #: admin/partials/xcloner_remote_storage_page.php:720
813
  msgid "Folder ID or Root Path"
814
  msgstr ""
815
 
816
- #: admin/partials/xcloner_remote_storage_page.php:722
817
  msgid ""
818
  "Folder ID can be found by right clicking on the folder name and selecting "
819
  "'Get shareable link' menu, format https://drive.google.com/open?"
@@ -822,35 +861,63 @@ msgid ""
822
  "root and start with / , example /backups.xcloner.com/"
823
  msgstr ""
824
 
825
- #: admin/partials/xcloner_remote_storage_page.php:727
826
  msgid "Target Folder ID or Root Path"
827
  msgstr ""
828
 
829
- #: admin/partials/xcloner_remote_storage_page.php:733
830
  msgid "Google Drive Cleanup (days)"
831
  msgstr ""
832
 
833
- #: admin/partials/xcloner_remote_storage_page.php:757
834
- msgid "Free Download XCloner-Google-Drive Wordpress Plugin"
835
- msgstr "Descarcati gratuit plugin-ul XWordpress Cloner-Google-Drive"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
836
 
837
  #: admin/partials/xcloner_restore_page.php:24
838
  msgid "Restore Script Upload"
839
  msgstr "Incarcare Script Restaurare"
840
 
841
  #: admin/partials/xcloner_restore_page.php:28
842
- msgid "Please download the restore script from"
843
- msgstr "Descarcati script-ul de restore de "
 
 
 
 
844
 
845
- #: admin/partials/xcloner_restore_page.php:28
 
 
 
 
 
 
 
 
846
  msgid "here"
847
  msgstr "aici"
848
 
849
- #: admin/partials/xcloner_restore_page.php:31
850
  msgid "Extract the files on your new host"
851
  msgstr "Scrieti fisierele in noua locatie"
852
 
853
- #: admin/partials/xcloner_restore_page.php:34
854
  msgid ""
855
  "Provide url below to the <u>xcloner_restore.php</u> restore script, like "
856
  "http://my_restore_site.com/xcloner_restore.php"
@@ -858,7 +925,7 @@ msgstr ""
858
  "Introduceti adresa web catre script-ul de restaurare <u>xcloner_restore.php</"
859
  "u> , examplu format http://my_restore_site.com/xcloner_restore.php"
860
 
861
- #: admin/partials/xcloner_restore_page.php:37
862
  msgid ""
863
  "If your server is not web accessible, like a localhost computer, you can use "
864
  "a DynDNS service or install a blank copy of Wordpress with XCloner in the "
@@ -869,7 +936,7 @@ msgstr ""
869
  "Wordpress cu plugin-ul XCloner in aceeasi locatie si sa incepeti procestul "
870
  "de restaurare de acolo."
871
 
872
- #: admin/partials/xcloner_restore_page.php:41
873
  msgid ""
874
  "We have detected your connection to the site as being secure, so your "
875
  "restore script address must start with https://."
@@ -877,15 +944,15 @@ msgstr ""
877
  "Am detectat conexiunea catre site ca fiind securizata, adresa script-ului de "
878
  "restaurare trebuie sa inceapa cu https://."
879
 
880
- #: admin/partials/xcloner_restore_page.php:53
881
- msgid "Check"
882
- msgstr "Verifica"
883
 
884
- #: admin/partials/xcloner_restore_page.php:61
885
- msgid "Upload Local Backup Archive To Remote Host"
886
- msgstr "Incarcati Arhiva Locala De Backup In Noua Locatie"
887
 
888
- #: admin/partials/xcloner_restore_page.php:64
889
  msgid ""
890
  "You can skip this step if you want to transfer the archive in some other "
891
  "way, make sure you upload it in the same directory as the restore script "
@@ -895,84 +962,121 @@ msgstr ""
895
  "noua locatie, asigurati-va ca o copiati in acceeasi locatie cu script-ul de "
896
  "restaurare din pasul precedent."
897
 
898
- #: admin/partials/xcloner_restore_page.php:67
899
- msgid "Please select a local backup archive to upload to remote host"
900
- msgstr "Selectati un fisier backup local pentru incarcare in noua locatie"
 
 
901
 
902
- #: admin/partials/xcloner_restore_page.php:85
903
  msgid "Upload"
904
  msgstr "Incarca"
905
 
906
- #: admin/partials/xcloner_restore_page.php:88
907
- #: admin/partials/xcloner_restore_page.php:140
908
- #: admin/partials/xcloner_restore_page.php:238
909
  msgid "Cancel"
910
  msgstr "Anulare"
911
 
912
- #: admin/partials/xcloner_restore_page.php:92
913
- #: admin/partials/xcloner_restore_page.php:144
914
- #: admin/partials/xcloner_restore_page.php:243
915
  msgid "Skip Next"
916
  msgstr "Pasul Urmator"
917
 
918
- #: admin/partials/xcloner_restore_page.php:92
919
- #: admin/partials/xcloner_restore_page.php:144
920
- #: admin/partials/xcloner_restore_page.php:243
921
  msgid "Next"
922
  msgstr "Urmator"
923
 
924
- #: admin/partials/xcloner_restore_page.php:100
925
- msgid "Restore Files Backup Available On Remote Host"
926
- msgstr "Restaurati fisierul de backup disponibil in noua locatie"
927
 
928
- #: admin/partials/xcloner_restore_page.php:105
929
  msgid "Verbose Output"
930
  msgstr "Afisare Detaliata"
931
 
932
- #: admin/partials/xcloner_restore_page.php:117
933
- msgid "Remote Restore Target Path"
934
- msgstr "Calea Server Locatie Noua"
 
 
 
 
 
 
 
935
 
936
- #: admin/partials/xcloner_restore_page.php:122
937
- msgid "Please select the remote backup file to restore"
938
- msgstr "Selectati pentru restaurare fisierul de backup al locatiei externe"
939
 
940
- #: admin/partials/xcloner_restore_page.php:137
941
- #: admin/partials/xcloner_restore_page.php:235
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
942
  msgid "Restore"
943
  msgstr "Restaurare"
944
 
945
- #: admin/partials/xcloner_restore_page.php:152
946
- msgid "Restore Remote Database - Search and Replace"
947
- msgstr "Destinatie Baza de Date - Cauta si Inlocuieste"
948
 
949
- #: admin/partials/xcloner_restore_page.php:158
950
  msgid ""
951
- "Please provide below the mysql connection details for the remote host "
952
- "database."
953
- msgstr "Introduceti datele de conectare la baza de date a noii locatii."
954
 
955
- #: admin/partials/xcloner_restore_page.php:159
956
- msgid "Remote Mysql Details"
957
  msgstr ""
958
 
959
- #: admin/partials/xcloner_restore_page.php:164
960
- msgid "Remote Mysql Hostname"
961
  msgstr ""
962
 
963
- #: admin/partials/xcloner_restore_page.php:169
964
- msgid "Remote Mysql Database"
965
  msgstr ""
966
 
967
- #: admin/partials/xcloner_restore_page.php:174
968
- msgid "Remote Mysql Username"
969
  msgstr ""
970
 
971
- #: admin/partials/xcloner_restore_page.php:180
972
- msgid "Remote Mysql Password"
973
  msgstr ""
974
 
975
- #: admin/partials/xcloner_restore_page.php:185
976
  msgid ""
977
  "I will attempt to replace all mysql backup records matching the provided "
978
  "Source Url with the provided Target Url. <br />Leave blank the Target Url if "
@@ -980,58 +1084,64 @@ msgid ""
980
  "all matching serialized data and fix it's parsing."
981
  msgstr ""
982
 
983
- #: admin/partials/xcloner_restore_page.php:186
984
- msgid "Remote Mysql Search and Replace"
985
- msgstr "Destinatia Mysql Cauta Si Inlocuieste"
986
 
987
- #: admin/partials/xcloner_restore_page.php:191
988
  msgid "Source Home Url"
989
  msgstr "Url Locatie Sursa"
990
 
991
- #: admin/partials/xcloner_restore_page.php:196
992
  msgid "With Target Home Url"
993
  msgstr "Cu Url Destinatie"
994
 
995
- #: admin/partials/xcloner_restore_page.php:202
996
  msgid "Source Site Url"
997
  msgstr "Url Sursa"
998
 
999
- #: admin/partials/xcloner_restore_page.php:207
1000
  msgid "With Target Site Url"
1001
  msgstr "Cu Url Destinatie"
1002
 
1003
- #: admin/partials/xcloner_restore_page.php:216
1004
- msgid "Please select the remote database backup file to restore"
1005
- msgstr "Selectati pentru restaurare fisierul de backup al bazei de date"
1006
 
1007
- #: admin/partials/xcloner_restore_page.php:228
1008
- msgid "Use the field below to fix your mysql query and Retry again the Restore"
 
 
1009
  msgstr ""
1010
- "Folositi campul de mai jos pentru a repara comanda mysql si Incercati din "
1011
- "nou Restaurarea"
1012
 
1013
- #: admin/partials/xcloner_restore_page.php:253
1014
  msgid "Finishing up..."
1015
  msgstr "Terminare..."
1016
 
1017
- #: admin/partials/xcloner_restore_page.php:259
1018
- msgid "Update wp-config.php mysql details and update the restored site Url"
1019
  msgstr ""
1020
- "Actualizati parametrii mysql din fisierul wp-config.php si noul url al site-"
1021
- "ului restaurat"
1022
 
1023
- #: admin/partials/xcloner_restore_page.php:276
1024
  msgid "Delete Restored Backup Temporary Folder"
1025
  msgstr "Stergeti Directorul Temporar Restaurat"
1026
 
1027
- #: admin/partials/xcloner_restore_page.php:292
1028
  msgid "Delete Restore Script"
1029
  msgstr "Stergeti script-ul de restaurare"
1030
 
1031
- #: admin/partials/xcloner_restore_page.php:319
1032
  msgid "Finish"
1033
  msgstr "Terminare"
1034
 
 
 
 
 
1035
  #: admin/partials/xcloner_scheduled_backups_page.php:10
1036
  #, php-format
1037
  msgid ""
@@ -1074,6 +1184,10 @@ msgstr "Ultimul Backup"
1074
  msgid "Status"
1075
  msgstr "Status"
1076
 
 
 
 
 
1077
  #: admin/partials/xcloner_scheduled_backups_page.php:65
1078
  msgid "Edit Schedule"
1079
  msgstr "Editare Programare"
@@ -1094,31 +1208,31 @@ msgstr "Setari Program"
1094
  msgid "Advanced"
1095
  msgstr "Avansat"
1096
 
1097
- #: admin/partials/xcloner_scheduled_backups_page.php:100
1098
  msgid "Schedule Start At"
1099
  msgstr "Programul Incepe La"
1100
 
1101
- #: admin/partials/xcloner_scheduled_backups_page.php:105
1102
  msgid "Schedule Recurrence"
1103
  msgstr "Recurenta Program"
1104
 
1105
- #: admin/partials/xcloner_scheduled_backups_page.php:124
1106
  msgid "Send To Remote Storage "
1107
  msgstr "Trimite In Spatiul De Storcare La Distanta"
1108
 
1109
- #: admin/partials/xcloner_scheduled_backups_page.php:132
1110
  msgid "Email Notification Address"
1111
  msgstr "Adresa E-Mail Pentru Notificari"
1112
 
1113
- #: admin/partials/xcloner_scheduled_backups_page.php:149
1114
  msgid "Included Database Data"
1115
  msgstr "Include Baza De Data"
1116
 
1117
- #: admin/partials/xcloner_scheduled_backups_page.php:156
1118
  msgid "Excluded Files"
1119
  msgstr "Exclude Fisiere"
1120
 
1121
- #: admin/partials/xcloner_scheduled_backups_page.php:165
1122
  msgid "Save"
1123
  msgstr "Salveaza"
1124
 
@@ -1135,101 +1249,106 @@ msgstr ""
1135
  msgid "XCloner Activation Error"
1136
  msgstr "Eroare Activare XCloner"
1137
 
1138
- #: includes/class-xcloner-api.php:612
1139
  msgid "executed"
1140
  msgstr "executat"
1141
 
1142
- #: includes/class-xcloner-archive.php:153
1143
  #, php-format
1144
  msgid "New backup generated %s"
1145
  msgstr "Backup nou creat %s"
1146
 
1147
- #: includes/class-xcloner-archive.php:155
1148
  #, php-format
1149
  msgid "Generated Backup Size: %s"
1150
  msgstr "Marime backup creat: %s"
1151
 
1152
- #: includes/class-xcloner-archive.php:163
 
 
 
 
 
1153
  #, php-format
1154
  msgid "Backup Parts: %s"
1155
  msgstr "Parti Backup: %s"
1156
 
1157
- #: includes/class-xcloner-archive.php:176
1158
  msgid "Backup Comments: "
1159
  msgstr "Comentarii Backup:"
1160
 
1161
- #: includes/class-xcloner-archive.php:181
1162
  msgid "Latest 50 Log Lines: "
1163
  msgstr "Ultimele 50 de linii log:"
1164
 
1165
- #: includes/class-xcloner-archive.php:236
1166
  #, php-format
1167
  msgid "Initializing the backup archive %s"
1168
  msgstr "Initializare archiva de backup %s"
1169
 
1170
- #: includes/class-xcloner-archive.php:243
1171
  #, php-format
1172
  msgid "Opening for append the backup archive %s"
1173
  msgstr "Deschid pentru adaugare arhiva %s"
1174
 
1175
- #: includes/class-xcloner-database.php:96
1176
  msgid "Starting database backup process"
1177
  msgstr "Incep procesul de backup baza de date"
1178
 
1179
- #: includes/class-xcloner-database.php:183
1180
  msgid "Setting mysql headers"
1181
  msgstr "Setez header mysql"
1182
 
1183
- #: includes/class-xcloner-database.php:198
1184
  #, php-format
1185
  msgid "Getting number of tables in %s"
1186
  msgstr "Obtin numarul de tabele din %s"
1187
 
1188
- #: includes/class-xcloner-database.php:281
1189
  #, php-format
1190
  msgid "Excluding table %s.%s from backup"
1191
  msgstr "Exclud tabela %s.%s din backup"
1192
 
1193
- #: includes/class-xcloner-database.php:295
1194
  msgid "Preparing the database recursion file"
1195
  msgstr "Prepar fisierul de recursie al bazei de date"
1196
 
1197
- #: includes/class-xcloner-database.php:378
1198
  #, php-format
1199
  msgid "Starting new backup dump to file %s"
1200
  msgstr "Incep un nou backup al bazei de date in fisierul %s"
1201
 
1202
- #: includes/class-xcloner-database.php:520
1203
  #, php-format
1204
  msgid "Dumping %s records starting position %s from %s.%s table"
1205
  msgstr "Incarc %s randuri incepand de la pozitia %s din %s.%s tabela"
1206
 
1207
- #: includes/class-xcloner-database.php:528
1208
  #, php-format
1209
  msgid "Dumping the structure for %s.%s table"
1210
  msgstr "Salvez structura pentru tabela %s.%s"
1211
 
1212
- #: includes/class-xcloner-database.php:621
1213
  #, php-format
1214
  msgid "Writing %s database dump headers"
1215
  msgstr "Scrie %s capul bazei de date"
1216
 
1217
- #: includes/class-xcloner-file-system.php:349
1218
  #, php-format
1219
  msgid "Starting the filesystem scanner on root folder %s"
1220
  msgstr "Incep scanarea sistemului de fisiere din %s"
1221
 
1222
- #: includes/class-xcloner-file-system.php:501
1223
  #, php-format
1224
  msgid "Excluding %s from the filesystem list, file not readable"
1225
  msgstr "Exclud %s din sistemul de fisiere, fisierul nu este accesibil"
1226
 
1227
- #: includes/class-xcloner-file-system.php:504
1228
  #, php-format
1229
  msgid "Adding %s to the filesystem list"
1230
  msgstr "Adaug %s in lista de fisiere"
1231
 
1232
- #: includes/class-xcloner-file-system.php:512
1233
  #, php-format
1234
  msgid "Excluding %s from the filesystem list, matching pattern %s"
1235
  msgstr "Exclud %s din lista de fisiere, pattern gasit %s"
@@ -1250,7 +1369,7 @@ msgstr "Panou Start"
1250
  msgid "XCloner Backup Settings"
1251
  msgstr "XCloner Setari Backup"
1252
 
1253
- #: includes/class-xcloner-loader.php:68 includes/class-xcloner.php:447
1254
  msgid "Settings"
1255
  msgstr "Setari"
1256
 
@@ -1274,33 +1393,38 @@ msgstr "Generare Backup"
1274
  msgid "Restore Backups"
1275
  msgstr "Restaurare Backup"
1276
 
1277
- #: includes/class-xcloner-remote-storage.php:163
1278
  #, php-format
1279
  msgid "%s storage settings saved."
1280
  msgstr "%s setarile de stocare au fost salvate."
1281
 
1282
- #: includes/class-xcloner-remote-storage.php:172
1283
  #, php-format
1284
  msgid "%s connection is valid."
1285
  msgstr "%s conexiunea este valida."
1286
 
1287
- #: includes/class-xcloner-remote-storage.php:195
1288
- #: includes/class-xcloner-remote-storage.php:208
1289
  msgid "Could not read data"
1290
  msgstr "Nu pot citi data"
1291
 
1292
- #: includes/class-xcloner-remote-storage.php:203
1293
  msgid "Could not write data"
1294
  msgstr "Nu pot scrie data"
1295
 
1296
- #: includes/class-xcloner-remote-storage.php:213
1297
  msgid "Could not delete data"
1298
  msgstr "Nu pot sterge data"
1299
 
1300
- #: includes/class-xcloner-remote-storage.php:585
1301
  #, php-format
1302
  msgid "Could not find folder ID by name %s"
1303
- msgstr ""
 
 
 
 
 
1304
 
1305
  #: includes/class-xcloner-settings.php:230
1306
  #: includes/class-xcloner-settings.php:237
@@ -1444,68 +1568,68 @@ msgid ""
1444
  "AJAX request, or set to 0 to fetch all. Range 0-100000 records"
1445
  msgstr ""
1446
 
1447
- #: includes/class-xcloner-settings.php:465
1448
  msgid "Exclude files larger than (MB)"
1449
  msgstr "Exclude fisierele mai mari decat(MB)"
1450
 
1451
- #: includes/class-xcloner-settings.php:470
1452
  msgid ""
1453
  "Use this option to automatically exclude files larger than a certain size in "
1454
  "MB, or set to 0 to include all. Range 0-1000 MB"
1455
  msgstr ""
1456
 
1457
- #: includes/class-xcloner-settings.php:477
1458
  msgid "Split Backup Archive Limit (MB)"
1459
  msgstr "Limita Impartire Arhiva(MB)"
1460
 
1461
- #: includes/class-xcloner-settings.php:482
1462
  msgid ""
1463
  "Use this option to automatically split the backup archive into smaller "
1464
  "parts. Range 0-10000 MB"
1465
  msgstr ""
1466
 
1467
- #: includes/class-xcloner-settings.php:489
1468
  msgid "Force Temporary Path Within XCloner Storage"
1469
  msgstr ""
1470
 
1471
- #: includes/class-xcloner-settings.php:494
1472
  msgid ""
1473
  "Enable this option if you want the XCloner Temporary Path to be within your "
1474
  "XCloner Storage Location"
1475
  msgstr ""
1476
 
1477
- #: includes/class-xcloner-settings.php:502
1478
  msgid "Cleanup by Date(days)"
1479
  msgstr "Limita Zile"
1480
 
1481
- #: includes/class-xcloner-settings.php:507
1482
  msgid ""
1483
  "Specify the maximum number of days a backup archive can be kept on the "
1484
  "server. 0 disables this option"
1485
  msgstr ""
1486
 
1487
- #: includes/class-xcloner-settings.php:514
1488
  msgid "Cleanup by Quantity"
1489
  msgstr "Limita Fisiere"
1490
 
1491
- #: includes/class-xcloner-settings.php:519
1492
  msgid ""
1493
  "Specify the maximum number of backup archives to keep on the server. 0 "
1494
  "disables this option"
1495
  msgstr ""
1496
 
1497
- #: includes/class-xcloner-settings.php:526
1498
  msgid "Cleanup by Capacity(MB)"
1499
  msgstr "Capacitate Stocare Maxima(MB)"
1500
 
1501
- #: includes/class-xcloner-settings.php:531
1502
  msgid ""
1503
  "Remove oldest backups if all created backups exceed the configured limit in "
1504
  "Megabytes. 0 disables this option"
1505
  msgstr ""
1506
 
1507
- #: includes/class-xcloner-settings.php:539
1508
- #: includes/class-xcloner-settings.php:544
1509
  msgid "Cron frequency"
1510
  msgstr "Frecventa Cron"
1511
 
@@ -1523,20 +1647,96 @@ msgid ""
1523
  "before starting the backup process."
1524
  msgstr ""
1525
 
1526
- #: includes/class-xcloner.php:474
1527
  msgid "Once Weekly"
1528
  msgstr "O data pe saptamana"
1529
 
1530
- #: includes/class-xcloner.php:479
1531
- msgid "Once a month"
1532
  msgstr "O data pe luna"
1533
 
 
 
 
 
1534
  #: xcloner.php:68
1535
  #, php-format
1536
  msgid ""
1537
  "XCloner requires minimum PHP version %s in order to run correctly. We have "
1538
  "detected your version as %s. Plugin is now deactivated."
1539
  msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1540
 
1541
  #~ msgid "Cron Options"
1542
  #~ msgstr "Optiuni Cron"
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: \n"
4
+ "POT-Creation-Date: 2017-03-29 09:24+0300\n"
5
+ "PO-Revision-Date: 2017-03-29 09:28+0300\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: ro_RO\n"
20
  "X-Poedit-SearchPathExcluded-0: admin/js\n"
21
  "X-Poedit-SearchPathExcluded-1: vendor\n"
22
 
23
+ #: admin/class-xcloner-admin.php:228
24
  msgid "Settings Saved"
25
  msgstr "Setari Salvate"
26
 
27
+ #: admin/class-xcloner-admin.php:249
28
  msgid "General Options"
29
  msgstr "Optiuni Generale"
30
 
31
+ #: admin/class-xcloner-admin.php:250
32
  msgid "Mysql Options"
33
  msgstr "Optiuni Mysql"
34
 
35
+ #: admin/class-xcloner-admin.php:251
36
  msgid "System Options"
37
  msgstr "Optiuni Sistem"
38
 
39
+ #: admin/class-xcloner-admin.php:252
40
  msgid "Cleanup Options"
41
  msgstr "Optiuni Curatare"
42
 
44
  msgid "XCloner Debugger Dashboard"
45
  msgstr "Consola Debug XCloner"
46
 
47
+ #: admin/partials/xcloner_generate_backups_page.php:14
48
  msgid "Backup Options"
49
  msgstr "Optiuni Backup"
50
 
51
+ #: admin/partials/xcloner_generate_backups_page.php:16
52
  msgid "Database Options"
53
  msgstr "Optiuni Baza Date"
54
 
55
+ #: admin/partials/xcloner_generate_backups_page.php:18
56
  msgid "Files Options"
57
  msgstr "Optiuni Fisiere"
58
 
59
+ #: admin/partials/xcloner_generate_backups_page.php:19
60
+ #: includes/class-xcloner.php:452
61
  msgid "Generate Backup"
62
  msgstr "Creare Backup"
63
 
64
+ #: admin/partials/xcloner_generate_backups_page.php:20
65
  msgid "Schedule Backup"
66
  msgstr "Programare Backup"
67
 
68
+ #: admin/partials/xcloner_generate_backups_page.php:31
69
  #: admin/partials/xcloner_init_page.php:88
70
  #: admin/partials/xcloner_manage_backups_page.php:50
71
+ #: admin/partials/xcloner_scheduled_backups_page.php:161
72
  msgid "Backup Name"
73
  msgstr "Nume Backup"
74
 
75
+ #: admin/partials/xcloner_generate_backups_page.php:34
76
  msgid "The default backup name, supported tags [time], [hostname], [domain]"
77
  msgstr ""
78
  "Numele implicit al fisierului de backup, tag-uri suportate [time], "
79
  "[hostname], [domain] "
80
 
81
+ #: admin/partials/xcloner_generate_backups_page.php:42
82
  msgid "Send Email Notification To"
83
  msgstr "Trimite Notificare E-Mail Catre"
84
 
85
+ #: admin/partials/xcloner_generate_backups_page.php:45
86
  msgid "If left blank, no notification will be sent"
87
  msgstr "Daca lasat gol, nici o notificare nu va fi trimisa"
88
 
89
+ #: admin/partials/xcloner_generate_backups_page.php:53
90
+ #: admin/partials/xcloner_scheduled_backups_page.php:152
91
+ msgid "Backup Only Files Modified/Created After"
92
+ msgstr "Backup doar la fisierele Modificate/Create dupa"
93
+
94
+ #: admin/partials/xcloner_generate_backups_page.php:56
95
+ msgid ""
96
+ "This option allows you to create a differential backup that will include "
97
+ "only <br> changed files since the set date, leave blank to include all files"
98
+ msgstr ""
99
+ "Aceasta optiune va permite sa creati un backup diferential care va include "
100
+ "doar <br /> fisierele schimbate de la data setata, lasati gol pentru a "
101
+ "include toate fisierele selectate"
102
+
103
+ #: admin/partials/xcloner_generate_backups_page.php:64
104
  msgid "Backup Comments"
105
  msgstr "Comentarii backup"
106
 
107
+ #: admin/partials/xcloner_generate_backups_page.php:67
108
  msgid ""
109
  "Some default backup comments that will be stored inside the backup archive"
110
  msgstr "Comentarii implicite care for fi storcate inauntrul arhivei"
111
 
112
+ #: admin/partials/xcloner_generate_backups_page.php:80
113
  msgid "Select database data to include in the backup"
114
  msgstr "Selectati baza de date pentru adaugare in backup"
115
 
116
+ #: admin/partials/xcloner_generate_backups_page.php:81
117
  msgid ""
118
  "Enable the 'Backup only WP tables' setting if you don't want to show all "
119
  "other databases and tables not related to this Wordpress install"
121
  "Activati “Backup doar tabele WP” daca nu vreti sa afisati si celelalte baze "
122
  "de date si tabele care nu sunt relationate de aceasta instalare"
123
 
124
+ #: admin/partials/xcloner_generate_backups_page.php:101
125
  msgid ""
126
  "Select from below the files/folders you want to exclude from your Backup "
127
  "Archive"
128
  msgstr ""
129
  "Selectati de mai jos fisierele pe care vreti sa le excludeti din Backup"
130
 
131
+ #: admin/partials/xcloner_generate_backups_page.php:102
132
  msgid ""
133
  "You can navigate below through all your site structure(Backup Start "
134
  "Location) to exclude any file/folder you need by clicking the checkbox near "
140
  "fiecareia. <br /> Daca casuta nu poate fi deselectata, atunci fisierul este "
141
  "exclus de o regula Regex si nu poate fi inclus in Backup."
142
 
143
+ #: admin/partials/xcloner_generate_backups_page.php:130
144
  msgid "Scanning The File System..."
145
  msgstr "Scanez Sistemul De Fisiere…"
146
 
147
+ #: admin/partials/xcloner_generate_backups_page.php:132
148
  #, php-format
149
  msgid "Found %s files (%s)"
150
  msgstr "Am gasit %s fisiere (%s)"
151
 
152
+ #: admin/partials/xcloner_generate_backups_page.php:147
153
  msgid "Generating the Mysql Backup..."
154
  msgstr "Creare Backup Mysql…"
155
 
156
+ #: admin/partials/xcloner_generate_backups_page.php:149
157
  #, php-format
158
  msgid "Found %s tables in %s databases (%s)"
159
  msgstr "Am gasit %s tabele in %s baze de date (%s)"
160
 
161
+ #: admin/partials/xcloner_generate_backups_page.php:173
162
  msgid "Adding Files to Archive..."
163
  msgstr "Adaug Fisierele in Arhiva…"
164
 
165
+ #: admin/partials/xcloner_generate_backups_page.php:175
166
  #, php-format
167
  msgid "Adding %s files (%s)"
168
  msgstr "Adaug %s fisiere (%s)"
169
 
170
+ #: admin/partials/xcloner_generate_backups_page.php:188
171
  msgid "Backup Parts"
172
  msgstr "Parti Backup"
173
 
174
+ #: admin/partials/xcloner_generate_backups_page.php:198
175
  msgid "Backup Done"
176
  msgstr "Backup Terminat"
177
 
178
+ #: admin/partials/xcloner_generate_backups_page.php:202
179
  #: admin/partials/xcloner_manage_backups_page.php:128
180
  msgid "Send Backup To Remote Storage"
181
  msgstr "Trimite Backup In Stocare La Distanta "
182
 
183
+ #: admin/partials/xcloner_generate_backups_page.php:204
184
  #: admin/partials/xcloner_manage_backups_page.php:125
185
  msgid "Download Backup"
186
  msgstr "Descarcare Backup"
187
 
188
+ #: admin/partials/xcloner_generate_backups_page.php:205
189
  #: admin/partials/xcloner_manage_backups_page.php:112
190
  #: admin/partials/xcloner_manage_backups_page.php:130
191
  msgid "List Backup Content"
192
  msgstr "Afiseaza Continutul Backup"
193
 
194
+ #: admin/partials/xcloner_generate_backups_page.php:215
195
+ #: admin/partials/xcloner_restore_page.php:344
196
  msgid "Thank you for using XCloner."
197
  msgstr "Multumim pentru ca utilizati XCloner."
198
 
199
+ #: admin/partials/xcloner_generate_backups_page.php:216
200
+ #: admin/partials/xcloner_restore_page.php:345
201
  #, php-format
202
  msgid "We would love to hear about your experience in the %s."
203
  msgstr "Ne-ar placea sa auzim despre experienta dumnevoastra in %s."
204
 
205
+ #: admin/partials/xcloner_generate_backups_page.php:232
206
  msgid "Schedule Saved"
207
  msgstr "Program Salvat"
208
 
209
+ #: admin/partials/xcloner_generate_backups_page.php:233
210
  msgid "(Dismiss this notice."
211
  msgstr "(Anuleaza aceasta notificare."
212
 
213
+ #: admin/partials/xcloner_generate_backups_page.php:240
 
 
 
 
 
214
  #: admin/partials/xcloner_init_page.php:132
215
  #: admin/partials/xcloner_scheduled_backups_page.php:23
216
  #: admin/partials/xcloner_scheduled_backups_page.php:35
218
  msgid "Schedule Name"
219
  msgstr "Numele Programarii"
220
 
221
+ #: admin/partials/xcloner_generate_backups_page.php:247
222
  msgid "Schedule Backup To Start On:"
223
  msgstr "Programeaza Backup-ul Sa Inceapa Pe:"
224
 
225
+ #: admin/partials/xcloner_generate_backups_page.php:251
226
  msgid "At:"
227
  msgstr "La:"
228
 
229
+ #: admin/partials/xcloner_generate_backups_page.php:259
230
+ #: admin/partials/xcloner_scheduled_backups_page.php:97
231
+ msgid "Full Backup"
232
+ msgstr "Backup Complet"
233
 
234
+ #: admin/partials/xcloner_generate_backups_page.php:260
235
+ #: admin/partials/xcloner_scheduled_backups_page.php:98
236
+ msgid "Differential Backups"
237
+ msgstr "Backup Diferential"
238
 
239
+ #: admin/partials/xcloner_generate_backups_page.php:261
240
+ #: admin/partials/xcloner_scheduled_backups_page.php:99
241
+ msgid "Full Backup + Differential Backups"
242
+ msgstr "Backup Complet+Diferential"
243
 
244
+ #: admin/partials/xcloner_generate_backups_page.php:263
245
+ #: admin/partials/xcloner_scheduled_backups_page.php:101
246
+ msgid "Scheduled Backup Type"
247
+ msgstr "Tipul Backup-ului"
248
+
249
+ #: admin/partials/xcloner_generate_backups_page.php:267
250
+ msgid ""
251
+ "Full Backup = it will generate a full backup of all included files each time "
252
+ "schedule runs"
253
+ msgstr ""
254
+ "Backup Complet = va genera un backup complete incluzand toate fisierele de "
255
+ "fiecare data cand ruleaza "
256
 
257
+ #: admin/partials/xcloner_generate_backups_page.php:268
258
+ msgid ""
259
+ "Differentials Backups = backups will include only changed files since the "
260
+ "schedule started to run"
261
+ msgstr ""
262
+ "Backup Diferential = backup-ul va include doar fisierele schimbate fata de "
263
+ "data prestabilita"
264
 
265
+ #: admin/partials/xcloner_generate_backups_page.php:269
266
+ msgid ""
267
+ "Full Backup + Differential Backups = the first time schedule runs, it will "
268
+ "create a full backup and all next scheduled backups will include only files "
269
+ "created/modified since that last full backup; a full backup is recreated "
270
+ "when the number of changed files is bigger than the 'Differetial Backups Max "
271
+ "Days' XCloner option."
272
+ msgstr ""
273
 
274
+ #: admin/partials/xcloner_generate_backups_page.php:277
275
+ msgid "please select"
276
+ msgstr "faceti o selectie"
277
 
278
+ #: admin/partials/xcloner_generate_backups_page.php:289
279
+ msgid "Schedule Frequency"
280
+ msgstr "Frecventa Programarii"
281
+
282
+ #: admin/partials/xcloner_generate_backups_page.php:297
283
+ #: admin/partials/xcloner_scheduled_backups_page.php:132
284
  msgid "none"
285
  msgstr "nici una"
286
 
287
+ #: admin/partials/xcloner_generate_backups_page.php:302
288
  msgid "Send To Remote Storage"
289
  msgstr "Trimite In Spatiul De Storcare La Distanta"
290
 
291
+ #: admin/partials/xcloner_generate_backups_page.php:308
292
  msgid "Submit"
293
  msgstr "Trimite"
294
 
295
+ #: admin/partials/xcloner_generate_backups_page.php:322
296
  msgid "Message"
297
  msgstr "Mesaj"
298
 
299
+ #: admin/partials/xcloner_generate_backups_page.php:323
300
  msgid "Response Code"
301
  msgstr "Cod Raspuns"
302
 
303
+ #: admin/partials/xcloner_generate_backups_page.php:327
304
  msgid "Close"
305
  msgstr "Inchide"
306
 
307
+ #: admin/partials/xcloner_generate_backups_page.php:335
308
  #: admin/partials/xcloner_manage_backups_page.php:153
309
  msgid "Listing Backup Content "
310
  msgstr "Continutul Fisierului De Backup"
311
 
312
+ #: admin/partials/xcloner_generate_backups_page.php:350
313
  #: admin/partials/xcloner_manage_backups_page.php:183
314
  msgid "Remote Storage Transfer"
315
  msgstr "Transfer In Stocare Externa"
316
 
317
+ #: admin/partials/xcloner_generate_backups_page.php:359
318
  #: admin/partials/xcloner_manage_backups_page.php:192
319
  msgid "please select..."
320
  msgstr "faceti o selectie…"
321
 
322
+ #: admin/partials/xcloner_generate_backups_page.php:371
323
  #: admin/partials/xcloner_manage_backups_page.php:204
324
  msgid "Uploading backup to the selected remote storage..."
325
  msgstr "Incarc backup-ul in spatiul de stocare selectat"
390
  msgid "XCloner Debugger"
391
  msgstr "Depanator XCloner"
392
 
393
+ #: admin/partials/xcloner_init_page.php:184
394
  msgid "System Check"
395
  msgstr "Verificare Sistem"
396
 
397
+ #: admin/partials/xcloner_init_page.php:187
398
  #: includes/class-xcloner-settings.php:287
399
  msgid "Backup Start Location"
400
  msgstr "Calea Inceput Backup"
401
 
402
+ #: admin/partials/xcloner_init_page.php:190
403
  #: includes/class-xcloner-settings.php:301
404
  msgid "Backup Storage Location"
405
  msgstr "Calea Stocare Backup"
406
 
407
+ #: admin/partials/xcloner_init_page.php:193
408
  msgid "Temporary Location"
409
  msgstr "Locatia Temporara"
410
 
411
+ #: admin/partials/xcloner_init_page.php:197
412
  msgid "PHP Version Check"
413
  msgstr "Verificare Versiune PHP"
414
 
415
+ #: admin/partials/xcloner_init_page.php:201
416
  msgid "PHP Safe Mode"
417
  msgstr ""
418
 
419
+ #: admin/partials/xcloner_init_page.php:205
420
  msgid "BACKUP READY"
421
  msgstr "PREGATIT DE BACKUP"
422
 
423
+ #: admin/partials/xcloner_init_page.php:205
424
  msgid "Backup not ready, please check above requirements"
425
  msgstr "Sistem Backup Invalid, va rog verificati cerintele date"
426
 
427
+ #: admin/partials/xcloner_init_page.php:211
428
  msgid "PHP max_execution_time"
429
  msgstr ""
430
 
431
+ #: admin/partials/xcloner_init_page.php:214
432
  msgid "PHP memory_limit"
433
  msgstr ""
434
 
435
+ #: admin/partials/xcloner_init_page.php:217
436
  msgid "PHP open_basedir"
437
  msgstr ""
438
 
439
+ #: admin/partials/xcloner_init_page.php:225
440
  msgid "Reading Time 1MB Block"
441
  msgstr "Timp citire bloc de 1MB "
442
 
443
+ #: admin/partials/xcloner_init_page.php:225
444
+ #: admin/partials/xcloner_init_page.php:228
445
  msgid "unknown"
446
  msgstr "necunoscut"
447
 
448
+ #: admin/partials/xcloner_init_page.php:228
449
  msgid "Writing Time 1MB Block"
450
  msgstr "Timp scriere bloc de 1M"
451
 
452
+ #: admin/partials/xcloner_init_page.php:231
453
  msgid "Free Disk Space"
454
  msgstr "Spatiul Disc Liber"
455
 
456
+ #: admin/partials/xcloner_init_page.php:236
457
  msgid "Toggle Additional System Info"
458
  msgstr "Arata Informatii Sistem Aditionale"
459
 
573
 
574
  #: admin/partials/xcloner_remote_storage_page.php:116
575
  #: admin/partials/xcloner_remote_storage_page.php:214
576
+ #: admin/partials/xcloner_remote_storage_page.php:314
577
+ #: admin/partials/xcloner_remote_storage_page.php:395
578
+ #: admin/partials/xcloner_remote_storage_page.php:476
579
+ #: admin/partials/xcloner_remote_storage_page.php:557
580
+ #: admin/partials/xcloner_remote_storage_page.php:646
581
+ #: admin/partials/xcloner_remote_storage_page.php:747
582
  msgid "how many days to keep the backups for"
583
  msgstr "pentru cate zile sa pastrez fisierele de backup"
584
 
585
  #: admin/partials/xcloner_remote_storage_page.php:122
586
  #: admin/partials/xcloner_remote_storage_page.php:220
587
+ #: admin/partials/xcloner_remote_storage_page.php:320
588
+ #: admin/partials/xcloner_remote_storage_page.php:401
589
+ #: admin/partials/xcloner_remote_storage_page.php:482
590
+ #: admin/partials/xcloner_remote_storage_page.php:563
591
+ #: admin/partials/xcloner_remote_storage_page.php:652
592
+ #: admin/partials/xcloner_remote_storage_page.php:753
593
  msgid "Save Settings"
594
  msgstr "Salveaza Setari"
595
 
596
  #: admin/partials/xcloner_remote_storage_page.php:127
597
  #: admin/partials/xcloner_remote_storage_page.php:225
598
+ #: admin/partials/xcloner_remote_storage_page.php:325
599
+ #: admin/partials/xcloner_remote_storage_page.php:406
600
+ #: admin/partials/xcloner_remote_storage_page.php:487
601
+ #: admin/partials/xcloner_remote_storage_page.php:568
602
+ #: admin/partials/xcloner_remote_storage_page.php:657
603
+ #: admin/partials/xcloner_remote_storage_page.php:758
604
  msgid "Verify"
605
  msgstr "Verifica"
606
 
624
 
625
  #: admin/partials/xcloner_remote_storage_page.php:175
626
  #: admin/partials/xcloner_remote_storage_page.php:178
627
+ msgid "SFTP or Private Key Password"
628
  msgstr ""
629
 
630
  #: admin/partials/xcloner_remote_storage_page.php:184
631
+ msgid "SFTP Private Key(RSA)"
632
+ msgstr ""
633
+
634
  #: admin/partials/xcloner_remote_storage_page.php:187
635
+ msgid "Local Server Path or Contents of the SFTP Private Key RSA File"
636
  msgstr ""
637
 
638
  #: admin/partials/xcloner_remote_storage_page.php:193
669
  msgstr ""
670
 
671
  #: admin/partials/xcloner_remote_storage_page.php:282
 
672
  msgid "AWS Region"
673
  msgstr ""
674
 
675
+ #: admin/partials/xcloner_remote_storage_page.php:285
676
+ msgid "example: us-east-1"
677
+ msgstr ""
678
+
679
+ #: admin/partials/xcloner_remote_storage_page.php:286
680
+ msgid "Please Select AWS Region"
681
+ msgstr ""
682
+
683
+ #: admin/partials/xcloner_remote_storage_page.php:302
684
+ #: admin/partials/xcloner_remote_storage_page.php:305
685
  msgid "AWS Bucket Name"
686
  msgstr ""
687
 
688
+ #: admin/partials/xcloner_remote_storage_page.php:311
689
  msgid "AWS Cleanup (days)"
690
  msgstr "Curatare AWS(zile)"
691
 
692
+ #: admin/partials/xcloner_remote_storage_page.php:337
693
  msgid "Dropbox Storage"
694
  msgstr "Stocare Dropbox"
695
 
696
+ #: admin/partials/xcloner_remote_storage_page.php:357
697
  #, php-format
698
  msgid "Visit %s and get your \"App secret\"."
699
+ msgstr "Vizitati %s pentru a obtine “App secret“."
700
 
701
+ #: admin/partials/xcloner_remote_storage_page.php:364
702
+ #: admin/partials/xcloner_remote_storage_page.php:367
703
  msgid "Dropbox Access Token"
704
  msgstr ""
705
 
706
+ #: admin/partials/xcloner_remote_storage_page.php:374
707
+ #: admin/partials/xcloner_remote_storage_page.php:377
708
  msgid "Dropbox App Secret"
709
  msgstr ""
710
 
711
+ #: admin/partials/xcloner_remote_storage_page.php:383
712
+ #: admin/partials/xcloner_remote_storage_page.php:386
713
  msgid "Dropbox Prefix"
714
  msgstr ""
715
 
716
+ #: admin/partials/xcloner_remote_storage_page.php:392
717
  msgid "Dropbox Cleanup (days)"
718
  msgstr "Curatare Dropbox(zile)"
719
 
720
+ #: admin/partials/xcloner_remote_storage_page.php:418
721
  msgid "Azure Blog Storage"
722
  msgstr ""
723
 
724
+ #: admin/partials/xcloner_remote_storage_page.php:438
725
  #, php-format
726
  msgid "Visit %s and get your \"Api Key\"."
727
  msgstr "Vizitati %s pentru a obtine cheia \"Api Key\""
728
 
729
+ #: admin/partials/xcloner_remote_storage_page.php:445
730
+ #: admin/partials/xcloner_remote_storage_page.php:448
731
  msgid "Azure Account Name"
732
  msgstr ""
733
 
734
+ #: admin/partials/xcloner_remote_storage_page.php:455
735
+ #: admin/partials/xcloner_remote_storage_page.php:458
736
  msgid "Azure Api Key"
737
  msgstr ""
738
 
739
+ #: admin/partials/xcloner_remote_storage_page.php:464
740
+ #: admin/partials/xcloner_remote_storage_page.php:467
741
  msgid "Azure Container"
742
  msgstr ""
743
 
744
+ #: admin/partials/xcloner_remote_storage_page.php:473
745
  msgid "Azure Cleanup (days)"
746
  msgstr "Curatare Azure(zile)"
747
 
748
+ #: admin/partials/xcloner_remote_storage_page.php:499
749
  msgid "BackBlaze Storage"
750
+ msgstr "Stocare BackBlaze"
751
 
752
+ #: admin/partials/xcloner_remote_storage_page.php:519
753
  #, php-format
754
  msgid "Visit %s and get your Account Id and Application Key."
755
+ msgstr "Vizitati %s pentru a obtine Account Id si Applciation Key."
756
 
757
+ #: admin/partials/xcloner_remote_storage_page.php:526
758
+ #: admin/partials/xcloner_remote_storage_page.php:529
759
  msgid "BackBlaze Account Id"
760
  msgstr ""
761
 
762
+ #: admin/partials/xcloner_remote_storage_page.php:536
763
+ #: admin/partials/xcloner_remote_storage_page.php:539
764
  msgid "BackBlaze Application Key"
765
  msgstr ""
766
 
767
+ #: admin/partials/xcloner_remote_storage_page.php:545
768
+ #: admin/partials/xcloner_remote_storage_page.php:548
769
  msgid "BackBlaze Bucket Name"
770
  msgstr ""
771
 
772
+ #: admin/partials/xcloner_remote_storage_page.php:554
773
  msgid "BackBlaze Cleanup (days)"
774
  msgstr ""
775
 
776
+ #: admin/partials/xcloner_remote_storage_page.php:580
777
  msgid "WebDAV Storage"
778
+ msgstr "Stocare WebDAV"
779
 
780
+ #: admin/partials/xcloner_remote_storage_page.php:607
781
+ #: admin/partials/xcloner_remote_storage_page.php:610
782
  msgid "WebDAV Base Url"
783
  msgstr ""
784
 
785
+ #: admin/partials/xcloner_remote_storage_page.php:616
786
+ #: admin/partials/xcloner_remote_storage_page.php:619
787
  msgid "WebDAV Username"
788
  msgstr ""
789
 
790
+ #: admin/partials/xcloner_remote_storage_page.php:625
791
+ #: admin/partials/xcloner_remote_storage_page.php:628
792
  msgid "WebDAV Password"
793
  msgstr ""
794
 
795
+ #: admin/partials/xcloner_remote_storage_page.php:634
796
+ #: admin/partials/xcloner_remote_storage_page.php:637
797
  msgid "WebDAV Target Folder"
798
  msgstr ""
799
 
800
+ #: admin/partials/xcloner_remote_storage_page.php:643
801
  msgid "WebDAV Cleanup (days)"
802
  msgstr ""
803
 
804
+ #: admin/partials/xcloner_remote_storage_page.php:669
805
  msgid "Google Drive Storage"
806
+ msgstr "Stocare Google Drive"
807
 
808
+ #: admin/partials/xcloner_remote_storage_page.php:693
809
  #, php-format
810
  msgid ""
811
  "Visit %s to create a new application and get your Client ID and Client "
814
  "Vizitati %s pentru a crea o noua aplicatie si a obtine Client ID si Client "
815
  "Secret."
816
 
817
+ #: admin/partials/xcloner_remote_storage_page.php:695
818
  #, php-format
819
  msgid ""
820
  "Click here to view a short video explaining how to create the Client ID and "
824
  "parametrii Client ID si Client Secret si despre cum puteti conecta XCloner "
825
  "la Google Drive API %s"
826
 
827
+ #: admin/partials/xcloner_remote_storage_page.php:702
828
  msgid "Client ID"
829
  msgstr ""
830
 
831
+ #: admin/partials/xcloner_remote_storage_page.php:705
832
  msgid "Google Client ID"
833
  msgstr ""
834
 
835
+ #: admin/partials/xcloner_remote_storage_page.php:711
836
  msgid "Client Secret"
837
  msgstr ""
838
 
839
+ #: admin/partials/xcloner_remote_storage_page.php:714
840
  msgid "Google Client Secret"
841
  msgstr ""
842
 
843
+ #: admin/partials/xcloner_remote_storage_page.php:724
844
  msgid "Authorize Google Drive"
845
  msgstr "Autorizati Google Drive"
846
 
847
+ #: admin/partials/xcloner_remote_storage_page.php:725
848
  msgid "Paste Authorization Code Here"
849
  msgstr "Copiati Codul de Autorizare Aici"
850
 
851
+ #: admin/partials/xcloner_remote_storage_page.php:731
852
  msgid "Folder ID or Root Path"
853
  msgstr ""
854
 
855
+ #: admin/partials/xcloner_remote_storage_page.php:733
856
  msgid ""
857
  "Folder ID can be found by right clicking on the folder name and selecting "
858
  "'Get shareable link' menu, format https://drive.google.com/open?"
861
  "root and start with / , example /backups.xcloner.com/"
862
  msgstr ""
863
 
864
+ #: admin/partials/xcloner_remote_storage_page.php:738
865
  msgid "Target Folder ID or Root Path"
866
  msgstr ""
867
 
868
+ #: admin/partials/xcloner_remote_storage_page.php:744
869
  msgid "Google Drive Cleanup (days)"
870
  msgstr ""
871
 
872
+ #: admin/partials/xcloner_remote_storage_page.php:771
873
+ msgid ""
874
+ "This storage option requires the XCloner-Google-Drive Wordpress Plugin to be "
875
+ "installed and activated."
876
+ msgstr ""
877
+ "Aceasta optiune de stocare necesita instalarea si activarea plugin-ului "
878
+ "gratuit XCloner-Google-Drive."
879
+
880
+ #: admin/partials/xcloner_remote_storage_page.php:772
881
+ msgid "PHP 5.5 minimum version is required."
882
+ msgstr "Versiunea minima PHP 5.5 este necesara."
883
+
884
+ #: admin/partials/xcloner_remote_storage_page.php:775
885
+ msgid "Install Now"
886
+ msgstr "Instaleaza acum"
887
+
888
+ #: admin/partials/xcloner_remote_storage_page.php:782
889
+ msgid "More Details"
890
+ msgstr "Mai Multe Detalii"
891
 
892
  #: admin/partials/xcloner_restore_page.php:24
893
  msgid "Restore Script Upload"
894
  msgstr "Incarcare Script Restaurare"
895
 
896
  #: admin/partials/xcloner_restore_page.php:28
897
+ msgid ""
898
+ "If you want to do a local target system restore, leave Url field below empty "
899
+ "and click 'Check Connection'"
900
+ msgstr ""
901
+ "Daca doriti sa faceti o restaurare local, lasati campul adresei de Url gol "
902
+ "si apasati butonul “Verifica Conexiunea”"
903
 
904
+ #: admin/partials/xcloner_restore_page.php:30
905
+ msgid ""
906
+ "If you want to do a remote target system restore, please download the "
907
+ "restore script from"
908
+ msgstr ""
909
+ "Daca doriti sa faceti o restaurare catre o alta destinatie, descarcati "
910
+ "script-ul de download de"
911
+
912
+ #: admin/partials/xcloner_restore_page.php:30
913
  msgid "here"
914
  msgstr "aici"
915
 
916
+ #: admin/partials/xcloner_restore_page.php:33
917
  msgid "Extract the files on your new host"
918
  msgstr "Scrieti fisierele in noua locatie"
919
 
920
+ #: admin/partials/xcloner_restore_page.php:36
921
  msgid ""
922
  "Provide url below to the <u>xcloner_restore.php</u> restore script, like "
923
  "http://my_restore_site.com/xcloner_restore.php"
925
  "Introduceti adresa web catre script-ul de restaurare <u>xcloner_restore.php</"
926
  "u> , examplu format http://my_restore_site.com/xcloner_restore.php"
927
 
928
+ #: admin/partials/xcloner_restore_page.php:39
929
  msgid ""
930
  "If your server is not web accessible, like a localhost computer, you can use "
931
  "a DynDNS service or install a blank copy of Wordpress with XCloner in the "
936
  "Wordpress cu plugin-ul XCloner in aceeasi locatie si sa incepeti procestul "
937
  "de restaurare de acolo."
938
 
939
+ #: admin/partials/xcloner_restore_page.php:43
940
  msgid ""
941
  "We have detected your connection to the site as being secure, so your "
942
  "restore script address must start with https://."
944
  "Am detectat conexiunea catre site ca fiind securizata, adresa script-ului de "
945
  "restaurare trebuie sa inceapa cu https://."
946
 
947
+ #: admin/partials/xcloner_restore_page.php:55
948
+ msgid "Check Connection"
949
+ msgstr "Verifica Conexiunea"
950
 
951
+ #: admin/partials/xcloner_restore_page.php:63
952
+ msgid "Upload Local Backup Archive To Target Host"
953
+ msgstr "Incarca backup local in noua destinatie"
954
 
955
+ #: admin/partials/xcloner_restore_page.php:66
956
  msgid ""
957
  "You can skip this step if you want to transfer the archive in some other "
958
  "way, make sure you upload it in the same directory as the restore script "
962
  "noua locatie, asigurati-va ca o copiati in acceeasi locatie cu script-ul de "
963
  "restaurare din pasul precedent."
964
 
965
+ #: admin/partials/xcloner_restore_page.php:69
966
+ msgid "Please select a local backup archive to upload to target host"
967
+ msgstr ""
968
+ "Va rugam selectati un fisier de backup local pentru al incarca in noua "
969
+ "destinatie"
970
 
971
+ #: admin/partials/xcloner_restore_page.php:87
972
  msgid "Upload"
973
  msgstr "Incarca"
974
 
975
+ #: admin/partials/xcloner_restore_page.php:90
976
+ #: admin/partials/xcloner_restore_page.php:170
977
+ #: admin/partials/xcloner_restore_page.php:271
978
  msgid "Cancel"
979
  msgstr "Anulare"
980
 
981
+ #: admin/partials/xcloner_restore_page.php:94
982
+ #: admin/partials/xcloner_restore_page.php:174
983
+ #: admin/partials/xcloner_restore_page.php:276
984
  msgid "Skip Next"
985
  msgstr "Pasul Urmator"
986
 
987
+ #: admin/partials/xcloner_restore_page.php:94
988
+ #: admin/partials/xcloner_restore_page.php:174
989
+ #: admin/partials/xcloner_restore_page.php:276
990
  msgid "Next"
991
  msgstr "Urmator"
992
 
993
+ #: admin/partials/xcloner_restore_page.php:102
994
+ msgid "Restore Files Backup Available On Target Location"
995
+ msgstr "Restaurati fisierele din backup disponibil in locatia de destinatie"
996
 
997
+ #: admin/partials/xcloner_restore_page.php:107
998
  msgid "Verbose Output"
999
  msgstr "Afisare Detaliata"
1000
 
1001
+ #: admin/partials/xcloner_restore_page.php:120
1002
+ msgid ""
1003
+ "This is the directory where you would like to restore the backup archive "
1004
+ "files.<br /> \n"
1005
+ "\t\t\t\t\t\t\t\t\t\tPlease use this with caution when restoring to a live "
1006
+ "site."
1007
+ msgstr ""
1008
+ "Acesta este directorul unde doriti sa restaurati fisierele din backup.<br /"
1009
+ "> \n"
1010
+ "\t\t\t\t\t\t\t\t\t\tFolositi aceasta optiune cu atentie intr-un site live."
1011
 
1012
+ #: admin/partials/xcloner_restore_page.php:123
1013
+ msgid "Restore Target Path:"
1014
+ msgstr "Locatia Directorului de Restaurare:"
1015
 
1016
+ #: admin/partials/xcloner_restore_page.php:132
1017
+ msgid "Restore Backup Archive:"
1018
+ msgstr "Restaurati Archiva Backup:"
1019
+
1020
+ #: admin/partials/xcloner_restore_page.php:134
1021
+ msgid "Please select the target backup file to restore"
1022
+ msgstr "Selectati archiva backup pentru restaurare"
1023
+
1024
+ #: admin/partials/xcloner_restore_page.php:141
1025
+ msgid "All Files"
1026
+ msgstr "Toate Fisierele"
1027
+
1028
+ #: admin/partials/xcloner_restore_page.php:144
1029
+ msgid "Only Plugins"
1030
+ msgstr "Doar Plugins"
1031
+
1032
+ #: admin/partials/xcloner_restore_page.php:147
1033
+ msgid "Only Uploads"
1034
+ msgstr "Doar Uploads"
1035
+
1036
+ #: admin/partials/xcloner_restore_page.php:150
1037
+ msgid "Only Themes"
1038
+ msgstr "Doar Themes"
1039
+
1040
+ #: admin/partials/xcloner_restore_page.php:153
1041
+ msgid "Only Database Backup"
1042
+ msgstr "Doar Baza de Date"
1043
+
1044
+ #: admin/partials/xcloner_restore_page.php:167
1045
+ #: admin/partials/xcloner_restore_page.php:268
1046
  msgid "Restore"
1047
  msgstr "Restaurare"
1048
 
1049
+ #: admin/partials/xcloner_restore_page.php:182
1050
+ msgid "Restore Target Database - Search and Replace"
1051
+ msgstr "Restaurare Baza de Date - Cauta si Inlocuieste"
1052
 
1053
+ #: admin/partials/xcloner_restore_page.php:189
1054
  msgid ""
1055
+ "Please provide below the mysql connection details for the target host "
1056
+ "database.<br />For live sites we recommend using a new separate database."
1057
+ msgstr ""
1058
 
1059
+ #: admin/partials/xcloner_restore_page.php:190
1060
+ msgid "Target Mysql Details"
1061
  msgstr ""
1062
 
1063
+ #: admin/partials/xcloner_restore_page.php:195
1064
+ msgid "Target Mysql Hostname"
1065
  msgstr ""
1066
 
1067
+ #: admin/partials/xcloner_restore_page.php:200
1068
+ msgid "Target Mysql Database"
1069
  msgstr ""
1070
 
1071
+ #: admin/partials/xcloner_restore_page.php:205
1072
+ msgid "Target Mysql Username"
1073
  msgstr ""
1074
 
1075
+ #: admin/partials/xcloner_restore_page.php:211
1076
+ msgid "Target Mysql Password"
1077
  msgstr ""
1078
 
1079
+ #: admin/partials/xcloner_restore_page.php:216
1080
  msgid ""
1081
  "I will attempt to replace all mysql backup records matching the provided "
1082
  "Source Url with the provided Target Url. <br />Leave blank the Target Url if "
1084
  "all matching serialized data and fix it's parsing."
1085
  msgstr ""
1086
 
1087
+ #: admin/partials/xcloner_restore_page.php:217
1088
+ msgid "Target Mysql Search and Replace"
1089
+ msgstr ""
1090
 
1091
+ #: admin/partials/xcloner_restore_page.php:222
1092
  msgid "Source Home Url"
1093
  msgstr "Url Locatie Sursa"
1094
 
1095
+ #: admin/partials/xcloner_restore_page.php:227
1096
  msgid "With Target Home Url"
1097
  msgstr "Cu Url Destinatie"
1098
 
1099
+ #: admin/partials/xcloner_restore_page.php:233
1100
  msgid "Source Site Url"
1101
  msgstr "Url Sursa"
1102
 
1103
+ #: admin/partials/xcloner_restore_page.php:238
1104
  msgid "With Target Site Url"
1105
  msgstr "Cu Url Destinatie"
1106
 
1107
+ #: admin/partials/xcloner_restore_page.php:249
1108
+ msgid "Please select the target database backup file to restore"
1109
+ msgstr "Selectati fisierul de backup al bazei de date pentru restaurare"
1110
 
1111
+ #: admin/partials/xcloner_restore_page.php:261
1112
+ msgid ""
1113
+ "Use the field below to fix your mysql query and Retry again the Restore, or "
1114
+ "replace with # to Skip next"
1115
  msgstr ""
1116
+ "Folositi campul de mai jos pentru repararea erorilor mysql si apasati Retry "
1117
+ "again pentru Restaurare, sau inlocuiti textul cu # pentru continuare"
1118
 
1119
+ #: admin/partials/xcloner_restore_page.php:286
1120
  msgid "Finishing up..."
1121
  msgstr "Terminare..."
1122
 
1123
+ #: admin/partials/xcloner_restore_page.php:292
1124
+ msgid "Update wp-config.php mysql details and update the Target Site Url"
1125
  msgstr ""
1126
+ "Actualizeaza detaliile mysql in wp-config.php si actualizeaza adresa Url a "
1127
+ "noului site"
1128
 
1129
+ #: admin/partials/xcloner_restore_page.php:309
1130
  msgid "Delete Restored Backup Temporary Folder"
1131
  msgstr "Stergeti Directorul Temporar Restaurat"
1132
 
1133
+ #: admin/partials/xcloner_restore_page.php:325
1134
  msgid "Delete Restore Script"
1135
  msgstr "Stergeti script-ul de restaurare"
1136
 
1137
+ #: admin/partials/xcloner_restore_page.php:353
1138
  msgid "Finish"
1139
  msgstr "Terminare"
1140
 
1141
+ #: admin/partials/xcloner_restore_page.php:359
1142
+ msgid "Open Target Site"
1143
+ msgstr "Deschida Site-ul Destinatie"
1144
+
1145
  #: admin/partials/xcloner_scheduled_backups_page.php:10
1146
  #, php-format
1147
  msgid ""
1184
  msgid "Status"
1185
  msgstr "Status"
1186
 
1187
+ #: admin/partials/xcloner_scheduled_backups_page.php:51
1188
+ msgid "Current Server Time"
1189
+ msgstr "Timpul Curent Pe Server"
1190
+
1191
  #: admin/partials/xcloner_scheduled_backups_page.php:65
1192
  msgid "Edit Schedule"
1193
  msgstr "Editare Programare"
1208
  msgid "Advanced"
1209
  msgstr "Avansat"
1210
 
1211
+ #: admin/partials/xcloner_scheduled_backups_page.php:108
1212
  msgid "Schedule Start At"
1213
  msgstr "Programul Incepe La"
1214
 
1215
+ #: admin/partials/xcloner_scheduled_backups_page.php:113
1216
  msgid "Schedule Recurrence"
1217
  msgstr "Recurenta Program"
1218
 
1219
+ #: admin/partials/xcloner_scheduled_backups_page.php:137
1220
  msgid "Send To Remote Storage "
1221
  msgstr "Trimite In Spatiul De Storcare La Distanta"
1222
 
1223
+ #: admin/partials/xcloner_scheduled_backups_page.php:145
1224
  msgid "Email Notification Address"
1225
  msgstr "Adresa E-Mail Pentru Notificari"
1226
 
1227
+ #: admin/partials/xcloner_scheduled_backups_page.php:168
1228
  msgid "Included Database Data"
1229
  msgstr "Include Baza De Data"
1230
 
1231
+ #: admin/partials/xcloner_scheduled_backups_page.php:175
1232
  msgid "Excluded Files"
1233
  msgstr "Exclude Fisiere"
1234
 
1235
+ #: admin/partials/xcloner_scheduled_backups_page.php:184
1236
  msgid "Save"
1237
  msgstr "Salveaza"
1238
 
1249
  msgid "XCloner Activation Error"
1250
  msgstr "Eroare Activare XCloner"
1251
 
1252
+ #: includes/class-xcloner-api.php:644
1253
  msgid "executed"
1254
  msgstr "executat"
1255
 
1256
+ #: includes/class-xcloner-archive.php:171
1257
  #, php-format
1258
  msgid "New backup generated %s"
1259
  msgstr "Backup nou creat %s"
1260
 
1261
+ #: includes/class-xcloner-archive.php:174
1262
  #, php-format
1263
  msgid "Generated Backup Size: %s"
1264
  msgstr "Marime backup creat: %s"
1265
 
1266
+ #: includes/class-xcloner-archive.php:179
1267
+ #, php-format
1268
+ msgid "Total files added: %s"
1269
+ msgstr "Total fisiere adaugate: %s"
1270
+
1271
+ #: includes/class-xcloner-archive.php:188
1272
  #, php-format
1273
  msgid "Backup Parts: %s"
1274
  msgstr "Parti Backup: %s"
1275
 
1276
+ #: includes/class-xcloner-archive.php:201
1277
  msgid "Backup Comments: "
1278
  msgstr "Comentarii Backup:"
1279
 
1280
+ #: includes/class-xcloner-archive.php:206
1281
  msgid "Latest 50 Log Lines: "
1282
  msgstr "Ultimele 50 de linii log:"
1283
 
1284
+ #: includes/class-xcloner-archive.php:261
1285
  #, php-format
1286
  msgid "Initializing the backup archive %s"
1287
  msgstr "Initializare archiva de backup %s"
1288
 
1289
+ #: includes/class-xcloner-archive.php:268
1290
  #, php-format
1291
  msgid "Opening for append the backup archive %s"
1292
  msgstr "Deschid pentru adaugare arhiva %s"
1293
 
1294
+ #: includes/class-xcloner-database.php:99
1295
  msgid "Starting database backup process"
1296
  msgstr "Incep procesul de backup baza de date"
1297
 
1298
+ #: includes/class-xcloner-database.php:186
1299
  msgid "Setting mysql headers"
1300
  msgstr "Setez header mysql"
1301
 
1302
+ #: includes/class-xcloner-database.php:201
1303
  #, php-format
1304
  msgid "Getting number of tables in %s"
1305
  msgstr "Obtin numarul de tabele din %s"
1306
 
1307
+ #: includes/class-xcloner-database.php:284
1308
  #, php-format
1309
  msgid "Excluding table %s.%s from backup"
1310
  msgstr "Exclud tabela %s.%s din backup"
1311
 
1312
+ #: includes/class-xcloner-database.php:298
1313
  msgid "Preparing the database recursion file"
1314
  msgstr "Prepar fisierul de recursie al bazei de date"
1315
 
1316
+ #: includes/class-xcloner-database.php:381
1317
  #, php-format
1318
  msgid "Starting new backup dump to file %s"
1319
  msgstr "Incep un nou backup al bazei de date in fisierul %s"
1320
 
1321
+ #: includes/class-xcloner-database.php:523
1322
  #, php-format
1323
  msgid "Dumping %s records starting position %s from %s.%s table"
1324
  msgstr "Incarc %s randuri incepand de la pozitia %s din %s.%s tabela"
1325
 
1326
+ #: includes/class-xcloner-database.php:531
1327
  #, php-format
1328
  msgid "Dumping the structure for %s.%s table"
1329
  msgstr "Salvez structura pentru tabela %s.%s"
1330
 
1331
+ #: includes/class-xcloner-database.php:624
1332
  #, php-format
1333
  msgid "Writing %s database dump headers"
1334
  msgstr "Scrie %s capul bazei de date"
1335
 
1336
+ #: includes/class-xcloner-file-system.php:364
1337
  #, php-format
1338
  msgid "Starting the filesystem scanner on root folder %s"
1339
  msgstr "Incep scanarea sistemului de fisiere din %s"
1340
 
1341
+ #: includes/class-xcloner-file-system.php:516
1342
  #, php-format
1343
  msgid "Excluding %s from the filesystem list, file not readable"
1344
  msgstr "Exclud %s din sistemul de fisiere, fisierul nu este accesibil"
1345
 
1346
+ #: includes/class-xcloner-file-system.php:519
1347
  #, php-format
1348
  msgid "Adding %s to the filesystem list"
1349
  msgstr "Adaug %s in lista de fisiere"
1350
 
1351
+ #: includes/class-xcloner-file-system.php:529
1352
  #, php-format
1353
  msgid "Excluding %s from the filesystem list, matching pattern %s"
1354
  msgstr "Exclud %s din lista de fisiere, pattern gasit %s"
1369
  msgid "XCloner Backup Settings"
1370
  msgstr "XCloner Setari Backup"
1371
 
1372
+ #: includes/class-xcloner-loader.php:68 includes/class-xcloner.php:451
1373
  msgid "Settings"
1374
  msgstr "Setari"
1375
 
1393
  msgid "Restore Backups"
1394
  msgstr "Restaurare Backup"
1395
 
1396
+ #: includes/class-xcloner-remote-storage.php:185
1397
  #, php-format
1398
  msgid "%s storage settings saved."
1399
  msgstr "%s setarile de stocare au fost salvate."
1400
 
1401
+ #: includes/class-xcloner-remote-storage.php:194
1402
  #, php-format
1403
  msgid "%s connection is valid."
1404
  msgstr "%s conexiunea este valida."
1405
 
1406
+ #: includes/class-xcloner-remote-storage.php:217
1407
+ #: includes/class-xcloner-remote-storage.php:230
1408
  msgid "Could not read data"
1409
  msgstr "Nu pot citi data"
1410
 
1411
+ #: includes/class-xcloner-remote-storage.php:225
1412
  msgid "Could not write data"
1413
  msgstr "Nu pot scrie data"
1414
 
1415
+ #: includes/class-xcloner-remote-storage.php:235
1416
  msgid "Could not delete data"
1417
  msgstr "Nu pot sterge data"
1418
 
1419
+ #: includes/class-xcloner-remote-storage.php:612
1420
  #, php-format
1421
  msgid "Could not find folder ID by name %s"
1422
+ msgstr "Nu am putut gasi folder ID dupa numele %s"
1423
+
1424
+ #: includes/class-xcloner-scheduler.php:318
1425
+ #, php-format
1426
+ msgid "%s - new backup generated %s"
1427
+ msgstr "%s - backup nou creat %s"
1428
 
1429
  #: includes/class-xcloner-settings.php:230
1430
  #: includes/class-xcloner-settings.php:237
1568
  "AJAX request, or set to 0 to fetch all. Range 0-100000 records"
1569
  msgstr ""
1570
 
1571
+ #: includes/class-xcloner-settings.php:477
1572
  msgid "Exclude files larger than (MB)"
1573
  msgstr "Exclude fisierele mai mari decat(MB)"
1574
 
1575
+ #: includes/class-xcloner-settings.php:482
1576
  msgid ""
1577
  "Use this option to automatically exclude files larger than a certain size in "
1578
  "MB, or set to 0 to include all. Range 0-1000 MB"
1579
  msgstr ""
1580
 
1581
+ #: includes/class-xcloner-settings.php:489
1582
  msgid "Split Backup Archive Limit (MB)"
1583
  msgstr "Limita Impartire Arhiva(MB)"
1584
 
1585
+ #: includes/class-xcloner-settings.php:494
1586
  msgid ""
1587
  "Use this option to automatically split the backup archive into smaller "
1588
  "parts. Range 0-10000 MB"
1589
  msgstr ""
1590
 
1591
+ #: includes/class-xcloner-settings.php:501
1592
  msgid "Force Temporary Path Within XCloner Storage"
1593
  msgstr ""
1594
 
1595
+ #: includes/class-xcloner-settings.php:506
1596
  msgid ""
1597
  "Enable this option if you want the XCloner Temporary Path to be within your "
1598
  "XCloner Storage Location"
1599
  msgstr ""
1600
 
1601
+ #: includes/class-xcloner-settings.php:514
1602
  msgid "Cleanup by Date(days)"
1603
  msgstr "Limita Zile"
1604
 
1605
+ #: includes/class-xcloner-settings.php:519
1606
  msgid ""
1607
  "Specify the maximum number of days a backup archive can be kept on the "
1608
  "server. 0 disables this option"
1609
  msgstr ""
1610
 
1611
+ #: includes/class-xcloner-settings.php:526
1612
  msgid "Cleanup by Quantity"
1613
  msgstr "Limita Fisiere"
1614
 
1615
+ #: includes/class-xcloner-settings.php:531
1616
  msgid ""
1617
  "Specify the maximum number of backup archives to keep on the server. 0 "
1618
  "disables this option"
1619
  msgstr ""
1620
 
1621
+ #: includes/class-xcloner-settings.php:538
1622
  msgid "Cleanup by Capacity(MB)"
1623
  msgstr "Capacitate Stocare Maxima(MB)"
1624
 
1625
+ #: includes/class-xcloner-settings.php:543
1626
  msgid ""
1627
  "Remove oldest backups if all created backups exceed the configured limit in "
1628
  "Megabytes. 0 disables this option"
1629
  msgstr ""
1630
 
1631
+ #: includes/class-xcloner-settings.php:551
1632
+ #: includes/class-xcloner-settings.php:556
1633
  msgid "Cron frequency"
1634
  msgstr "Frecventa Cron"
1635
 
1647
  "before starting the backup process."
1648
  msgstr ""
1649
 
1650
+ #: includes/class-xcloner.php:478
1651
  msgid "Once Weekly"
1652
  msgstr "O data pe saptamana"
1653
 
1654
+ #: includes/class-xcloner.php:484
1655
+ msgid "Once Monthly"
1656
  msgstr "O data pe luna"
1657
 
1658
+ #: includes/class-xcloner.php:490
1659
+ msgid "Twice Daily"
1660
+ msgstr "De doua ori pe zi"
1661
+
1662
  #: xcloner.php:68
1663
  #, php-format
1664
  msgid ""
1665
  "XCloner requires minimum PHP version %s in order to run correctly. We have "
1666
  "detected your version as %s. Plugin is now deactivated."
1667
  msgstr ""
1668
+ "XCloner necesita versiunea minima PHP %s pentru a rula corect. Am detectat "
1669
+ "versiunea local ca fiind %s. Plugin-ul este acum deactivat."
1670
+
1671
+ #~ msgid "Don't Repeat"
1672
+ #~ msgstr "O Singura Data"
1673
+
1674
+ #~ msgid "Hourly"
1675
+ #~ msgstr "In Fiecare ora"
1676
+
1677
+ #~ msgid "Daily"
1678
+ #~ msgstr "Zilnic"
1679
+
1680
+ #~ msgid "Weekly"
1681
+ #~ msgstr "Saptamanal"
1682
+
1683
+ #~ msgid "Monthly"
1684
+ #~ msgstr "Lunar"
1685
+
1686
+ #~ msgid "Please Select Frequency to run"
1687
+ #~ msgstr "Selectati Frecventa De Rulare"
1688
+
1689
+ #~ msgid "Free Download XCloner-Google-Drive Wordpress Plugin"
1690
+ #~ msgstr "Descarcati gratuit plugin-ul XWordpress Cloner-Google-Drive"
1691
+
1692
+ #~ msgid "Please download the restore script from"
1693
+ #~ msgstr "Descarcati script-ul de restore de "
1694
+
1695
+ #~ msgid "Check"
1696
+ #~ msgstr "Verifica"
1697
+
1698
+ #~ msgid "Upload Local Backup Archive To Remote Host"
1699
+ #~ msgstr "Incarcati Arhiva Locala De Backup In Noua Locatie"
1700
+
1701
+ #~ msgid "Please select a local backup archive to upload to remote host"
1702
+ #~ msgstr "Selectati un fisier backup local pentru incarcare in noua locatie"
1703
+
1704
+ #~ msgid "Restore Files Backup Available On Remote Host"
1705
+ #~ msgstr "Restaurati fisierul de backup disponibil in noua locatie"
1706
+
1707
+ #~ msgid "Remote Restore Target Path"
1708
+ #~ msgstr "Calea Server Locatie Noua"
1709
+
1710
+ #~ msgid "Please select the remote backup file to restore"
1711
+ #~ msgstr "Selectati pentru restaurare fisierul de backup al locatiei externe"
1712
+
1713
+ #~ msgid "Restore Remote Database - Search and Replace"
1714
+ #~ msgstr "Destinatie Baza de Date - Cauta si Inlocuieste"
1715
+
1716
+ #~ msgid ""
1717
+ #~ "Please provide below the mysql connection details for the remote host "
1718
+ #~ "database."
1719
+ #~ msgstr "Introduceti datele de conectare la baza de date a noii locatii."
1720
+
1721
+ #~ msgid "Remote Mysql Search and Replace"
1722
+ #~ msgstr "Destinatia Mysql Cauta Si Inlocuieste"
1723
+
1724
+ #~ msgid "Please select the remote database backup file to restore"
1725
+ #~ msgstr "Selectati pentru restaurare fisierul de backup al bazei de date"
1726
+
1727
+ #~ msgid ""
1728
+ #~ "Use the field below to fix your mysql query and Retry again the Restore"
1729
+ #~ msgstr ""
1730
+ #~ "Folositi campul de mai jos pentru a repara comanda mysql si Incercati "
1731
+ #~ "din nou Restaurarea"
1732
+
1733
+ #~ msgid "Update wp-config.php mysql details and update the restored site Url"
1734
+ #~ msgstr ""
1735
+ #~ "Actualizati parametrii mysql din fisierul wp-config.php si noul url al "
1736
+ #~ "site-ului restaurat"
1737
+
1738
+ #~ msgid "Once a month"
1739
+ #~ msgstr "O data pe luna"
1740
 
1741
  #~ msgid "Cron Options"
1742
  #~ msgstr "Optiuni Cron"
restore/.htaccess ADDED
@@ -0,0 +1,2 @@
 
 
1
+ Order deny,allow
2
+ Deny from all
restore/xcloner_restore.php ADDED
@@ -0,0 +1,1034 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if(!defined('AUTH_KEY'))
4
+ {
5
+ define('AUTH_KEY', '');
6
+ }
7
+
8
+ if(!defined("DS"))
9
+ {
10
+ define("DS", DIRECTORY_SEPARATOR);
11
+ }
12
+
13
+ if(!defined('XCLONER_PLUGIN_ACCESS') || XCLONER_PLUGIN_ACCESS != 1)
14
+ {
15
+ if(!AUTH_KEY)
16
+ {
17
+ Xcloner_Restore::send_response("404", "Could not run restore script, AUTH_KEY not set!");
18
+ exit;
19
+ }
20
+
21
+ if(!isset($_REQUEST['hash']))
22
+ {
23
+ Xcloner_Restore::send_response("404", "Could not run restore script, sent HASH is empty!");
24
+ exit;
25
+ }
26
+
27
+ if($_REQUEST['hash'] != AUTH_KEY)
28
+ {
29
+ Xcloner_Restore::send_response("404", "Could not run restore script, AUTH_KEY doesn't match the sent HASH!");
30
+ exit;
31
+ }
32
+ }
33
+
34
+ //check minimum PHP version
35
+ if(version_compare(phpversion(), Xcloner_Restore::xcloner_minimum_version, '<'))
36
+ {
37
+ Xcloner_Restore::send_response(500, sprintf(("XCloner requires minimum PHP version %s in order to run correctly. We have detected your version as %s"),Xcloner_Restore::xcloner_minimum_version, phpversion()) );
38
+ exit;
39
+
40
+ }
41
+
42
+ $file = dirname( __DIR__ ) . DS.'vendor'.DS.'autoload.php';
43
+
44
+ if(file_exists($file))
45
+ {
46
+
47
+ require_once($file);
48
+ }
49
+ elseif(file_exists("vendor.phar") and extension_loaded('phar'))
50
+ {
51
+ require_once(__DIR__.DS."vendor.phar");
52
+ }else{
53
+
54
+ $file = dirname( __FILE__ ) . DS.'vendor'.DS.'autoload.php';
55
+
56
+ if(!file_exists($file))
57
+ {
58
+ Xcloner_Restore::send_response("404", "File $file does not exists, please extract the vendor.tgz archive on the server or enable PHP Phar module!");
59
+ exit;
60
+ }
61
+
62
+ require_once($file);
63
+ }
64
+
65
+
66
+ use League\Flysystem\Config;
67
+ use League\Flysystem\Filesystem;
68
+ use League\Flysystem\Util;
69
+ use League\Flysystem\Adapter\Local;
70
+
71
+ use splitbrain\PHPArchive\Tar;
72
+ use splitbrain\PHPArchive\Archive;
73
+ use splitbrain\PHPArchive\FileInfo;
74
+
75
+ use Monolog\Logger;
76
+ use Monolog\Handler\StreamHandler;
77
+
78
+
79
+ //do not modify below
80
+ $that = "";
81
+ if(defined('XCLONER_PLUGIN_ACCESS') && XCLONER_PLUGIN_ACCESS)
82
+ {
83
+ $that = $this;
84
+ }
85
+ $xcloner_restore = new Xcloner_Restore($that);
86
+
87
+ try{
88
+ $return = $xcloner_restore->init();
89
+ $xcloner_restore->send_response(200, $return);
90
+ }catch(Exception $e){
91
+ $xcloner_restore->send_response(417, $e->getMessage());
92
+ }
93
+
94
+ class Xcloner_Restore
95
+ {
96
+
97
+ const xcloner_minimum_version = "5.4.0";
98
+
99
+ private $backup_archive_extensions = array("zip", "tar", "tgz", "tar.gz", "gz", "csv");
100
+ private $process_files_limit = 150;
101
+ private $process_files_limit_list = 350;
102
+ private $process_mysql_records_limit = 250;
103
+ private $adapter;
104
+ private $filesystem;
105
+ private $logger;
106
+ private $backup_storage_dir;
107
+ private $parent_api;
108
+
109
+
110
+ public function __construct($parent_api = "")
111
+ {
112
+ register_shutdown_function(array($this, 'exception_handler'));
113
+
114
+ if(defined('XCLONER_PLUGIN_ACCESS') && XCLONER_PLUGIN_ACCESS)
115
+ {
116
+ $dir = $parent_api->get_xcloner_container()->get_xcloner_settings()->get_xcloner_store_path();
117
+ }
118
+
119
+ if(!isset($dir) || !$dir){
120
+ $dir = dirname(__FILE__);
121
+ }
122
+
123
+ $this->parent_api = $parent_api;
124
+
125
+ $this->backup_storage_dir = $dir;
126
+
127
+ $this->adapter = new Local($dir ,LOCK_EX, 'SKIP_LINKS');
128
+ $this->filesystem = new Filesystem($this->adapter, new Config([
129
+ 'disable_asserts' => true,
130
+ ]));
131
+
132
+ $this->logger = new Logger('xcloner_restore');
133
+
134
+ $logger_path = $this->get_logger_filename();
135
+
136
+ if(!is_writeable($logger_path) and !touch($logger_path))
137
+ {
138
+ $logger_path = "php://stderr";
139
+ }
140
+
141
+ $this->logger->pushHandler(new StreamHandler($logger_path, Logger::DEBUG));
142
+
143
+ if(isset($_POST['API_ID'])){
144
+ $this->logger->info("Processing ajax request ID ".substr(filter_input(INPUT_POST, 'API_ID', FILTER_SANITIZE_STRING), 0 , 15));
145
+ }
146
+
147
+ }
148
+
149
+ public function exception_handler() {
150
+
151
+ $error = error_get_last();
152
+
153
+ if($error['type'] and $this->logger)
154
+ {
155
+ $this->logger->info($this->friendly_error_type ($error['type']).": ".var_export($error, true));
156
+ }
157
+
158
+ }
159
+
160
+ private function friendly_error_type($type) {
161
+ static $levels=null;
162
+ if ($levels===null) {
163
+ $levels=[];
164
+ foreach (get_defined_constants() as $key=>$value) {
165
+ if (strpos($key,'E_')!==0) {continue;}
166
+ $levels[$value]= $key; //substr($key,2);
167
+ }
168
+ }
169
+ return (isset($levels[$type]) ? $levels[$type] : "Error #{$type}");
170
+ }
171
+
172
+ public function get_logger_filename()
173
+ {
174
+ $filename = $this->backup_storage_dir .DS. "xcloner_restore.log";
175
+
176
+ return $filename;
177
+ }
178
+
179
+ public function init()
180
+ {
181
+ if(isset($_POST['xcloner_action']) and $_POST['xcloner_action'])
182
+ {
183
+ $method = filter_input(INPUT_POST, 'xcloner_action', FILTER_SANITIZE_STRING);
184
+
185
+ //$method = "list_backup_archives";
186
+
187
+ $method .= "_action";
188
+
189
+ if(method_exists($this, $method))
190
+ {
191
+ $this->logger->debug(sprintf('Starting action %s', $method));
192
+ return call_user_func(array($this, $method));
193
+
194
+ }else{
195
+ throw new Exception($method ." does not exists");
196
+ }
197
+ }
198
+
199
+ return $this->check_system();
200
+ }
201
+
202
+ public function write_file_action()
203
+ {
204
+ if(isset($_POST['file']))
205
+ {
206
+ $target_file = filter_input(INPUT_POST, 'file', FILTER_SANITIZE_STRING);
207
+
208
+ if(!$_POST['start'])
209
+ $fp = fopen($target_file, "wb+");
210
+ else
211
+ $fp = fopen($target_file, "ab+");
212
+
213
+ if(!$fp)
214
+ throw new Exception("Unable to open $target_file file for writing");
215
+
216
+ fseek($fp, $_POST['start']);
217
+
218
+ if(isset($_FILES['blob']))
219
+ {
220
+ $this->logger->debug(sprintf('Writing %s bytes to file %s starting position %s using FILES blob', filesize($_FILES['blob']['tmp_name']), $target_file, $_POST['start']));
221
+
222
+ $blob = file_get_contents($_FILES['blob']['tmp_name']);
223
+
224
+ if(!$bytes_written = fwrite($fp, $blob))
225
+ throw new Exception("Unable to write data to file $target_file");
226
+
227
+ @unlink($_FILES['blob']['tmp_name']);
228
+ }elseif(isset($_POST['blob'])){
229
+ $this->logger->debug(sprintf('Writing %s bytes to file %s starting position %s using POST blob', strlen($_POST['blob']), $target_file, $_POST['start']));
230
+
231
+ $blob = $_POST['blob'];
232
+
233
+ if(!$bytes_written = fwrite($fp, $blob))
234
+ throw new Exception("Unable to write data to file $target_file");
235
+ }else{
236
+ throw new Exception("Upload failed, did not receive any binary data");
237
+ }
238
+
239
+ fclose($fp);
240
+ }
241
+
242
+ return $bytes_written;
243
+
244
+ }
245
+
246
+ public function mysql_connect($remote_mysql_host, $remote_mysql_user, $remote_mysql_pass, $remote_mysql_db )
247
+ {
248
+ $this->logger->info(sprintf('Connecting to mysql database %s with %s@%s', $remote_mysql_db, $remote_mysql_user, $remote_mysql_host));
249
+
250
+ $mysqli = new mysqli($remote_mysql_host, $remote_mysql_user, $remote_mysql_pass, $remote_mysql_db);
251
+
252
+ if ($mysqli->connect_error) {
253
+ throw new Exception('Connect Error (' . $mysqli->connect_errno . ') '
254
+ . $mysqli->connect_error);
255
+ }
256
+
257
+ $mysqli->query("SET sql_mode='';");
258
+ $mysqli->query("SET foreign_key_checks = 0;");
259
+ if(isset($_REQUEST['charset_of_file']) and $_REQUEST['charset_of_file'])
260
+ $mysqli->query("SET NAMES ".$_REQUEST['charset_of_file']."");
261
+ else
262
+ $mysqli->query("SET NAMES utf8;");
263
+
264
+ return $mysqli;
265
+ }
266
+
267
+ public function restore_mysql_backup_action()
268
+ {
269
+ $mysqldump_file = filter_input(INPUT_POST, 'mysqldump_file', FILTER_SANITIZE_STRING);
270
+ $remote_path = filter_input(INPUT_POST, 'remote_path', FILTER_SANITIZE_STRING);
271
+ $remote_mysql_user = filter_input(INPUT_POST, 'remote_mysql_user', FILTER_SANITIZE_STRING);
272
+ $remote_mysql_pass = filter_input(INPUT_POST, 'remote_mysql_pass', FILTER_SANITIZE_STRING);
273
+ $remote_mysql_db = filter_input(INPUT_POST, 'remote_mysql_db', FILTER_SANITIZE_STRING);
274
+ $remote_mysql_host = filter_input(INPUT_POST, 'remote_mysql_host', FILTER_SANITIZE_STRING);
275
+ $execute_query = trim(stripslashes($_POST['query']));
276
+ $error_line = filter_input(INPUT_POST, 'error_line', FILTER_SANITIZE_NUMBER_INT);
277
+ $start = filter_input(INPUT_POST, 'start', FILTER_SANITIZE_NUMBER_INT);
278
+
279
+ $wp_home_url = filter_input(INPUT_POST, 'wp_home_url', FILTER_SANITIZE_STRING);
280
+ $remote_restore_url = filter_input(INPUT_POST, 'remote_restore_url', FILTER_SANITIZE_STRING);
281
+
282
+ $wp_site_url = filter_input(INPUT_POST, 'wp_site_url', FILTER_SANITIZE_STRING);
283
+ $restore_site_url = filter_input(INPUT_POST, 'restore_site_url', FILTER_SANITIZE_STRING);
284
+
285
+ $mysql_backup_file = $remote_path.DS.$mysqldump_file;
286
+
287
+ if(!file_exists($mysql_backup_file))
288
+ throw new Exception(sprintf("Mysql backup file %s does not exists",$mysql_backup_file));
289
+
290
+
291
+ /*if(defined('XCLONER_PLUGIN_ACCESS') && XCLONER_PLUGIN_ACCESS)
292
+ {
293
+ global $wpdb;
294
+ //$mysqli = $this->parent_api->get_xcloner_container()->get_xcloner_database();
295
+ $remote_mysql_host = $wpdb->dbhost;
296
+ $remote_mysql_user = $wpdb->dbuser;
297
+ $remote_mysql_pass = $wpdb->dbpassword;
298
+ $remote_mysql_db = $wpdb->dbname;
299
+ }*/
300
+
301
+ {
302
+ $mysqli = $this->mysql_connect($remote_mysql_host, $remote_mysql_user, $remote_mysql_pass, $remote_mysql_db );
303
+ }
304
+
305
+ $line_count = 0;
306
+ $query = "";
307
+ $return['finished'] = 1;
308
+ $return['backup_file'] = $mysqldump_file;
309
+ $return['backup_size'] = filesize($mysql_backup_file);
310
+
311
+ $fp = fopen($mysql_backup_file, "r");
312
+ if($fp)
313
+ {
314
+ $this->logger->info(sprintf("Opening mysql dump file %s at position %s.", $mysql_backup_file, $start));
315
+ fseek($fp, $start);
316
+ while ($line_count <= $this->process_mysql_records_limit and ($line = fgets($fp)) !== false) {
317
+ // process the line read.
318
+
319
+ //check if line is comment
320
+ if(substr($line, 0, 1) == "#")
321
+ continue;
322
+
323
+ //check if line is empty
324
+ if($line == "\n" or trim($line) == "")
325
+ continue;
326
+
327
+ if(substr($line, strlen($line)-2, strlen($line)) == ";\n")
328
+ $query .= $line;
329
+ else{
330
+ $query .= $line;
331
+ continue;
332
+ }
333
+
334
+ if($execute_query)
335
+ {
336
+ $query = (($execute_query));
337
+ $execute_query = "";
338
+ }
339
+
340
+ //Doing serialized url replace here
341
+
342
+ if($wp_site_url and $wp_home_url and strlen($wp_home_url) < strlen($wp_site_url))
343
+ {
344
+ list($wp_home_url,$wp_site_url) = array($wp_site_url,$wp_home_url);
345
+ list($remote_restore_url,$restore_site_url) = array($restore_site_url,$remote_restore_url);
346
+
347
+ }
348
+
349
+ if($wp_home_url and $remote_restore_url and strpos($query, $wp_home_url) !== false)
350
+ {
351
+ $query = $this->url_replace($wp_home_url, $remote_restore_url, $query);
352
+ }
353
+
354
+ if($wp_site_url and $restore_site_url and strpos($query, $wp_site_url) !== false)
355
+ {
356
+ $query = $this->url_replace($wp_site_url, $restore_site_url, $query);
357
+ }
358
+
359
+ if(!$mysqli->query($query) && !stristr($mysqli->error,"Duplicate entry"))
360
+ {
361
+ //$return['error_line'] = $line_count;
362
+ $return['start'] = ftell($fp)-strlen($line);
363
+ $return['query_error'] = true;
364
+ $return['query'] = $query;
365
+ $return['message'] = sprintf("Mysql Error: %s\n", $mysqli->error);
366
+
367
+ $this->logger->error($return['message']);
368
+
369
+ $this->send_response(418, $return);
370
+ //throw new Exception(sprintf("Mysql Error: %s\n Mysql Query: %s", $mysqli->error, $query));
371
+ }
372
+ //else echo $line;
373
+
374
+ $query = "";
375
+
376
+ $line_count++;
377
+
378
+ }
379
+ }
380
+
381
+ $return['start'] = ftell($fp);
382
+
383
+ $this->logger->info(sprintf("Executed %s queries of size %s bytes", $line_count, ($return['start']-$start)));
384
+
385
+ if(!feof($fp))
386
+ {
387
+ $return['finished'] = 0;
388
+ }else{
389
+ $this->logger->info(sprintf("Mysql Import Done."));
390
+ }
391
+
392
+ fclose($fp);
393
+
394
+ $this->send_response(200, $return);
395
+ }
396
+
397
+ private function url_replace($search, $replace, $query)
398
+ {
399
+ $this->logger->info(sprintf("Doing url replace on query with length %s", strlen($query)), array("QUERY_REPLACE"));
400
+ $query = str_replace($search, $replace, $query);
401
+ $original_query = $query;
402
+
403
+ if($this->has_serialized($query))
404
+ {
405
+ $this->logger->info(sprintf("Query contains serialized data, doing serialized size fix"), array("QUERY_REPLACE"));
406
+ $query = $this->do_serialized_fix($query);
407
+
408
+ if(!$query)
409
+ {
410
+ $this->logger->info(sprintf("Serialization probably failed here..."), array("QUERY_REPLACE"));
411
+ $query = $original_query;
412
+ }
413
+ }
414
+ $this->logger->info(sprintf("New query length is %s", strlen($query)), array("QUERY_REPLACE"));
415
+
416
+ return $query;
417
+ }
418
+
419
+ public function list_backup_files_action()
420
+ {
421
+ $backup_parts = array();
422
+
423
+ $source_backup_file = filter_input(INPUT_POST, 'file', FILTER_SANITIZE_STRING);
424
+ $start = (int)filter_input(INPUT_POST, 'start', FILTER_SANITIZE_STRING);
425
+ $return['part'] = (int)filter_input(INPUT_POST, 'part', FILTER_SANITIZE_STRING);
426
+
427
+ $backup_file = $source_backup_file;
428
+
429
+ if($this->is_multipart($backup_file))
430
+ {
431
+ $backup_parts = $this->get_multipart_files($backup_file);
432
+ $backup_file = $backup_parts[$return['part']];
433
+ }
434
+
435
+ try{
436
+ $tar = new Tar();
437
+ $tar->open($this->backup_storage_dir.DS.$backup_file, $start);
438
+
439
+ $data = $tar->contents($this->process_files_limit_list);
440
+ }catch(Exception $e)
441
+ {
442
+ $return['error'] = true;
443
+ $return['message'] = $e->getMessage();
444
+ $this->send_response(200, $return);
445
+ }
446
+
447
+ $return['files'] = array();
448
+ $return['finished'] = 1;
449
+ $return['total_size'] = filesize($this->backup_storage_dir.DS.$backup_file);
450
+ $i = 0;
451
+
452
+ if(isset($data['extracted_files']) and is_array($data['extracted_files']))
453
+ {
454
+ foreach($data['extracted_files'] as $file)
455
+ {
456
+ $return['files'][$i]['path'] = $file->getPath();
457
+ $return['files'][$i]['size'] = $file->getSize();
458
+ $return['files'][$i]['mtime'] = date("d M,Y H:i", $file->getMtime());
459
+
460
+ $i++;
461
+ }
462
+ }
463
+
464
+ if(isset($data['start']))
465
+ {
466
+ $return['start'] = $data['start'];
467
+ $return['finished'] = 0;
468
+ }else{
469
+ if($this->is_multipart($source_backup_file))
470
+ {
471
+ $return['start'] = 0;
472
+
473
+ ++$return['part'];
474
+
475
+ if($return['part'] < sizeof($backup_parts))
476
+ $return['finished'] = 0;
477
+
478
+ }
479
+ }
480
+
481
+ $this->send_response(200, $return);
482
+ }
483
+
484
+ public function restore_finish_action()
485
+ {
486
+ $remote_path = filter_input(INPUT_POST, 'remote_path', FILTER_SANITIZE_STRING);
487
+
488
+ $wp_home_url = filter_input(INPUT_POST, 'wp_home_url', FILTER_SANITIZE_STRING);
489
+ $remote_restore_url = filter_input(INPUT_POST, 'remote_restore_url', FILTER_SANITIZE_STRING);
490
+
491
+ $remote_mysql_user = filter_input(INPUT_POST, 'remote_mysql_user', FILTER_SANITIZE_STRING);
492
+ $remote_mysql_pass = filter_input(INPUT_POST, 'remote_mysql_pass', FILTER_SANITIZE_STRING);
493
+ $remote_mysql_db = filter_input(INPUT_POST, 'remote_mysql_db', FILTER_SANITIZE_STRING);
494
+ $remote_mysql_host = filter_input(INPUT_POST, 'remote_mysql_host', FILTER_SANITIZE_STRING);
495
+
496
+ $update_remote_site_url = filter_input(INPUT_POST, 'update_remote_site_url', FILTER_SANITIZE_NUMBER_INT);
497
+ $delete_restore_script = filter_input(INPUT_POST, 'delete_restore_script', FILTER_SANITIZE_NUMBER_INT);
498
+ $delete_backup_temporary_folder = filter_input(INPUT_POST, 'delete_backup_temporary_folder', FILTER_SANITIZE_NUMBER_INT);
499
+
500
+ if($update_remote_site_url)
501
+ {
502
+ $mysqli = $this->mysql_connect($remote_mysql_host, $remote_mysql_user, $remote_mysql_pass, $remote_mysql_db );
503
+ $this->update_wp_config($remote_path, $remote_mysql_host, $remote_mysql_user, $remote_mysql_pass, $remote_mysql_db);
504
+ $this->update_wp_url($remote_path, $remote_restore_url, $mysqli);
505
+ }
506
+
507
+ if($delete_backup_temporary_folder)
508
+ {
509
+ $this->delete_backup_temporary_folder($remote_path);
510
+ }
511
+
512
+ if(!defined('XCLONER_PLUGIN_ACCESS') || XCLONER_PLUGIN_ACCESS != 1)
513
+ {
514
+ if($delete_restore_script)
515
+ {
516
+ $this->delete_self();
517
+ }
518
+ }
519
+
520
+ $return = "Restore Process Finished.";
521
+ $this->send_response(200, $return);
522
+ }
523
+
524
+ private function delete_backup_temporary_folder($remote_path)
525
+ {
526
+ $this->target_adapter = new Local($remote_path ,LOCK_EX, 'SKIP_LINKS');
527
+ $this->target_filesystem = new Filesystem($this->target_adapter, new Config([
528
+ 'disable_asserts' => true,
529
+ ]));
530
+
531
+ $mysqldump_list = array();
532
+ $list = $this->target_filesystem->listContents();
533
+
534
+ foreach($list as $file)
535
+ {
536
+ $matches = array();
537
+
538
+ if($file['type'] == "dir")
539
+ {
540
+ if(preg_match("/xcloner-(\w*)/", $file['basename'], $matches)){
541
+ $this->logger->info(sprintf('Deleting temporary folder %s', $file['path']));
542
+ $this->target_filesystem->deleteDir($file['path']);
543
+ }
544
+ }
545
+ }
546
+
547
+ return true;
548
+
549
+ }
550
+
551
+ private function delete_self()
552
+ {
553
+ if($this->filesystem->has("vendor.phar"))
554
+ {
555
+ $this->logger->info(sprintf('Deleting vendor.phar'));
556
+ $this->filesystem->delete("vendor.phar");
557
+ }
558
+ if($this->filesystem->has("vendor"))
559
+ {
560
+ $this->logger->info(sprintf('Deleting vendor folder'));
561
+ $this->filesystem->deleteDir("vendor");
562
+ }
563
+ if($this->filesystem->has("xcloner_restore.php"))
564
+ {
565
+ $this->logger->info(sprintf('Deleting xcloner_restore.php'));
566
+ $this->filesystem->delete("xcloner_restore.php");
567
+ }
568
+
569
+ if($this->filesystem->has("xcloner_restore.log"))
570
+ {
571
+ $this->logger->info(sprintf('Deleting xcloner_restore.log'));
572
+ $this->filesystem->delete("xcloner_restore.log");
573
+ }
574
+
575
+ if($this->filesystem->has($this->get_logger_filename()))
576
+ {
577
+ $this->logger->info(sprintf('Deleting logger file %s', $this->get_logger_filename()));
578
+ $this->filesystem->delete($this->get_logger_filename());
579
+ }
580
+
581
+ }
582
+
583
+ private function update_wp_url($wp_path, $url, $mysqli)
584
+ {
585
+ $wp_config = $wp_path.DS."wp-config.php";
586
+
587
+ $this->logger->info(sprintf('Updating site url to %s', $url));
588
+
589
+ if(file_exists($wp_config))
590
+ {
591
+ $config = file_get_contents($wp_config);
592
+ preg_match("/.*table_prefix.*=.*'(.*)'/i", $config, $matches);
593
+ if(isset($matches[1]))
594
+ $table_prefix = $matches[1];
595
+ else
596
+ throw new Exception("Could not load wordpress table prefix from wp-config.php file.");
597
+ }
598
+ else
599
+ throw new Exception("Could not update the SITEURL and HOME, wp-config.php file not found");
600
+
601
+ if(!$mysqli->query("update ".$table_prefix."options set option_value='".($url)."' where option_name='home'"))
602
+ throw new Exception(sprintf("Could not update the HOME option, error: %s\n", $mysqli->error));
603
+
604
+ if(!$mysqli->query("update ".$table_prefix."options set option_value='".($url)."' where option_name='siteurl'"))
605
+ throw new Exception(sprintf("Could not update the SITEURL option, error: %s\n", $mysqli->error));
606
+
607
+ return true;
608
+ }
609
+
610
+ private function update_wp_config($remote_path, $remote_mysql_host, $remote_mysql_user, $remote_mysql_pass, $remote_mysql_db)
611
+ {
612
+ $wp_config = $remote_path.DS."wp-config.php";
613
+
614
+ if(!file_exists($wp_config))
615
+ {
616
+ throw new Exception("Could not find the wp-config.php in ".$remote_path);
617
+ }
618
+
619
+ $content = file_get_contents($wp_config);
620
+
621
+ $content = preg_replace("/(?<=DB_NAME', ')(.*?)(?='\);)/", $remote_mysql_db, $content);
622
+ $content = preg_replace("/(?<=DB_USER', ')(.*?)(?='\);)/", $remote_mysql_user, $content);
623
+ $content = preg_replace("/(?<=DB_PASSWORD', ')(.*?)(?='\);)/", $remote_mysql_pass, $content);
624
+ $content = preg_replace("/(?<=DB_HOST', ')(.*?)(?='\);)/", $remote_mysql_host, $content);
625
+
626
+ $file_perms = fileperms($wp_config);
627
+
628
+ chmod($wp_config, 0777);
629
+
630
+ $this->logger->info(sprintf('Updating wp-config.php file with the new mysql details'));
631
+
632
+ if(!file_put_contents($wp_config, $content))
633
+ throw new Exception("Could not write updated config data to ".$wp_config);
634
+
635
+ chmod($wp_config, $file_perms);
636
+
637
+ return $wp_config;
638
+
639
+ }
640
+
641
+ public function list_mysqldump_backups_action()
642
+ {
643
+ $source_backup_file = filter_input(INPUT_POST, 'backup_file', FILTER_SANITIZE_STRING);
644
+ $remote_path = filter_input(INPUT_POST, 'remote_path', FILTER_SANITIZE_STRING);
645
+
646
+ $hash = $this->get_hash_from_backup($source_backup_file);
647
+
648
+ $this->target_adapter = new Local($remote_path ,LOCK_EX, 'SKIP_LINKS');
649
+ $this->target_filesystem = new Filesystem($this->target_adapter, new Config([
650
+ 'disable_asserts' => true,
651
+ ]));
652
+
653
+ $mysqldump_list = array();
654
+ $list = $this->target_filesystem->listContents();
655
+
656
+ foreach($list as $file)
657
+ {
658
+ $matches = array();
659
+
660
+ if($file['type'] == "dir")
661
+ {
662
+ if(preg_match("/xcloner-(\w*)/", $file['basename'], $matches))
663
+ {
664
+ $files = $this->target_filesystem->listContents($file['basename']);
665
+ foreach($files as $file)
666
+ {
667
+ if($file['extension'] == "sql")
668
+ {
669
+ $this->logger->info(sprintf('Found %s mysql backup file', $file['path']));
670
+ $mysqldump_list[$file['path']]['path'] = $file['path'];
671
+ $mysqldump_list[$file['path']]['size'] = $file['size'];
672
+ $mysqldump_list[$file['path']]['timestamp'] = date("d M,Y H:i",$file['timestamp']);
673
+
674
+ if($hash and $hash == $matches[1])
675
+ $mysqldump_list[$file['path']]['selected'] = "selected";
676
+ else
677
+ $mysqldump_list[$file['path']]['selected'] = "";
678
+ }
679
+ }
680
+ }
681
+ }
682
+ }
683
+
684
+ $this->sort_by($mysqldump_list, 'timestamp','desc');
685
+ $return['files'] = $mysqldump_list;
686
+
687
+ $this->send_response(200, $return);
688
+ }
689
+
690
+ private function get_hash_from_backup($backup_file)
691
+ {
692
+ if(!$backup_file)
693
+ return false;
694
+
695
+ $result = preg_match("/-(\w*)./", substr($backup_file, strlen($backup_file)-10, strlen($backup_file)), $matches) ;
696
+
697
+ if($result and isset($matches[1]))
698
+ return ($matches[1]);
699
+
700
+ return false;
701
+ }
702
+
703
+ public function list_backup_archives_action()
704
+ {
705
+ $local_backup_file = filter_input(INPUT_POST, 'local_backup_file', FILTER_SANITIZE_STRING);
706
+ $list = $this->filesystem->listContents();
707
+
708
+ $backup_files = array();
709
+ $parents = array();
710
+
711
+ foreach($list as $file_info)
712
+ {
713
+ $data = array();
714
+
715
+ if(isset($file_info['extension']) and $file_info['extension'] == "csv")
716
+ {
717
+ $lines = explode(PHP_EOL, $this->filesystem->read($file_info['path']));
718
+ foreach($lines as $line)
719
+ if($line)
720
+ {
721
+ $data = str_getcsv($line);
722
+ if(is_array($data)){
723
+ $parents[$data[0]] = $file_info['path'];
724
+ $file_info['childs'][] = $data;
725
+ $file_info['size'] += $data[2];
726
+ }
727
+ }
728
+
729
+ }
730
+
731
+ if($file_info['type'] == 'file' and isset($file_info['extension']) and in_array($file_info['extension'], $this->backup_archive_extensions))
732
+ $backup_files[$file_info['path']] = $file_info;
733
+ }
734
+
735
+ $new_list = array();
736
+
737
+ foreach($backup_files as $key=>$file_info)
738
+ {
739
+ if(isset($parents[$file_info['path']]))
740
+ $backup_files[$key]['parent'] = $parents[$file_info['path']];
741
+ else{
742
+
743
+ if($local_backup_file and ($file_info['basename'] == $local_backup_file))
744
+ $file_info['selected'] = 'selected';
745
+
746
+ $this->logger->info(sprintf('Found %s backup file', $file_info['path']));
747
+
748
+ $new_list[$key] = $file_info;
749
+ }
750
+
751
+ }
752
+
753
+ $this->sort_by($new_list, "timestamp","desc");
754
+
755
+ $return['files'] = $new_list;
756
+
757
+ $this->send_response(200, $return);
758
+
759
+ }
760
+
761
+ public function restore_backup_to_path_action()
762
+ {
763
+ $source_backup_file = filter_input(INPUT_POST, 'backup_file', FILTER_SANITIZE_STRING);
764
+ $remote_path = filter_input(INPUT_POST, 'remote_path', FILTER_SANITIZE_STRING);
765
+ $include_filter_files = filter_input(INPUT_POST, 'filter_files', FILTER_SANITIZE_STRING);
766
+ $exclude_filter_files = "";
767
+ $start = filter_input(INPUT_POST, 'start', FILTER_SANITIZE_NUMBER_INT);
768
+ $return['part'] = (int)filter_input(INPUT_POST, 'part', FILTER_SANITIZE_NUMBER_INT);
769
+ $return['processed'] = (int)filter_input(INPUT_POST, 'processed', FILTER_SANITIZE_NUMBER_INT);
770
+
771
+ $this->target_adapter = new Local($remote_path ,LOCK_EX, 'SKIP_LINKS');
772
+ $this->target_filesystem = new Filesystem($this->target_adapter, new Config([
773
+ 'disable_asserts' => true,
774
+ ]));
775
+
776
+ $backup_file = $source_backup_file;
777
+
778
+ $return['finished'] = 1;
779
+ $return['extracted_files'] = array();
780
+ $return['total_size'] = $this->get_backup_size($backup_file);
781
+
782
+ $backup_archive = new Tar();
783
+ if($this->is_multipart($backup_file))
784
+ {
785
+ if(!$return['part'])
786
+ $return['processed'] += $this->filesystem->getSize($backup_file);
787
+
788
+ $backup_parts = $this->get_multipart_files($backup_file);
789
+ $backup_file = $backup_parts[$return['part']];
790
+ }
791
+
792
+ $this->logger->info(sprintf('Opening backup archive %s at position %s', $backup_file, $start));
793
+ $backup_archive->open($this->backup_storage_dir .DS. $backup_file, $start);
794
+
795
+ $data = $backup_archive->extract($remote_path, '',$exclude_filter_files,$include_filter_files, $this->process_files_limit);
796
+
797
+ if(isset($data['extracted_files']))
798
+ {
799
+ foreach($data['extracted_files'] as $spl_fileinfo)
800
+ {
801
+ $this->logger->info(sprintf('Extracted %s file', $spl_fileinfo->getPath()));
802
+ $return['extracted_files'][] = $spl_fileinfo->getPath()." (".$spl_fileinfo->getSize()." bytes)";
803
+ }
804
+ }
805
+
806
+ if(isset($data['start']))
807
+ //if(isset($data['start']) and $data['start'] <= $this->filesystem->getSize($backup_file))
808
+ {
809
+ $return['finished'] = 0;
810
+ $return['start'] = $data['start'];
811
+ }else{
812
+
813
+ $return['processed'] += $start;
814
+
815
+ if($this->is_multipart($source_backup_file))
816
+ {
817
+ $return['start'] = 0;
818
+
819
+ ++$return['part'];
820
+
821
+ if($return['part'] < sizeof($backup_parts))
822
+ $return['finished'] = 0;
823
+
824
+ }
825
+ }
826
+
827
+ if($return['finished'])
828
+ $this->logger->info(sprintf('Done extracting %s', $source_backup_file));
829
+
830
+ $return['backup_file'] = $backup_file;
831
+
832
+ $this->send_response(200, $return);
833
+ }
834
+
835
+ public function get_current_directory_action()
836
+ {
837
+ global $wpdb;
838
+
839
+ $restore_script_url = filter_input(INPUT_POST, 'restore_script_url', FILTER_SANITIZE_STRING);
840
+
841
+ $pathinfo = pathinfo( __FILE__);
842
+
843
+ $suffix = "";
844
+ $return['remote_mysql_host'] = "localhost";
845
+ $return['remote_mysql_user'] = "";
846
+ $return['remote_mysql_pass'] = "";
847
+ $return['remote_mysql_db'] = "";
848
+
849
+ if(defined('XCLONER_PLUGIN_ACCESS') && XCLONER_PLUGIN_ACCESS)
850
+ {
851
+ $return['dir'] = realpath(get_home_path().DS.$suffix);
852
+ $return['restore_script_url'] = get_site_url();
853
+ $return['remote_mysql_host'] = $wpdb->dbhost;
854
+ $return['remote_mysql_user'] = $wpdb->dbuser;
855
+ $return['remote_mysql_pass'] = $wpdb->dbpassword;
856
+ $return['remote_mysql_db'] = $wpdb->dbname;
857
+ }
858
+ else{
859
+ $return['dir'] = ($pathinfo['dirname']).DS.$suffix;
860
+ $return['restore_script_url'] = str_replace($pathinfo['basename'], "", $restore_script_url).$suffix;
861
+ }
862
+
863
+ $this->logger->info(sprintf('Determining current url as %s and path as %s', $return['dir'], $return['restore_script_url']));
864
+
865
+ $this->send_response(200, $return);
866
+ }
867
+
868
+ public function check_system()
869
+ {
870
+ //check if i can write
871
+ $tmp_file = md5(time());
872
+ if(!file_put_contents($tmp_file, "++"))
873
+ throw new Exception("Could not write to new host");
874
+
875
+ if(!unlink($tmp_file))
876
+ throw new Exception("Could not delete temporary file from new host");
877
+
878
+ $max_upload = $this->return_bytes((ini_get('upload_max_filesize')));
879
+ $max_post = $this->return_bytes((ini_get('post_max_size')));
880
+
881
+ $return['max_upload_size'] = min($max_upload, $max_post); // bytes
882
+ $return['status'] = true;
883
+
884
+ $this->logger->info(sprintf('Current filesystem max upload size is %s bytes', $return['max_upload_size']));
885
+
886
+ $this->send_response(200, $return);
887
+ }
888
+
889
+ private function return_bytes($val) {
890
+ $val = trim($val);
891
+ $last = strtolower($val[strlen($val)-1]);
892
+ switch($last) {
893
+ // The 'G' modifier is available since PHP 5.1.0
894
+ case 'g':
895
+ $val *= 1024;
896
+ case 'm':
897
+ $val *= 1024;
898
+ case 'k':
899
+ $val *= 1024;
900
+ }
901
+
902
+ return $val;
903
+ }
904
+
905
+ public function is_multipart($backup_name)
906
+ {
907
+ if(stristr($backup_name, "-multipart"))
908
+ return true;
909
+
910
+ return false;
911
+ }
912
+
913
+ public function get_backup_size($backup_name)
914
+ {
915
+ $backup_size = $this->filesystem->getSize($backup_name);
916
+ if($this->is_multipart($backup_name))
917
+ {
918
+ $backup_parts = $this->get_multipart_files($backup_name);
919
+ foreach($backup_parts as $part_file)
920
+ $backup_size += $this->filesystem->getSize($part_file);
921
+ }
922
+
923
+ return $backup_size;
924
+ }
925
+
926
+ public function get_multipart_files($backup_name)
927
+ {
928
+ $files = array();
929
+
930
+ if($this->is_multipart($backup_name))
931
+ {
932
+ $lines = explode(PHP_EOL, $this->filesystem->read($backup_name));
933
+ foreach($lines as $line)
934
+ {
935
+ if($line)
936
+ {
937
+ $data = str_getcsv($line);
938
+ $files[] = $data[0];
939
+ }
940
+ }
941
+ }
942
+
943
+ return $files;
944
+ }
945
+
946
+ private function sort_by( &$array, $field, $direction = 'asc')
947
+ {
948
+ $direction = strtolower($direction);
949
+
950
+ usort($array, create_function('$a, $b', '
951
+ $a = $a["' . $field . '"];
952
+ $b = $b["' . $field . '"];
953
+
954
+ if ($a == $b)
955
+ {
956
+ return 0;
957
+ }
958
+
959
+ return ($a ' . ($direction == 'desc' ? '>' : '<') .' $b) ? -1 : 1;
960
+ '));
961
+
962
+ return true;
963
+ }
964
+
965
+ public static function send_response($status = 200, $response)
966
+ {
967
+ header("Access-Control-Allow-Origin: *");
968
+ header("HTTP/1.1 200");
969
+ header('Content-Type: application/json');
970
+ $return['status'] = $status;
971
+ $return['statusText'] = $response;
972
+
973
+ if(isset($response['error']) && $response['error'])
974
+ {
975
+ $return['statusText'] = $response['message'];
976
+ $return['error'] = true;
977
+ }elseif($status != 200 and $status != 418)
978
+ {
979
+ $return['error'] = true;
980
+ $return['message'] = $response;
981
+ }
982
+
983
+ echo json_encode($return);
984
+ exit;
985
+ }
986
+
987
+ /*
988
+ * Serialize fix methods below for mysql query lines
989
+ */
990
+
991
+ function do_serialized_fix($query)
992
+ {
993
+ $query = str_replace(array("\\n","\\r","\\'"), array("","","\""), ($query));
994
+
995
+ return preg_replace_callback('!s:(\d+):([\\\\]?"[\\\\]?"|[\\\\]?"((.*?)[^\\\\])[\\\\]?");!', function ($m) {
996
+ $data = "";
997
+
998
+ if(!isset($m[3]))
999
+ $m[3] = "";
1000
+
1001
+ $data = 's:'.strlen(($m[3])).':\"'.($m[3]).'\";';
1002
+ //return $this->unescape_quotes($data);
1003
+
1004
+ return $data;
1005
+ }, $query);
1006
+ }
1007
+
1008
+ private function unescape_quotes($value) {
1009
+ return str_replace('\"', '"', $value);
1010
+ }
1011
+
1012
+ private function unescape_mysql($value) {
1013
+ return str_replace(array("\\\\", "\\0", "\\n", "\\r", "\Z", "\'", '\"'),
1014
+ array("\\", "\0", "\n", "\r", "\x1a", "'", '"'),
1015
+ $value);
1016
+ }
1017
+
1018
+
1019
+ private function has_serialized($s)
1020
+ {
1021
+ if(
1022
+ stristr($s, '{' ) != false &&
1023
+ stristr($s, '}' ) != false &&
1024
+ stristr($s, ';' ) != false &&
1025
+ stristr($s, ':' ) != false
1026
+ ){
1027
+ return true;
1028
+ }else{
1029
+ return false;
1030
+ }
1031
+
1032
+ }
1033
+ }
1034
+
vendor/splitbrain/php-archive/src/FileInfo.php CHANGED
@@ -334,14 +334,18 @@ class FileInfo
334
  */
335
  public function match($include = '', $exclude = '')
336
  {
 
 
 
337
  $extract = true;
338
  if ($include && !preg_match($include, $this->getPath())) {
339
  $extract = false;
 
340
  }
341
  if ($exclude && preg_match($exclude, $this->getPath())) {
342
  $extract = false;
343
  }
344
-
345
  return $extract;
346
  }
347
  }
334
  */
335
  public function match($include = '', $exclude = '')
336
  {
337
+ //echo $include;
338
+
339
+ //echo $this->getPath()."--".preg_match($include, $this->getPath())."\n";
340
  $extract = true;
341
  if ($include && !preg_match($include, $this->getPath())) {
342
  $extract = false;
343
+
344
  }
345
  if ($exclude && preg_match($exclude, $this->getPath())) {
346
  $extract = false;
347
  }
348
+
349
  return $extract;
350
  }
351
  }
vendor/splitbrain/php-archive/src/Tar.php CHANGED
@@ -149,6 +149,7 @@ class Tar extends Archive
149
  */
150
  public function extract($outdir, $strip = '', $exclude = '', $include = '', $files_limit = 0)
151
  {
 
152
  if ($this->closed || !$this->file) {
153
  throw new ArchiveIOException('Can not read from a closed archive');
154
  }
@@ -715,6 +716,12 @@ class Tar extends Archive
715
  "a100filename/a8perm/a8uid/a8gid/a12size/a12mtime/a8checksum/a1typeflag/a100link/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor/a155prefix",
716
  $block
717
  );
 
 
 
 
 
 
718
  if (!$header) {
719
  throw new ArchiveCorruptedException('Failed to parse header');
720
  }
@@ -739,7 +746,7 @@ class Tar extends Archive
739
  if (trim($header['prefix'])) {
740
  $return['filename'] = trim($header['prefix']).'/'.$return['filename'];
741
  }
742
-
743
  // Handle Long-Link and PAX entries from GNU Tar
744
  if ($return['typeflag'] == 'L') {
745
  // following data block(s) is the filename
149
  */
150
  public function extract($outdir, $strip = '', $exclude = '', $include = '', $files_limit = 0)
151
  {
152
+
153
  if ($this->closed || !$this->file) {
154
  throw new ArchiveIOException('Can not read from a closed archive');
155
  }
716
  "a100filename/a8perm/a8uid/a8gid/a12size/a12mtime/a8checksum/a1typeflag/a100link/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor/a155prefix",
717
  $block
718
  );
719
+
720
+ if(DecOct($header['typeflag']) == DecOct(''))
721
+ {
722
+ $header['typeflag'] = (string)0;
723
+ }
724
+
725
  if (!$header) {
726
  throw new ArchiveCorruptedException('Failed to parse header');
727
  }
746
  if (trim($header['prefix'])) {
747
  $return['filename'] = trim($header['prefix']).'/'.$return['filename'];
748
  }
749
+
750
  // Handle Long-Link and PAX entries from GNU Tar
751
  if ($return['typeflag'] == 'L') {
752
  // following data block(s) is the filename
xcloner.php CHANGED
@@ -16,7 +16,7 @@
16
  * Plugin Name: XCloner - Site Backup and Restore
17
  * Plugin URI: http://www.xcloner.com
18
  * Description: XCloner is a tool that will help you manage your website backups, generate/restore/move so your website will be always secured! With XCloner you will be able to clone your site to any other location with just a few clicks, as well as transfer the backup archives to remote FTP, SFTP, DropBox, Amazon S3, Google Drive, WebDAV, BackBlaze, Azure accounts.
19
- * Version: 4.0.2
20
  * Author: Liuta Ovidiu
21
  * Author URI: http://www.thinkovi.com
22
  * License: GPL-2.0+
@@ -34,7 +34,10 @@ if ( ! defined( 'WPINC' ) ) {
34
  if(!is_admin() and !defined('DOING_CRON'))
35
  return;
36
 
37
- define("DS", DIRECTORY_SEPARATOR);
 
 
 
38
 
39
  /**
40
  * The code that runs during plugin activation.
16
  * Plugin Name: XCloner - Site Backup and Restore
17
  * Plugin URI: http://www.xcloner.com
18
  * Description: XCloner is a tool that will help you manage your website backups, generate/restore/move so your website will be always secured! With XCloner you will be able to clone your site to any other location with just a few clicks, as well as transfer the backup archives to remote FTP, SFTP, DropBox, Amazon S3, Google Drive, WebDAV, BackBlaze, Azure accounts.
19
+ * Version: 4.0.3
20
  * Author: Liuta Ovidiu
21
  * Author URI: http://www.thinkovi.com
22
  * License: GPL-2.0+
34
  if(!is_admin() and !defined('DOING_CRON'))
35
  return;
36
 
37
+ if(!defined("DS"))
38
+ {
39
+ define("DS", DIRECTORY_SEPARATOR);
40
+ }
41
 
42
  /**
43
  * The code that runs during plugin activation.