Skip to content
Snippets Groups Projects
Unverified Commit 2e52ff8b authored by Bob Mottram's avatar Bob Mottram
Browse files

Local backup for gogs

parent 8a165edd
No related branches found
No related tags found
No related merge requests found
......@@ -50,11 +50,27 @@ function upgrade_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 {
echo ''
echo -n ''
}
function remove_gogs {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment