File system backup and restoration (Podman)
This guide covers file system backup and restoration for Deephaven Podman deployments. Unlike traditional installations, Podman deployments store configuration and data in mounted volumes managed through the VOLUME_BASE_DIR directory structure.
For traditional deployments, see File system backup and restoration. For Kubernetes deployments, see File system backup and restoration (Kubernetes).
Key directories and volumes
The following directories under VOLUME_BASE_DIR contain data and configuration that should be backed up:
| Directory | Purpose | Shared across pods? |
|---|---|---|
deephaven-etcd/ | etcd data and server configuration | No (infra only) |
deephaven-shared-config/ | Shared configuration files (auth, trust, dh-config, etc.) | Yes |
deephaven-tls/ | TLS certificates and keys for the host | No |
db-intraday/ | Intraday data | No (infra only) |
db-systems/ | Historical data | Yes |
If configured with optional volumes:
| Directory | Purpose | How to configure |
|---|---|---|
db-users/ | Direct user table data | --users-volume |
db-intradayuser/ | Centrally managed user table data | --intradayuser-volume |
java_lib/ | Custom JARs and authentication certificates | --java-lib-volume |
calendars/ | Custom calendar files | --calendars-volume |
What happens on upgrade
When you run start_command.sh --upgrade, the script moves regenerable shared configuration into a timestamped backup directory:
- Moved to
upgrade-backup-<timestamp>/:auth,trust,dh-config,etcd,installation,cluster_status - Preserved in place:
dh_etcd_config.tgz(so the existing etcd database is reused),priv-keys(because the public halves are registered in the auth database)
Caution
If you store SAML or Active Directory certificates in the auth directory, they are moved to the backup directory during upgrade. You must either restore them manually after the upgrade or store them in a persistent location such as the java_lib volume. See Persisting authentication certificates.
Persisting authentication certificates
Upgrades move the /deephaven-shared-config/auth directory to a backup location. To persist authentication certificates across restarts and upgrades, store them in the java_lib volume:
-
Mount a persistent volume for
java_libusing the--java-lib-volumeoption: -
Place certificate files in the host directory. They appear in the container at
/etc/sysconfig/illumon.d/java_lib/. -
Update the relevant properties to reference the new path:
Certificate type Property Example path SAML IdP certificate authentication.samlauth.idp.x509cert.file/etc/sysconfig/illumon.d/java_lib/idp-cert.pemActive Directory trust store authentication.server.ldap.truststore.ad.path/etc/sysconfig/illumon.d/java_lib/ad-truststore.jks
For more details, see Persisting authentication certificates.
Tailer configuration files
The tailer process scans only JAR files in /etc/sysconfig/illumon.d/java_lib. To persist custom tailer configuration XML files:
-
Package the XML files into a JAR:
-
Place the JAR in the
java_libvolume (configured with--java-lib-volume).
Backup procedures
Back up the VOLUME_BASE_DIR directory tree
The primary backup target is the entire VOLUME_BASE_DIR directory structure. This captures etcd data, shared configuration, TLS certificates, and any data stored on persistent volumes whose paths are under VOLUME_BASE_DIR.
Important
If you configured volumes outside VOLUME_BASE_DIR using start_command.sh options like -H, -I, -U, -W, --java-lib-volume, --calendars-volume, or --additional-volume, you must back up those paths separately. Review your start_command.sh invocation to identify all volume paths.
Caution
Stop all Deephaven pods before creating a filesystem backup. A tar of live etcd or database files can capture inconsistent state and produce an unusable recovery point.
Note
If db-systems/ or other directories are hosted on network storage (e.g., NFS), you may want to exclude them from this backup if the network storage system already backs them up.
Export data not on persistent volumes
If you have not configured persistent volumes for certain paths, use podman cp to export data from a running or stopped pod:
Back up etcd
For etcd-specific backup procedures, see etcd and MySQL backup and restoration. In a Podman deployment, you can exec into the pod to run etcd backup commands:
Automating backups
Schedule regular backups using cron or a similar scheduler.
Important
Rootless Podman pods are owned by the user who ran start_command.sh. Schedule backup scripts from that user's crontab (crontab -e), not from /etc/cron.daily which runs as root and cannot see another user's Podman storage.
This example stops the pods, backs up the VOLUME_BASE_DIR daily, restarts the pods on success or failure, and retains backups for 7 days:
Note
You can also use the Deephaven backup script within a Podman deployment by exec'ing into the pod, though the VOLUME_BASE_DIR backup approach is typically simpler for containerized deployments.
Tip
For zero-downtime backups of etcd, use the etcd snapshot procedure instead of stopping pods. Filesystem-level backups of live etcd data directories can capture inconsistent state.
Restore procedures
Restore the VOLUME_BASE_DIR directory structure
-
Stop all Deephaven pods. Specify a timeout of at least 90 seconds so that all Deephaven processes,
monit, andetcdexit cleanly: -
Extract the backup to the
VOLUME_BASE_DIR. For multi-user rootless deployments, usepodman unshareto restore files with correct mapped ownership: -
If SELinux is in use, reset the labels:
For more information, see Troubleshooting SELinux in Podman.
-
Restart the pods using
start_command.shwith the same options used originally.
Import data with podman cp
To restore data that was exported with podman cp, copy the contents (not the directory itself) to avoid creating nested paths:
Restore authentication certificates after upgrade
If authentication certificates were moved to upgrade-backup-<timestamp>/ during an upgrade:
Alternatively, move the certificates to the java_lib volume to prevent this issue in future upgrades. See Persisting authentication certificates.