Local backup for gogs

This commit is contained in:
Bob Mottram 2016-07-07 11:33:45 +01:00
parent 8a165eddb9
commit 2e52ff8b8a
No known key found for this signature in database
GPG Key ID: BA68F26108DC9F87
1 changed files with 18 additions and 2 deletions

View File

@ -50,11 +50,27 @@ function upgrade_gogs {
} }
function backup_local_gogs { function backup_local_gogs {
echo '' GIT_DOMAIN_NAME='gogs'
if grep -q "Gogs domain" $COMPLETION_FILE; then
GIT_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Gogs domain" | awk -F ':' '{print $2}')
fi
echo $"Backing up gogs"
function_check backup_database_local
backup_database_local gogs
function_check backup_directory_to_usb
backup_directory_to_usb /root/tempgogsdata gogsdata
backup_directory_to_usb $GOPATH/src/github.com/gogits/gogs/custom gogs
backup_directory_to_usb /home/git/gogs-repositories gogsrepos
backup_directory_to_usb /home/git/.ssh gogsssh
echo $"Gogs backup complete"
} }
function backup_remote_gogs { function backup_remote_gogs {
echo '' echo -n ''
} }
function remove_gogs { function remove_gogs {