add postgres vacuum
This commit is contained in:
parent
8536754d14
commit
3886de5b7c
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
SCRIPT_VERSION="4"
|
||||
SCRIPT_VERSION="5"
|
||||
SCRIPT_URL='https://raw.githubusercontent.com/wh1te909/tacticalrmm/master/backup.sh'
|
||||
|
||||
GREEN='\033[0;32m'
|
||||
|
@ -50,6 +50,11 @@ if [ -d /meshcentral/meshcentral-coredumps ]; then
|
|||
rm -f /meshcentral/meshcentral-coredumps/*
|
||||
fi
|
||||
|
||||
printf >&2 "${GREEN}Running postgres vacuum${NC}\n"
|
||||
sudo -u postgres psql -d tacticalrmm -c "vacuum full logs_auditlog"
|
||||
sudo -u postgres psql -d tacticalrmm -c "vacuum full logs_pendingaction"
|
||||
sudo -u postgres psql -d tacticalrmm -c "vacuum full agents_agentoutage"
|
||||
|
||||
dt_now=$(date '+%Y_%m_%d__%H_%M_%S')
|
||||
tmp_dir=$(mktemp -d -t tacticalrmm-XXXXXXXXXXXXXXXXXXXXX)
|
||||
sysd="/etc/systemd/system"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
SCRIPT_VERSION="99"
|
||||
SCRIPT_VERSION="100"
|
||||
SCRIPT_URL='https://raw.githubusercontent.com/wh1te909/tacticalrmm/master/update.sh'
|
||||
LATEST_SETTINGS_URL='https://raw.githubusercontent.com/wh1te909/tacticalrmm/master/api/tacticalrmm/tacticalrmm/settings.py'
|
||||
YELLOW='\033[1;33m'
|
||||
|
@ -177,6 +177,11 @@ sudo cp /rmm/api/tacticalrmm/core/goinstaller/bin/goversioninfo /usr/local/bin/
|
|||
sudo chown ${USER}:${USER} /usr/local/bin/goversioninfo
|
||||
sudo chmod +x /usr/local/bin/goversioninfo
|
||||
|
||||
printf >&2 "${GREEN}Running postgres vacuum${NC}\n"
|
||||
sudo -u postgres psql -d tacticalrmm -c "vacuum full logs_auditlog"
|
||||
sudo -u postgres psql -d tacticalrmm -c "vacuum full logs_pendingaction"
|
||||
sudo -u postgres psql -d tacticalrmm -c "vacuum full agents_agentoutage"
|
||||
|
||||
if [[ "${CURRENT_PIP_VER}" != "${LATEST_PIP_VER}" ]]; then
|
||||
rm -rf /rmm/api/env
|
||||
cd /rmm/api
|
||||
|
|
Loading…
Reference in New Issue