Skip to content
Snippets Groups Projects
Commit 2939cfa1 authored by Bob Mottram's avatar Bob Mottram
Browse files

Remove local database backups

parent 92edc9d6
No related branches found
No related tags found
No related merge requests found
...@@ -490,6 +490,7 @@ function remove_gnusocial { ...@@ -490,6 +490,7 @@ function remove_gnusocial {
rm /etc/cron.hourly/gnusocial-daemons rm /etc/cron.hourly/gnusocial-daemons
fi fi
sed -i '/Gnusocial/d' /home/$MY_USERNAME/README sed -i '/Gnusocial/d' /home/$MY_USERNAME/README
remove_backup_database_local gnusocial
} }
function install_gnusocial_main { function install_gnusocial_main {
......
...@@ -351,6 +351,7 @@ function remove_gogs { ...@@ -351,6 +351,7 @@ function remove_gogs {
remove_onion_service gogs ${GIT_ONION_PORT} 9418 remove_onion_service gogs ${GIT_ONION_PORT} 9418
remove_completion_param "install_gogs" remove_completion_param "install_gogs"
sed -i '/gogs /d' $COMPLETION_FILE sed -i '/gogs /d' $COMPLETION_FILE
remove_backup_database_local gogs
} }
function install_gogs { function install_gogs {
......
...@@ -334,6 +334,7 @@ function remove_postactiv { ...@@ -334,6 +334,7 @@ function remove_postactiv {
rm /etc/cron.hourly/postactiv-daemons rm /etc/cron.hourly/postactiv-daemons
fi fi
sed -i '/Postactiv/d' /home/$MY_USERNAME/README sed -i '/Postactiv/d' /home/$MY_USERNAME/README
remove_backup_database_local postactiv
} }
function install_postactiv_main { function install_postactiv_main {
......
...@@ -268,6 +268,7 @@ function remove_rss { ...@@ -268,6 +268,7 @@ function remove_rss {
sed -i '/RSS /d' $COMPLETION_FILE sed -i '/RSS /d' $COMPLETION_FILE
sed -i '/rss /d' $COMPLETION_FILE sed -i '/rss /d' $COMPLETION_FILE
sed -i '/RSS reader/d' /home/$MY_USERNAME/README sed -i '/RSS reader/d' /home/$MY_USERNAME/README
remove_backup_database_local ttrss
} }
function rss_modifications { function rss_modifications {
......
...@@ -38,6 +38,15 @@ BACKUP_INCLUDES_DATABASES="no" ...@@ -38,6 +38,15 @@ BACKUP_INCLUDES_DATABASES="no"
# is used for backups and repair # is used for backups and repair
DATABASE_PASSWORD_FILE=/root/dbpass DATABASE_PASSWORD_FILE=/root/dbpass
function remove_backup_database_local {
database_name=$1
sed -i "/# Backup the ${database_name} database/,/# End of ${database_name} database backup/d" /usr/bin/backupdatabases
sed -i "/# Backup ${database_name}/,/# End of backup for ${database_name}/d" /etc/cron.weekly/backupdatabasesweekly
sed -i "/# Backup ${database_name}/,/# End of backup for ${database_name}/d" /etc/cron.monthly/backupdatabasesmonthly
sed -i "/${database_name}/d" /etc/cron.hourly/repair
}
function backup_database_local { function backup_database_local {
# Makes local backups of databases which can then be automatically rolled # Makes local backups of databases which can then be automatically rolled
# back if corruption is detected # back if corruption is detected
......
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