16 lines
476 B
Bash
Executable file
16 lines
476 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
service=$(basename "$0")
|
|
|
|
backup_path="$1"
|
|
|
|
if [ "$2" != "before" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
cd "/opt/services/$service" || exit
|
|
|
|
docker compose exec mariadb sh -c 'mariadb-dump --all-databases -u root -p"$MYSQL_ROOT_PASSWORD"' >"$backup_path/database.sql"
|
|
cp resources/views/layouts/SPTheme/config.json "$backup_path/config.json"
|
|
cp modules/DisposableBasic/Resources/views/web/blank.blade.php "$backup_path/blank.blade.php"
|
|
cp -r public/uploads/ "$backup_path"
|