Skip to content

Data preserved during redeploy

Reference for the data the platform preserves on container redeploy — system files, stack-specific paths, custom files and folders via /etc/jelastic/redeploy.conf, and backup file conventions.

When you redeploy a container on Stack Harbor PaaS, the platform replaces the container filesystem with a fresh copy of the target image. To prevent custom configuration and customer data from being lost, the platform automatically preserves a defined set of files and folders. This page documents what’s preserved by default, how to add your own files to the preservation list, and the backup file conventions used during redeploy.

What is preserved by default

The default preservation list covers four categories:

  • Custom container configuration — run commands, links, environment variables, port mappings.
  • Default and custom volumes — all volume contents survive intact.
  • AutoFS and NFS configuration — /etc/autofs.jelastic, /etc/auto.master, /etc/exports.
  • Firewall configuration — /etc/nftables/container-defined.nft, /etc/nftables/user-defined.nft, /etc/sysconfig/iptables-custom, /etc/sysconfig/iptables4-jelastic, /etc/sysconfig/iptables6-jelastic, /etc/iptables/rules.v4.
  • SSH access data — /root/.ssh/authorized_keys, /root/.ssh/authorized_keys2, /root/.ssh/id_rsa.

The redeploy.conf file

Every platform-managed container ships with /etc/jelastic/redeploy.conf. It lists the stack-specific files and folders the platform preserves on redeploy. The file is divided into two sections:

  • System files and folders — managed by the platform. Do not edit unless you know exactly what you’re doing.
  • Custom files and folders — your own additions.

You can open the file via the dashboard file manager (a Favorites shortcut is available) or via SSH.

Common system entries

Every container includes a baseline set of entries regardless of stack:

  • /etc/jelastic/redeploy.conf — the file itself, so the preservation list survives each redeploy.
  • ${home}/.bash_profile — default SSH shell settings.
  • /etc/nftables/container-defined.nft — image-specific firewall rules.
  • /etc/nftables/user-defined.nft — user-defined firewall rules.
  • /var/lib/jelastic/keys — uploaded SSH private keys used for SSH access and inter-container communication.

For legacy CentOS 7 containers, the firewall configs are /etc/sysconfig/iptables and /etc/sysconfig/iptables-custom.

Stack-specific preserved paths

Each stack adds its own entries. A subset of the per-stack list:

StackKey paths
Tomcat/opt/tomcat/conf/jelastic-ha.xml, /opt/tomcat/conf/jelastic-ssl.xml, /opt/tomcat/conf/tomcat-env.sh, /opt/tomcat/conf/variables.conf, /opt/tomcat/temp/, /var/spool/cron/tomcat
TomEE/opt/tomcat/temp/, /var/spool/cron/tomcat
GlassFish/opt/glassfish/glassfish/domains/domain1/applications, /opt/glassfish/glassfish/domains/domain1/config/admin-keyfile, /opt/glassfish/glassfish/domains/domain1/config/domain.xml, /opt/glassfish/hazelcast.xml, /opt/glassfish/glassfish/domains/domain1/docroot, /var/spool/cron/glassfish, /var/lib/jelastic/hooks
Spring Boot/home/jelastic/conf, /home/jelastic/APP, /var/lib/jelastic/keys, /var/spool/cron/jvm
Apache PHPbackup:/etc/php.ini, /etc/php.d/, /var/spool/cron/apache, /var/www/.ssh/
NGINX PHPbackup:/etc/php-fpm.conf, backup:/etc/php.ini, /etc/php.d/, /etc/sysconfig/php-fpm, /var/lib/nginx/.ssh/, /var/spool/cron/nginx
NGINX (LB)/etc/dhcp/dhcpd.conf, /etc/nginx/conf.d, /etc/nginx/neighbors, /etc/nginx/nginx-jelastic.conf, /etc/nginx/tcpmaps/mappings.xml, /etc/nginx/upstreams, /var/lib/jelastic/SSL
Node.js/home/jelastic//.ssh, /home/jelastic//.ssh2, /var/spool/cron/nodejs, /home/jelastic/ROOT
MySQL / MariaDB/etc/my.cnf, /etc/php.ini, /var/lib/mysql/.ssh/, /var/spool/cron/mysql
PostgreSQL/etc/php.ini, /var/lib/pgsql/.ssh/, /var/spool/cron/postgres, ${home}/lib/, ${home}/share/
WildFly/opt/contexturl, /home/jelastic/.ssh/, /var/spool/cron/wildfly, /opt/wildfly/domain, /opt/wildfly/standalone, /opt/wildfly/welcome-content/index.html, /var/lib/jelastic/hooks

The full per-stack list is visible by opening /etc/jelastic/redeploy.conf in the container.

Adding custom files and folders

To preserve a file or folder that isn’t in the default list:

  1. Open /etc/jelastic/redeploy.conf.
  2. Add the full path to the custom files and folders section, one entry per line.

For data — uploaded files, generated assets, database contents — use a volume instead. redeploy.conf is intended for configuration files needed for the container to operate correctly. Volumes scale better and survive container migration as well as redeploy.

Backup file convention

For files that should be preserved but where you also want to keep a backup of the version baked into the new image, prefix the path with backup::

backup:/path/to/file

This works for files only — not directories.

After redeploy, three filenames may exist alongside the entry:

  • {file_name} — the file from the new image tag.
  • {file_name}.{timestamp} — a backup created just before the redeploy. A separate file is created for each redeploy to a different tag.
  • {file_name}.backup — the most recent backup. Automatically replaces any previous same-named backup.

The backup files let you compare configurations across versions or roll back by renaming the backup file over the new one.

See also