@@ -209,7 +209,11 @@ function backupLog($msg, $newLine = true, $skipDate = false)
209209
210210$ logLine = $ restore ? "Restoring " : "Backing Up " ;
211211$ fileExt = ($ backupOptions ['compression ' ]) == "yes " ? ".tar.gz " : ".tar " ;
212- backupLog ("$ logLine appData from $ source to $ destination " );
212+ if ($ restore ) {
213+ backupLog ("$ logLine appData from $ restoreSource to $ restoreDestination " );
214+ } else {
215+ backupLog ("$ logLine appData from $ source to $ destination " );
216+ }
213217
214218if (!$ restore ) {
215219 if (is_dir ($ source )) {
@@ -249,7 +253,7 @@ function backupLog($msg, $newLine = true, $skipDate = false)
249253 exec ("mkdir -p " . escapeshellarg ($ restoreDestination ));
250254
251255 foreach ($ restoreItems as $ item ) {
252- if (in_array ($ item , ['. ' , '.. ' ] )) {
256+ if (in_array ($ item , ( $ restore ? ['. ' , '.. ' , ' backup.log ' ] : [ ' . ' , ' .. ' ]) )) {
253257 // Ignore . and ..
254258 continue ;
255259 }
@@ -271,13 +275,13 @@ function backupLog($msg, $newLine = true, $skipDate = false)
271275
272276 exec ($ command , $ out , $ returnValue );
273277
274- if (!file_exists ($ communityPaths ['backupProgress ' ])) {
275- backupLog ("User aborted backup! " );
278+ if (!file_exists (( $ restore ? $ communityPaths ['restoreProgress ' ] : $ communityPaths [ ' backupProgress ' ]) )) {
279+ backupLog ("User aborted backup/restore ! " );
276280 break ;
277281 }
278282
279283 if ($ returnValue > 0 ) {
280- backupLog ("tar creation failed! " );
284+ backupLog ("tar creation/extraction failed! " );
281285 $ errorOccured = true ;
282286 } else {
283287 if (!$ restore )
0 commit comments