Preserve Data
Data Preserved during Redeploy
During container redeployment, the platform preserves important system files, container settings, mounted data, firewall rules, and access credentials so the updated container remains operational.
On this page
Data Preserved by Default
- Custom container settings such as run commands, links, and variables.
- Data stored in default and custom volumes.
- AutoFS and NFS settings, including
/etc/autofs.jelastic,/etc/auto.master, and/etc/exports. - Firewall rules stored in nftables and legacy iptables files.
- SSH access files, including authorised keys and private-key data.
The redeploy.conf File
Every platform-managed container includes /etc/jelastic/redeploy.conf. It identifies software-stack-specific files and directories that must survive redeployment. The file is divided into system and custom sections.
The system section is generated for the selected stack. Modify it only when you understand the effect on container operability.
System Files and Folders
/etc/jelastic/redeploy.conf— preserves the redeployment configuration.${home}/.bash_profile— retains default SSH shell settings./etc/nftables/container-defined.nft— image-defined firewall rules./etc/nftables/user-defined.nft— custom firewall rules./var/lib/jelastic/keys— uploaded SSH private keys.
Legacy CentOS 7: Older containers may preserve
/etc/sysconfig/iptables and /etc/sysconfig/iptables-custom instead of nftables files.Stack-Specific Examples
| Stack | Examples of Preserved Paths |
|---|---|
| Tomcat | /opt/tomcat/conf/jelastic-ha.xml, /opt/tomcat/conf/jelastic-ssl.xml, /opt/tomcat/conf/tomcat-env.sh, /opt/tomcat/temp/ |
| GlassFish | Applications, domain.xml, Hazelcast settings, nodes, cron data, and hooks. |
| Payara | Domain applications, domain.xml, Hazelcast settings, nodes, SSH data, and hooks. |
| Spring Boot | /home/jelastic/conf, /home/jelastic/APP, keys, and cron settings. |
| Apache PHP | backup:/etc/php.ini, /etc/php.d/, Apache cron and SSH data. |
| MariaDB / MySQL / Percona | /etc/my.cnf, /etc/php.ini, database-user SSH data, and cron settings. |
| NGINX Load Balancer | /etc/nginx/conf.d, upstreams, neighbours, mappings, SSL data, SSH data, and cron settings. |
| NGINX PHP | backup:/etc/php-fpm.conf, backup:/etc/php.ini, PHP modules, PHP-FPM settings, SSH data, and cron settings. |
| Node.js | SSH folders, cron settings, and /home/jelastic/ROOT. |
| PostgreSQL | /etc/php.ini, PostgreSQL SSH and cron data, plus ${home}/lib/ and ${home}/share/. |
| Varnish | /etc/nginx, /etc/varnish, /etc/sysconfig/varnish, runtime data, and cron settings. |
| WildFly | SSH data, cron settings, /opt/wildfly/domain, /opt/wildfly/standalone, welcome content, and hooks. |
Custom Files and Folders
Add full paths to the custom section of redeploy.conf, with one entry per line.
/path/to/custom/file /path/to/custom/folder
Add only configuration items needed for container operability. Use container volumes for application data and other persistent content.
Keeping Backup Versions
To retain both the old and new version of a configuration file, add the backup: prefix.
backup:{path_to_file}
The
backup: option works for files only, not directories.{file_name}— file from the target image.{file_name}.{timestamp}— timestamped copy created before redeployment.{file_name}.backup— latest backup copy.
Use these files for comparison or rollback by renaming them or copying the previous content back into place.
