From 1840e32587ae7d586f1ddba1f818eb29cde102d1 Mon Sep 17 00:00:00 2001 From: Valentin Date: Tue, 16 Apr 2024 17:32:31 +0200 Subject: [PATCH] export content script 6 --- utils/export-content.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/export-content.sh b/utils/export-content.sh index e0292f8..2a60b40 100644 --- a/utils/export-content.sh +++ b/utils/export-content.sh @@ -23,10 +23,11 @@ if [[ "$answer" == "y" ]]; then export_base_folder="/home/${user}/content_exports" export_folder="${export_base_folder}/${site_name}_export_${current_date}" mkdir -p "${export_folder}" - mysqldump -u directus -p"${db_password}" directus > "${export_folder}/db_${site_name}_${current_date}" + mysqldump -u directus -p"${db_password}" directus > "${export_folder}/db_${site_name}_${current_date}.sql" cp -r /var/www/repositories/cms*/uploads "${export_folder}" tar -czf "${export_folder}.tar.gz" -C "${export_base_folder}" . - chown -R "${user}:${user}" "${export_folder}" + rm -r "${export_folder}" + chown -R "${user}:${user}" "${export_base_folder}" ssh_port=$(cat /etc/ssh/sshd_config | grep "Port " | sed 's/^Port //') ip=$(hostname -I)