Files
vito/resources/views/ssh/services/database/mysql/restore.blade.php
Saeed Vaziry 65898b0ee6 Fix mysqldump backup error
This reverts commit 564b97e2aa.
2025-05-21 20:57:38 +02:00

12 lines
324 B
PHP

if ! DEBIAN_FRONTEND=noninteractive unzip {{ $file }}.zip; then
echo 'VITO_SSH_ERROR' && exit 1
fi
if ! sudo DEBIAN_FRONTEND=noninteractive mysql -u root {{ $database }} < {{ $file }}.sql; then
echo 'VITO_SSH_ERROR' && exit 1
fi
if ! rm {{ $file }}.sql {{ $file }}.zip; then
echo 'VITO_SSH_ERROR' && exit 1
fi