From a9f5b9c0134a50ff73ef34dfe07f21af6797db42 Mon Sep 17 00:00:00 2001 From: Muaz Ahmad Date: Tue, 17 Dec 2024 14:24:48 +0500 Subject: [PATCH] Add backup for the Hugo blog --- bash_scripts/backup_public | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bash_scripts/backup_public b/bash_scripts/backup_public index dfb35e8..3acad11 100755 --- a/bash_scripts/backup_public +++ b/bash_scripts/backup_public @@ -14,6 +14,11 @@ mkdir "$FORGEJO_ROOT" su forgejo -c "forgejo dump -f /tmp/forgejo.tar --type tar" cp /tmp/forgejo.tar "$FORGEJO_ROOT" +# Hugo +HUGO_ROOT="$BACKUP_ROOT/Hugo" +mkdir "$HUGO_ROOT" +cp /opt/hugo-blog "$HUGO_ROOT" -r + # Compress and send tar -cavf "./$BACKUP_ROOT.tar.zst" "./$BACKUP_ROOT" && rm -r "$BACKUP_ROOT" scp "./$BACKUP_ROOT.tar.zst" public@Mehen:~/