Changeset 14265
- Timestamp:
- 07/19/12 11:16:53 (10 months ago)
- Files:
-
- modules/branches/2.10/backup/bin/backup.php (modified) (1 diff)
- modules/branches/2.10/backup/functions.inc/class.backup.php (modified) (2 diffs)
- modules/branches/2.10/backup/functions.inc/restore.php (modified) (1 diff)
- modules/branches/2.10/backup/page.backup_restore.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.10/backup/bin/backup.php
r14231 r14265 72 72 $cmd[] = '-o StrictHostKeyChecking=no -i'; 73 73 $cmd[] = backup__($s[$b->b['bu_server']]['key']); 74 $cmd[] = '-p'; 75 $cmd[] = $s[$b->b['bu_server']]['port']; 74 76 $cmd[] = backup__($s[$b->b['bu_server']]['user']) 75 77 . '\@' modules/branches/2.10/backup/functions.inc/class.backup.php
r14248 r14265 178 178 $cmd[] = fpbx_which('tar') . ' cf - ' . $i['path']; 179 179 if ($i['exclude']) { 180 $excludes = explode("\n", $i['exclude']); 180 $excludes = is_array($i['exclude']) 181 ? $i['exclude'] 182 : explode("\n", $i['exclude']); 181 183 foreach ($excludes as $x) { 182 184 $cmd[] = " --exclude='$x'"; … … 284 286 } 285 287 286 copy($this->b['_tmpfile'], $path . '/' . $this->b['_file'] . '.tgz'); 287 288 //would rather use the native copy() here, but by defualt 289 //php doesnt support files > 2GB 290 //see here for a posible solution: 291 //http://ca3.php.net/manual/en/function.fopen.php#37791 292 $cmd[] = fpbx_which('cp'); 293 $cmd[] = $this->b['_tmpfile']; 294 $cmd[] = $path . '/' . $this->b['_file'] . '.tgz'; 295 296 exec(implode(' ', $cmd), $error, $status); 297 unset($cmd, $error); 298 if ($status !== 0) { 299 backup_log('Error copying ' . $this->b['_tmpfile'] 300 . ' to ' . $path . '/' . $this->b['_file'] 301 . '.tgz: ' . $error); 302 } 288 303 //run maintenance on the directory 289 304 $this->maintenance($s['type'], $s); modules/branches/2.10/backup/functions.inc/restore.php
r14044 r14265 303 303 } 304 304 305 if ( is_file($path)) {305 if (file_exists($path)) { 306 306 return $path; 307 307 } else { modules/branches/2.10/backup/page.backup_restore.php
r13600 r14265 114 114 array_walk_recursive($var['templates'], 'callback'); 115 115 116 if (is_array($ var['restore_path'])) {116 if (is_array($_SESSION['backup_restore_path'])) { 117 117 //TODO: if $var['restore_path'] is an array, that means it contains an error + error 118 118 // message. Do something with the error meesage 119 echo _('Invalid backup for or undefined error'); 119 120 break; 120 121 }
