mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-29 21:49:39 +00:00
fix(romm): snapshot Redis hourly like the upstream image (#17562)
* fix(romm): snapshot Redis hourly like the upstream image Redis' default save policy (3600 1 300 100 60 10000) rewrites the whole dump.rdb every 5 minutes on an idle RomM, because the RQ workers and scheduler change keys constantly. With the Switch TitleDB and PS2 serial caches the dump is ~50 MB, so an idle container writes ~14 GB/day. Upstream fixed this for the Docker image (rommapp/romm#3983, REDIS_SAVE_POLICY default "3600 1"), but that lives in docker/init_scripts/init, which the LXC install never runs. Apply the same policy on install and, for existing containers, on update unless a save policy is already set. * Update ct/romm.sh * Update install/romm-install.sh --------- Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
This commit is contained in:
co-authored by
Michel Roegl-Brunner
parent
d095b9020c
commit
8a314a12be
@@ -56,6 +56,13 @@ function update_script() {
|
||||
msg_ok "Migrated RQ services"
|
||||
fi
|
||||
|
||||
if ! grep -q '^save ' /etc/redis/redis.conf; then
|
||||
msg_info "Reducing Redis snapshot frequency"
|
||||
echo 'save 3600 1' >>/etc/redis/redis.conf
|
||||
$STD redis-cli CONFIG SET save "3600 1"
|
||||
msg_ok "Reduced Redis snapshot frequency"
|
||||
fi
|
||||
|
||||
if check_for_gh_release "romm" "rommapp/romm"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop romm-backend romm-worker romm-scan-worker romm-scheduler romm-watcher
|
||||
|
||||
@@ -167,6 +167,7 @@ echo "__version__ = \"$(cat ~/.romm)\"" >/opt/romm/backend/__version__.py
|
||||
|
||||
msg_info "Creating environment file"
|
||||
sed -i 's/^supervised no/supervised systemd/' /etc/redis/redis.conf
|
||||
echo 'save 3600 1' >>/etc/redis/redis.conf
|
||||
systemctl restart redis-server
|
||||
systemctl enable -q --now redis-server
|
||||
AUTH_SECRET_KEY=$(openssl rand -hex 32)
|
||||
|
||||
Reference in New Issue
Block a user