Preserving custom files across container upgrade

Use the files_to_backup.conf configuration file to specify the configuration files that must be preserved across container upgrades by using the automated backup and restore feature.

Setting up the backup configuration for the first time

Important: If you are an existing customer and want to preserve files during container upgrades, you must complete this setup before the next upgrade.

To set up the /data/containerupgrade/ directory and create the default backup configuration file, complete the following steps:

  1. Create the containerupgrade directory inside Netezza Performance Server container with root user:

    mkdir -p /data/containerupgrade
  2. Create the files_to_backup.conf file:

    cd /data/containerupgrade
    touch files_to_backup.conf

    The directory should contain the following file:

    [nz@npshost containerupgrade]$ ls -l
    total 4
    -rw-rw-rw-. 1 root root 332 Jun 30 17:32 files_to_backup.conf
  3. Add the following default content to files_to_backup.conf:
    Note: To include custom files in a backup, specify the full file path of each file in files_to_backup.conf.

    Example:

    /home/nz/mycustomfile.txt
    # Default files to backup during container upgrade
    # Add one file path per line
    # Lines starting with # are comments
    
    # Cron configuration files
    /etc/cron.daily
    /etc/cron.hourly
    /etc/cron.monthly
    /etc/crontab
    /etc/cron.weekly
    
    # System configuration files
    /etc/fstab
    /etc/sudoers
    
    # User configuration files
    /export/home/nz/.bashrc
    /export/home/nz/.nzpassword
  4. Set the required permissions on the directory:

    chmod -R 777 /data/containerupgrade

Configuration file location

The backup configuration file is located at:

/data/containerupgrade/files_to_backup.conf

Backup storage

Backups are stored in the /data/containerupgrade/ directory. Each backup folder name includes the date and an incremental version number:

/data/containerupgrade/backup_YYYY.MM.DD_N

For example: backup_2026.05.14_1, backup_2026.05.14_2

The system automatically retains the last five backups.

Files that cannot be backed up

The following configuration files cannot be added to the backup list:

  • /etc/hostname
  • /etc/hosts
  • /etc/resolv.conf

Files that are already preserved

The following configuration files are preserved automatically. Do not add them explicitly to the backup configuration file:

Service configuration files:

  • /etc/sssd/sssd.conf
  • /etc/crontab
  • /var/spool/cron/nz
  • /var/spool/cron/root
  • /var/lib/dnsmasq/dnsmasq.leases
  • /etc/ssh

Cron configuration files:

  • /etc/cron.daily
  • /etc/cron.hourly
  • /etc/cron.monthly
  • /etc/cron.weekly

System configuration files:

  • /etc/fstab
  • /etc/sudoers

User configuration files:

  • /export/home/nz/.bashrc

Upgrade directory structure

The following example shows the directory structure after a container upgrade:

[root@npshost containerupgrade]# ls -l
total 24
drwx------. 2 root root 4096 May 14 06:46 backup_2026.05.14_1
-rwxrwxrwx. 1 root root  919 May 14 06:44 files_to_backup.conf
-rw-------. 1 root root   20 May 14 06:46 last_backup.txt

The files and directories in the upgrade directory serve the following purposes:

  • backup_2026.05.14_1 — Backup folder that contains all backed-up files combined in a single tar archive.
  • files_to_backup.conf — List of files and directories to back up.
  • last_backup.txt — Identifies which backup version to restore on the container.

The backup folder contains the following files:

[root@npshost backup_2026.05.14_1]# ls -l
total 36
-rw-------. 1 root root   352 May 14 06:46 backup_metadata.txt
-rw-r--r--. 1 root root 30720 May 14 06:46 files_backup.tar
  • backup_metadata.txt — Lists the actual file paths that were backed up during the upgrade.
  • files_backup.tar — Archive that contains all folders and files to restore.