fix: update import command to append file redirection for database restoration
This commit is contained in:
@@ -199,7 +199,7 @@ EOD;
|
|||||||
if ($this->dumpAll) {
|
if ($this->dumpAll) {
|
||||||
$restoreCommand .= " && (gunzip -cf {$tmpPath} 2>/dev/null || cat {$tmpPath}) | mariadb -u root -p\$MARIADB_ROOT_PASSWORD";
|
$restoreCommand .= " && (gunzip -cf {$tmpPath} 2>/dev/null || cat {$tmpPath}) | mariadb -u root -p\$MARIADB_ROOT_PASSWORD";
|
||||||
} else {
|
} else {
|
||||||
$restoreCommand = "mariadb -u \$MARIADB_USER -p\$MARIADB_PASSWORD \$MARIADB_DATABASE < {$tmpPath}";
|
$restoreCommand .= " < {$tmpPath}";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case \App\Models\StandaloneMysql::class:
|
case \App\Models\StandaloneMysql::class:
|
||||||
@@ -207,7 +207,7 @@ EOD;
|
|||||||
if ($this->dumpAll) {
|
if ($this->dumpAll) {
|
||||||
$restoreCommand .= " && (gunzip -cf {$tmpPath} 2>/dev/null || cat {$tmpPath}) | mysql -u root -p\$MYSQL_ROOT_PASSWORD";
|
$restoreCommand .= " && (gunzip -cf {$tmpPath} 2>/dev/null || cat {$tmpPath}) | mysql -u root -p\$MYSQL_ROOT_PASSWORD";
|
||||||
} else {
|
} else {
|
||||||
$restoreCommand = "mysql -u \$MYSQL_USER -p\$MYSQL_PASSWORD \$MYSQL_DATABASE < {$tmpPath}";
|
$restoreCommand .= " < {$tmpPath}";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case \App\Models\StandalonePostgresql::class:
|
case \App\Models\StandalonePostgresql::class:
|
||||||
|
|||||||
Reference in New Issue
Block a user