Before upgrading SaltStack Config, you should always back up your data. The following sections explain which data needs to be backed up so that it can be restored after you complete the upgrade process.

Back up SaltStack Config files and directories

The following files and directories contain your custom SaltStack Config configurations and need to be backed up before upgrading:

  1. On the RaaS node, back up these entire directories:
    • /etc/raas/raas
    • /etc/raas/raas.secconf
    • /var/log/raas
    • /etc/raas/pki/

    The pki directory contains hidden files, so ensure you back up the entire directory.Backing up the log files in the /var/log/raas directory is optional. During the upgrade process, you’ll clear the log files to provide a clean log file if troubleshooting is necessary.

  2. On each Salt master, back up the /etc/salt/master.d/raas.conf and /etc/salt/master.d/eAPIMasterPaths.conf files.

    Depending on how you initially installed SaltStack Config, the eAPI Salt master paths could instead be in the /etc/salt/master.d/raas.conf file instead.

After backing up the SaltStack Config and Salt master files, proceed to the next section.

Back up your database schema

When upgrading your RaaS node, the database schema is updated. For that reason, ensure you create a backup of your database before the upgrade.

To back up your database you need to first look up your PostgreSQL database name and then copy the contents:

  1. On the PostgreSQL server, back up these files:
    • postgres.conf
    • pg_hba.conf
  2. Log in as the postgres user using the following command:
    sudo su - postgres
  3. Get your database name, using the following commands to enter PostgreSQL and then list the databases:
  4. To exit PostgreSQL and log out as the postgres user, press Ctrl+D and then run the following command:
  5. Copy database contents to a file. The following command gives an example:
    pg_dump -U salt_eapi raas_db_name > postgres_raas_backup_$(date +%Y-%m-%d).sql

Your database files are now backed up. For the latest information about performing backups, see PostgreSQL database backups.

What to do next

After backing up your data, the next step in the upgrade process is to update your SaltStack Config databases. See Upgrade databases for more information.