From a287d602d8e2d47de2da9fac8e7ba3229b16ff87 Mon Sep 17 00:00:00 2001 From: Valentin Date: Tue, 16 Apr 2024 17:51:55 +0200 Subject: [PATCH] export content script 7 --- utils/export-content.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/export-content.sh b/utils/export-content.sh index 2a60b40..d9c9f9f 100644 --- a/utils/export-content.sh +++ b/utils/export-content.sh @@ -1,6 +1,5 @@ #!/bin/bash - if [ "$EUID" -ne 0 ]; then echo "Please run as root" exit @@ -25,6 +24,7 @@ if [[ "$answer" == "y" ]]; then mkdir -p "${export_folder}" mysqldump -u directus -p"${db_password}" directus > "${export_folder}/db_${site_name}_${current_date}.sql" cp -r /var/www/repositories/cms*/uploads "${export_folder}" + cp -r /var/www/repositories/cms*/.env "${export_folder}" tar -czf "${export_folder}.tar.gz" -C "${export_base_folder}" . rm -r "${export_folder}" chown -R "${user}:${user}" "${export_base_folder}"