Local backup for mumble

This commit is contained in:
Bob Mottram 2016-07-07 12:12:33 +01:00
parent 28cc306cd8
commit 278440a39c
No known key found for this signature in database
GPG Key ID: BA68F26108DC9F87
4 changed files with 36 additions and 25 deletions

View File

@ -50,23 +50,24 @@ function upgrade_gogs {
} }
function backup_local_gogs { function backup_local_gogs {
GIT_DOMAIN_NAME='gogs'
if grep -q "Gogs domain" $COMPLETION_FILE; then if grep -q "Gogs domain" $COMPLETION_FILE; then
GIT_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Gogs domain" | awk -F ':' '{print $2}') if [ -d /home/git/gogs-repositories ]; then
GIT_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Gogs domain" | awk -F ':' '{print $2}')
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"
fi
fi 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 {

View File

@ -37,15 +37,15 @@ IRC_ONION_PORT=6697
IRC_PASSWORD= IRC_PASSWORD=
function upgrade_irc { function upgrade_irc {
echo '' echo -n ''
} }
function backup_local_irc { function backup_local_irc {
echo '' echo -n ''
} }
function backup_remote_irc { function backup_remote_irc {
echo '' echo -n ''
} }
function remove_irc { function remove_irc {

View File

@ -38,19 +38,19 @@ MEDIAGOBLIN_ADMIN_PASSWORD=
MEDIAGOBLIN_ONION_PORT=8096 MEDIAGOBLIN_ONION_PORT=8096
function upgrade_mediagoblin { function upgrade_mediagoblin {
echo '' echo -n ''
} }
function backup_local_mediagoblin { function backup_local_mediagoblin {
echo '' echo -n ''
} }
function backup_remote_mediagoblin { function backup_remote_mediagoblin {
echo '' echo -n ''
} }
function remove_mediagoblin { function remove_mediagoblin {
echo '' echo -n ''
} }
function install_mediagoblin { function install_mediagoblin {

View File

@ -40,15 +40,25 @@ VOIP_DATABASE="mumble-server.sqlite"
VOIP_CONFIG_FILE="mumble-server.ini" VOIP_CONFIG_FILE="mumble-server.ini"
function upgrade_mumble { function upgrade_mumble {
echo '' echo -n ''
} }
function backup_local_mumble { function backup_local_mumble {
echo '' if [ -f /etc/mumble-server.ini ]; then
echo $"Backing up Mumble settings"
if [ ! -d /root/tempvoipbackup ]; then
mkdir -p /root/tempvoipbackup
fi
cp -f /etc/mumble-server.ini /root/tempvoipbackup
cp -f /var/lib/mumble-server/mumble-server.sqlite /root/tempvoipbackup
cp -f /etc/sipwitch.conf /root/tempvoipbackup
backup_directory_to_usb /root/tempvoipbackup voip
echo $"Mumble settings backup complete"
fi
} }
function backup_remote_mumble { function backup_remote_mumble {
echo '' echo ''
} }
function remove_mumble { function remove_mumble {