LibrePortal/scripts/update/backup/use_git_backup.sh
librelad 875a60f90f LibrePortal v0.1.0 — initial release
A free, open, self-hosted app platform (GNU AGPLv3): one-click app deploys,
Traefik reverse proxy with automatic SSL, rootless Docker support, gluetun
VPN routing, and a web dashboard to manage it all.

Free & open forever to self-host; optional paid hosted services fund it.
See PROMISE.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Signed-off-by: librelad <librelad@digitalangels.vip>
2026-05-21 20:37:54 +01:00

31 lines
889 B
Bash
Executable File

#!/bin/bash
gitUseExistingBackup()
{
isHeader "Installing LibrePortal Backup"
local backup_file="$1"
local backup_file_without_zip=$(basename "$backup_file" .zip)
update_done=false
local result=$(sudo unzip -o $backup_file -d $backup_install_dir)
checkSuccess "Copy the configs to the backup folder"
gitReset;
local result=$(copyFolders "$backup_install_dir$backup_install_dir/$backup_file_without_zip/" "$docker_dir" "$sudo_user_name")
checkSuccess "Copy the backed up folders back into the installation directory"
gitCleanInstallBackups;
gitUntrackFiles;
isSuccessful "Custom changes have been discarded successfully"
echo ""
isNotice "You have restored the configuration files for LibrePortal."
isNotice "To avoid any issues please rerun the 'libreportal' command."
echo ""
exit
update_done=true
}