Upgrading

Step 1 - Backup

It is recommended that you backup your database and modifications to Foreman files(config/settings.yaml, unattended installations etc). Most upgrades are safe but it never hurts to have a backup just in case.

MySQL database

The mysqldump command can be used to backup the contents of your MySQL database to a text file.

SQLite database

SQLite databases are all contained in a single file, so you can back them up by copying the file to another location.

PostgreSQL

The pg_dump command can be used to backup the contents of a PostgreSQL database to a text file.

Step 2 - Perform the upgrade

Now it's time to perform the actual upgrade. This process if different depending on how you downloaded Foreman. You only need to perform one of the following options.

Option 1 - Downloaded release (tar.bz2)

  1. Uncompress the new program archive in a new directory.
  2. Copy your database settings-file config/database.yml into the new config directory.
    if your database is a simple file (e.g. SQLite), don't forget to make it available in the new directory.

VERY IMPORTANT: do NOT overwrite config/settings.yml with the old one.

Option 2 - Upgrading from git

1. Go to the Foreman root directory and run the following command:

git pull
git submodule init
git submodule update

Option 3 - Upgrading from a package (RPM, DEB)

Simply update your package via your normally, and you can skip Step 4

Step 4 - Update the database

This step is the one that could change the contents of your database. Go to your new Foreman directory (or the git dir), then migrate your database:

rake db:migrate RAILS_ENV="production" 

Step 5 - Clean up

1. You should clear the cache and the existing sessions:

rake tmp:cache:clear
rake tmp:sessions:clear

2. Restart the application server (e.g. mongrel, thin, passenger)

Common issues

see Troubleshooting

Also available in: HTML TXT