Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Disable local database backups #2198

Open
DaniRamosCR opened this issue Jun 27, 2024 · 3 comments
Open

Feature: Disable local database backups #2198

DaniRamosCR opened this issue Jun 27, 2024 · 3 comments
Labels
question Further information is requested

Comments

@DaniRamosCR
Copy link

Scenario:

  • X-Road version: 7.4.2-fi
  • Environment: Containerized deployment

The automatic database backup fails due to version mismatch:

**sudo -u xroad /usr/share/xroad/scripts/autobackup_xroad_proxy_configuration.sh**
ENCRYPT_BACKUP=false
GPG_KEYIDS=
CREATING DATABASE DUMP TO /var/lib/xroad/dbdump.dat
pg_dump: error: server version: 16.2; pg_dump version: 12.18 (Ubuntu 12.18-0ubuntu0.20.04.1)
pg_dump: error: aborting because of server version mismatch
Database backup failed! Please check the error messages and fix them before trying again!
Failed to back up the configuration of the X-Road security server

I did workaround it by adding -S in /usr/share/xroad/scripts/autobackup_xroad_proxy_configuration.sh to disable the automatic backup as we use an external database that handles also the snapshots externally, hence these backups are not needed:

#!/bin/bash

ID=$(source /usr/share/xroad/scripts/get_security_server_id.sh)
if [[ -n "${ID}" ]] ; then
  SCRIPT="/usr/share/xroad/scripts/backup_xroad_proxy_configuration.sh"
  FILENAME="/var/lib/xroad/backup/ss-automatic-backup-$(date +%Y_%m_%d_%H%M%S).gpg"
  ${SCRIPT} -s "${ID}" -f "${FILENAME}" **-S**
fi

Problem:

X-Road is running in a container, if restarted for whatever reason, the file content would revert to its original. Potentially a custom image could be created but this is not a feasible option in our case.

Ask:

Could these local database backups be disabled with a feature update that would allow easy disabling?

@petkivim
Copy link
Contributor

Hi @DaniRamosCR! The Security Server already supports disabling the automatic backups. The instructions are available here. However, disabling the automatic backups disables them completely, not only for the database. Unfortunately, disabling only the database backup is not supported.

@DaniRamosCR
Copy link
Author

DaniRamosCR commented Jun 30, 2024

Hey @petkivim!
Understood - We had read that through but we were hoping there could be a more convenient functionality for that in the future.
Thanks a lot!

@petkivim
Copy link
Contributor

Hi @DaniRamosCR! You're welcome! If you would like to see support for more fine grained configuration options of automatic backups in the future, feel free to submit an enhancement request.

@raits raits added the question Further information is requested label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants