From 3582cb3f46057278aa62ef5018b09efe91457106 Mon Sep 17 00:00:00 2001 From: iamEvan Date: Thu, 25 Apr 2024 22:44:55 +0100 Subject: [PATCH] fix mongodb imports --- app/Livewire/Project/Database/Import.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Livewire/Project/Database/Import.php b/app/Livewire/Project/Database/Import.php index 11c6da314..d435289fa 100644 --- a/app/Livewire/Project/Database/Import.php +++ b/app/Livewire/Project/Database/Import.php @@ -27,7 +27,7 @@ class Import extends Component public string $postgresqlRestoreCommand = 'pg_restore -U $POSTGRES_USER -d $POSTGRES_DB'; public string $mysqlRestoreCommand = 'mysql -u $MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE'; public string $mariadbRestoreCommand = 'mariadb -u $MARIADB_USER -p$MARIADB_PASSWORD $MARIADB_DATABASE'; - public string $mongodbRestoreCommand = 'mongorestore --authenticationDatabase=admin --username $MONGO_INITDB_ROOT_USERNAME --password $MONGO_INITDB_ROOT_PASSWORD --uri mongodb://localhost:27017 --gzip'; + public string $mongodbRestoreCommand = 'mongorestore --authenticationDatabase=admin --username $MONGO_INITDB_ROOT_USERNAME --password $MONGO_INITDB_ROOT_PASSWORD --uri mongodb://localhost:27017 --gzip --archive='; public function getListeners() { @@ -102,7 +102,7 @@ public function runImport() $this->importCommands[] = "rm {$tmpPath}"; break; case 'App\Models\StandaloneMongodb': - $this->importCommands[] = "docker exec {$this->container} sh -c '{$this->mongodbRestoreCommand} {$tmpPath}'"; + $this->importCommands[] = "docker exec {$this->container} sh -c '{$this->mongodbRestoreCommand}{$tmpPath}'"; $this->importCommands[] = "rm {$tmpPath}"; break; }