Bug #34244
closedforeman-maintain on foreman 3.0.1 / Katello 4.2.1 doesn't contain mongo_db and pulp tar balls
Description
Hello,
Problem:
Our new Katello 4.2.1 server is not able to take valid backups with foreman-maintain.
The offline backups don’t contain the mongo_data.tar.gz or the pulp tar ball.
When I go to restore I get the following error:
root@katello04-> foreman-maintain restore /var/katello_backups/katello04/katello-backup-2022-01-07-12-59-18/
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
Expected outcome:
The foremain-maintain offline backups should produce valid backups with all the requisite files needed to do a restore
Our directory just has the following files in there:
root@katello03-> ll /var/katello_backups/katello04/katello-backup-2022-01-07-12-59-18/
total 445988rw-r–r–. 1 root root 2371127 Jan 7 13:00 config_files.tar.gz>
-rw-r–r–. 1 root root 39136 Jan 7 12:59 metadata.yml
-rw-r–r–. 1 root root 454275885 Jan 7 13:00 pgsql_data.tar.gz
[/var/katello_backups/katello04/katello-backup-2022-01-07-12-59-18]
root@katello03
An older version of Katello (3.18) has all the files needed and we can restore fine:
root@katello01-> ll
total 122460680
-rw-r–r–. 1 root root 8427463 Nov 5 17:21 config_files.tar.gz
-rw-r–r–. 1 root root 46021 Nov 5 17:20 metadata.yml
-rw-r–r–. 1 root root 95472160 Nov 5 17:26 mongo_data.tar.gz
-rw-r–r–. 1 root root 1635086649 Nov 5 17:26 pgsql_data.tar.gz
-rw-r–r–. 1 root root 123660687360 Nov 5 17:26 pulp_data.tar
[/var/katello_backups/katello01/katello-backup-2021-11-05-17-20-15]
Foreman and Proxy versions:
Foreman 3.0.1 and Katello 4.2.1
Foreman and Proxy plugin versions:
Distribution and version:
root@katello03-> cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
Updated by John Giordano over 2 years ago
I did some looking around and it appears that mongoDB isn’t part of Foreman 3.x and Katello 4.x anymore as I don’t see it running in the process list:
root@katello03-> ps auxwww | grep i mongo>
root 19288 0.0 0.0 112824 2320 pts/0 S+ 18:18 0:00 grep --color=auto -i mongo
[/var/katello_backups/katello03/katello-backup-2022-01-11-18-06-08]
root@katello03
also doesn’t look like any mongo packages are installed:
root@katello03-> rpm qa | grep -i mongo>
[/var/katello_backups/katello03/katello-backup-2022-01-11-18-06-08]
root@katello03
So one thing I think is that the foreman-maintain backup script shouldn’t be requiring the mongo tar ball but the other thing is it should still dump the pulp tar ball