From 3c858caaa28d5aeb2645ef6a946b22cce2c8a5e4 Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 1 Mar 2023 13:45:05 +0200 Subject: [PATCH] folder backup --- .env | 9 ++++++--- composer.json | 2 +- src/Appwrite/Platform/Tasks/Backup.php | 6 +++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.env b/.env index 674740f74f..228b7f39d4 100644 --- a/.env +++ b/.env @@ -32,7 +32,7 @@ _APP_CONNECTIONS_DB_CONSOLE=db_fra1_01=mariadb://user:password@mariadb:3306/appw _APP_CONNECTIONS_CACHE=redis_fra1_01=redis://redis:6379 _APP_CONNECTIONS_QUEUE=redis_fra1_01=redis://redis:6379 _APP_CONNECTIONS_PUBSUB=redis_fra1_01=redis://redis:6379 -_APP_CONNECTIONS_STORAGE= +_APP_CONNECTIONS_STORAGE=local://localhost _APP_STORAGE_ANTIVIRUS=disabled _APP_STORAGE_ANTIVIRUS_HOST=clamav _APP_STORAGE_ANTIVIRUS_PORT=3310 @@ -67,6 +67,9 @@ _APP_USAGE_STATS=enabled _APP_USAGE_AGGREGATION_INTERVAL=30 _APP_LOGGING_PROVIDER= _APP_LOGGING_CONFIG= +_APP_GRAPHQL_MAX_BATCH_SIZE=10 +_APP_GRAPHQL_MAX_COMPLEXITY=250 +_APP_GRAPHQL_MAX_DEPTH=3 _APP_REGION=default -_APP_DOCKER_HUB_USERNAME= -_APP_DOCKER_HUB_PASSWORD= \ No newline at end of file +DOCKERHUB_PULL_USERNAME +DOCKERHUB_PULL_PASSWORD diff --git a/composer.json b/composer.json index b2efb80ee1..edab3d9a9c 100644 --- a/composer.json +++ b/composer.json @@ -47,7 +47,7 @@ "utopia-php/analytics": "0.2.*", "utopia-php/audit": "0.20.*", "utopia-php/cache": "0.8.*", - "utopia-php/cli": "0.14.*", + "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", "utopia-php/database": "0.30.*", "utopia-php/queue": "0.5.*", diff --git a/src/Appwrite/Platform/Tasks/Backup.php b/src/Appwrite/Platform/Tasks/Backup.php index 6daed16e4c..a0f81b7d2d 100644 --- a/src/Appwrite/Platform/Tasks/Backup.php +++ b/src/Appwrite/Platform/Tasks/Backup.php @@ -28,9 +28,10 @@ class Backup extends Action Console::title('Backup V1'); Console::success(APP_NAME . ' backup process v1 has started'); + $jobInitTime = '9:55'; // (hour:minutes) $now = new \DateTime(); $now->setTimezone(new \DateTimeZone(date_default_timezone_get())); - $next = new \DateTime($now->format("Y-m-d 17:25.0")); + $next = new \DateTime($now->format("Y-m-d $jobInitTime")); $next->setTimezone(new \DateTimeZone(date_default_timezone_get())); $delay = $next->getTimestamp() - $now->getTimestamp(); @@ -74,6 +75,7 @@ class Backup extends Action $stderr ); + try { if (!$local->exists($source)) { continue; @@ -81,7 +83,6 @@ class Backup extends Action $local->transfer($source, $destination, $remote); Console::info("Backing up local $source to {$remote->getName()} $destination"); - /** * Backup folder, long tail cleanup. */ @@ -91,7 +92,6 @@ class Backup extends Action $now->sub(\DateInterval::createFromDateString('1 days')); if ($i >= 10) { $destination = '/' . $key . '/' . $key . '-' . $now->format("Y-m-d") . '.tar.gz'; - Console::info("Trying to delete from {$remote->getName()} $destination"); $remote->delete($destination); } }