Migrate from centos 7 -> centos 8 with foreman 2.5.1 +katello

Hello,

I am testing a migration of foreman 2.5.1/katello 4.1.0 from centos7 to centos 8.5.2111.

The long-term goal here is to advance versions of foreman/katello to the latest, but first must begin with getting into centos 8.

The procedure:

  1. build a centos 8 system (not -stream)
  2. install foreman 2.5.1/Katello 4.1
  3. backup old foreman system (foreman 2.5.1/katello 4.1.0)
  4. restore to new foreman system (foreman 2.5.4 / katello 4.1.4 )

But I can’t do step 4 because step 3 is incomplete. The restore output is shown below.

It appears that I am missing mongo_data.tar.gz.

Rather than fix my foreman installation (I don’t want to spend/waste any time in 2.5.1) can I just do a mongodump and get the same thing?

Running Restore backup
================================================================================
Check if command is run as root user:                                 [OK]
--------------------------------------------------------------------------------
Validate backup has appropriate files:                                [FAIL]

The given directory does not contain the required files or has too many files

All backup directories contain: config_files.tar.gz
An online or remote database backup directory contains: mongo_dump, candlepin.dump, foreman.dump, pulpcore.dump
An offline backup directory contains: mongo_data.tar.gz, pgsql_data.tar.gz
A logical backup directory contains: mongo_dump, candlepin.dump, foreman.dump, pulpcore.dump, mongo_data.tar.gz, pgsql_data.tar.gz
Including pulp_data.tar is optional and will restore pulp data to the filesystem if included.

Only the following files were found: pgsql_data.tar.gz, config_files.tar.gz, metadata.yml

--------------------------------------------------------------------------------
Scenario [Restore backup] failed.```



**Foreman and Proxy versions:**


**Foreman and Proxy plugin versions:**

**Distribution and version:**

**Other relevant data:**
<!-- Managed client information, logs from Foreman and/or the Proxy, modified templates, commands issued, etc. For logs and configuration files, please use "preformatted text" from the toolbar to ensure proper formatting. -->

if you’re running 2.5/4.1, there is no mongodb anymore, but it seems you got an old/buggy foreman_maintain (0.8.6) with it.

you could try taking 0.8.21 from the 3.0 repos?

one more thing, after you have restored the backup on EL8, you need to reindex the database (runuser -u postgres -- reindexdb -a) as otherwise you might get index corruption.

newer foreman maintain takes care of that, but not the one in 2.5/3.0