From 26ecb6ce66a9e07bef6d61f7b47692076ec3cc32 Mon Sep 17 00:00:00 2001 From: Eduard Veit Date: Fri, 4 Mar 2022 20:53:39 +0100 Subject: [PATCH] add backup to gitea wrapper --- README.md | 2 +- uberspace-gitea-installer.sh | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2644d01..46eadf4 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ The following steps will be done automatically: - check gpg signature - install `gitea` convenience wrapper script - `gitea update`, `gitea log`, `gitea start | stop | restart | status` + `gitea update`, `gitea log`, `gitea start | stop | restart | status`, `gitea backup` - install `gitea-update` script Connect via SSH to your Uberspace an then run: diff --git a/uberspace-gitea-installer.sh b/uberspace-gitea-installer.sh index 270987a..3f18319 100644 --- a/uberspace-gitea-installer.sh +++ b/uberspace-gitea-installer.sh @@ -74,6 +74,13 @@ case $FIRST_PARAMETER in less ~/logs/supervisord.log exit $? ;; + backup ) + ## this command creates a backup zip file with db, repos, config, log, data + ## restoring the backup is more difficult + ## read: https://docs.gitea.io/en-us/backup-and-restore/#restore-command-restore + $HOME/gitea/gitea dump --tempdir $HOME/tmp + exit $? + ;; esac $HOME/gitea/gitea "$@" @@ -122,6 +129,9 @@ NO_REPLY_ADDRESS = noreply.${USER}.uber.space ENABLED = true MAILER_TYPE = sendmail FROM = ${USER}@uber.space + +[repository] +DEFAULT_BRANCH = main end_of_content }