🐞 fix: Update forge script. add backup script

This commit is contained in:
Keith Solomon
2025-11-30 22:32:57 -06:00
parent 60ae0ea64a
commit 5e993d9dd9
3 changed files with 38 additions and 1 deletions

View File

@@ -88,9 +88,15 @@ cmd_runner_logs() {
cmd_backup() {
ensure_dirs
local ts dump dest
ts=$(date +%Y%m%d-%H%M%S)
dump="$GITEA_DIR/gitea/gitea-dump-$ts.zip"
dest="$BACKUP_DIR/gitea-dump-$ts.zip"
echo "Running Gitea dump inside container: $GITEA_CONTAINER_NAME"
# Gitea dump will write gitea-dump-*.zip under /data which is mounted to $GITEA_DIR/gitea
docker exec -u 1000 "$GITEA_CONTAINER_NAME" gitea dump -c /data/gitea/conf/app.ini
docker exec -u 1000 "$GITEA_CONTAINER_NAME" gitea dump -c /data/gitea/conf/app.ini --file /data/gitea-dump-$ts.zip
echo "Locating latest dump..."
local dump