Add backup for the Hugo blog
This commit is contained in:
parent
8734e3d48b
commit
a9f5b9c013
1 changed files with 5 additions and 0 deletions
|
@ -14,6 +14,11 @@ mkdir "$FORGEJO_ROOT"
|
||||||
su forgejo -c "forgejo dump -f /tmp/forgejo.tar --type tar"
|
su forgejo -c "forgejo dump -f /tmp/forgejo.tar --type tar"
|
||||||
cp /tmp/forgejo.tar "$FORGEJO_ROOT"
|
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
|
# Compress and send
|
||||||
tar -cavf "./$BACKUP_ROOT.tar.zst" "./$BACKUP_ROOT" && rm -r "$BACKUP_ROOT"
|
tar -cavf "./$BACKUP_ROOT.tar.zst" "./$BACKUP_ROOT" && rm -r "$BACKUP_ROOT"
|
||||||
scp "./$BACKUP_ROOT.tar.zst" public@Mehen:~/
|
scp "./$BACKUP_ROOT.tar.zst" public@Mehen:~/
|
||||||
|
|
Loading…
Reference in a new issue