mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
folder backup
This commit is contained in:
@@ -30,7 +30,7 @@ class Backup extends Action
|
||||
while (!connection_aborted() || PHP_SAPI == "cli") {
|
||||
$now = new \DateTime();
|
||||
$now->setTimezone(new \DateTimeZone(date_default_timezone_get()));
|
||||
$next = new \DateTime($now->format("Y-m-d 11:30.0"));
|
||||
$next = new \DateTime($now->format("Y-m-d 16:0.0"));
|
||||
$next->setTimezone(new \DateTimeZone(date_default_timezone_get()));
|
||||
$sleep = $next->getTimestamp() - $now->getTimestamp();
|
||||
|
||||
@@ -68,14 +68,13 @@ class Backup extends Action
|
||||
|
||||
$stdout = '';
|
||||
$stderr = '';
|
||||
|
||||
Console::execute(
|
||||
'cd ' . $folder . ' && tar --exclude ' . $filename . ' -zcf ' . $source . '*',
|
||||
'cd ' . $folder . ' && tar --exclude ' . $filename . ' -zcf ' . $source . ' *',
|
||||
'',
|
||||
$stdout,
|
||||
$stderr
|
||||
);
|
||||
|
||||
var_dump($local->exists($source));
|
||||
try {
|
||||
if (!$local->exists($source)) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user