From e784ea0b70246fb813d5b60804a9d155b46e2a8c Mon Sep 17 00:00:00 2001 From: DragoQC Date: Thu, 27 Nov 2025 14:58:17 -0500 Subject: [PATCH] Fix Backup of precise files Fix fetch and deploy Added Data restoration --- ct/discopanel.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ct/discopanel.sh b/ct/discopanel.sh index 93187ab4c..306e6a307 100644 --- a/ct/discopanel.sh +++ b/ct/discopanel.sh @@ -35,13 +35,12 @@ function update_script() { msg_ok "Stopped Service" msg_info "Creating Backup" - tar -czf "/opt/discopanel_backup_$(date +%F).tar.gz" "/opt/discopanel" + tar -czf "/opt/discopanel_backup_last.tar.gz" -C "/opt/discopanel/data" discopanel.db .recovery_key servers msg_ok "Created Backup" rm -rf /opt/discopanel - fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "tarball" "/opt/discopanel" - + fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "tarball" "latest" "/opt/discopanel" msg_info "Building frontend" cd /opt/discopanel/web/discopanel @@ -54,6 +53,10 @@ function update_script() { go build -o discopanel cmd/discopanel/main.go msg_ok "Builded backend" + msg_info "Restoring Data" + tar -xzf "/opt/discopanel_backup_last.tar.gz" -C "/opt/discopanel/data" + msg_ok "Restored Data" + msg_info "Starting Service" systemctl start discopanel msg_ok "Started Service"