Local backup for gogs
This commit is contained in:
parent
8a165eddb9
commit
2e52ff8b8a
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue