Description of problem: Satellite backup utility creates the full backup even after using the "snapshot" & "incremental" options. ~~~ # satellite-maintain backup snapshot --incremental /home/satellite-backup-6.4/satellite-backup-2019-11-21-10-53-51/ /home/incremental-satellite-backup-6.4/ ~~~ Tested this on 6.4, 6.5 & 6.6 ------------------------------ Sharing the reproducer details, I created the normal backup & then incremental snapshot backup, --- [root@host1 ~]# mkdir /home/satellite-backup-6.4 ; satellite-maintain backup offline --assumeyes /home/satellite-backup-6.4 Starting backup: 2019-11-21 10:53:51 +0530 Running preparation steps required to run the next scenarios ================================================================================ Make sure Foreman DB is up: / Checking connection to the Foreman DB [OK] -------------------------------------------------------------------------------- Setup hammer: Configuring Hammer CLI... Hammer admin password: [OK] -------------------------------------------------------------------------------- Running Backup ================================================================================ Confirm turning off services is allowed: WARNING: This script will stop your services. [OK] -------------------------------------------------------------------------------- Prepare backup Directory: Creating backup folder /home/satellite-backup-6.4/satellite-backup-2019-11-21-10-53-51 [OK] -------------------------------------------------------------------------------- Check if the directory exists and is writable: [OK] -------------------------------------------------------------------------------- Generate metadata: - Saving metadata to metadata.yml [OK] -------------------------------------------------------------------------------- Detect features available in the local proxy: [OK] -------------------------------------------------------------------------------- disable active sync plans: / Total 0 sync plans are now disabled. [OK] -------------------------------------------------------------------------------- Add maintenance_mode chain to iptables: [OK] -------------------------------------------------------------------------------- Stop applicable services: Stopping the following service(s): rh-mongodb34-mongod, postgresql, qdrouterd, qpidd, squid, pulp_celerybeat, pulp_resource_manager, pulp_streamer, pulp_workers, smart_proxy_dynflow_core, tomcat, dynflowd, httpd, puppetserver, foreman-proxy \ All services stopped [OK] -------------------------------------------------------------------------------- Backup config files: - Collecting config files to backup [OK] -------------------------------------------------------------------------------- Backup Pulp data: - Collecting Pulp data [OK] -------------------------------------------------------------------------------- Backup mongo offline: \ Collecting Mongo data [OK] -------------------------------------------------------------------------------- Backup Candlepin DB offline: - Collecting data from /var/lib/pgsql/data/ [OK] -------------------------------------------------------------------------------- Backup Foreman DB offline: Already done [OK] -------------------------------------------------------------------------------- Start applicable services: Starting the following service(s): rh-mongodb34-mongod, postgresql, qdrouterd, qpidd, squid, pulp_celerybeat, pulp_resource_manager, pulp_streamer, pulp_workers, smart_proxy_dynflow_core, tomcat, dynflowd, httpd, puppetserver, foreman-proxy / All services started [OK] -------------------------------------------------------------------------------- re-enable sync plans: - Total 0 sync plans are now enabled. [OK] -------------------------------------------------------------------------------- Remove maintenance_mode chain from iptables: [OK] -------------------------------------------------------------------------------- Compress backup data to save space: \ Compressing backup of Postgress DB \ Compressing backup of Mongo DB [OK] -------------------------------------------------------------------------------- Done with backup: 2019-11-21 11:18:32 +0530 **** BACKUP Complete, contents can be found in: /home/satellite-backup-6.4/satellite-backup-2019-11-21-10-53-51 **** [root@host1 ~]# cd /home/satellite-backup-6.4/ [root@host1 satellite-backup-6.4]# ls satellite-backup-2019-11-21-10-53-51 [root@host1 satellite-backup-6.4]# du -sh 16G . [root@host1 satellite-backup-6.4]# ls -lhS total 0 drwxrwx---. 2 root postgres 203 Nov 21 11:18 satellite-backup-2019-11-21-10-53-51 [root@host1 satellite-backup-6.4]# cd satellite-backup-2019-11-21-10-53-51/ [root@host1 satellite-backup-2019-11-21-10-53-51]# ls -lhS total 16G -rw-r--r--. 1 root root 13G Nov 21 11:10 pulp_data.tar -rw-r--r--. 1 root root 2.7G Nov 21 11:11 mongo_data.tar.gz -rw-r--r--. 1 root root 214M Nov 21 11:12 pgsql_data.tar.gz -rw-r--r--. 1 root root 52M Nov 21 11:02 config_files.tar.gz -rw-r--r--. 1 root root 75K Nov 21 10:54 metadata.yml [root@host1 satellite-backup-2019-11-21-10-53-51]# *************************** INCREMENTAL SNAPSHOT BACKUP *************************** [root@host1 /]# satellite-maintain backup snapshot --incremental /home/satellite-backup-6.4/satellite-backup-2019-11-21-10-53-51/ /home/incremental-satellite-backup-6.4/ Starting backup: 2019-11-21 11:51:34 +0530 Running preparation steps required to run the next scenarios ================================================================================ Make sure Foreman DB is up: / Checking connection to the Foreman DB [FAIL] Foreman DB is not responding. It needs to be up and running to perform the following steps -------------------------------------------------------------------------------- Continue with step [Start applicable services]?, [y(yes), n(no), q(quit)] y Start applicable services: Starting the following service(s): postgresql / All services started [OK] -------------------------------------------------------------------------------- Rerunning the check after fix procedure Make sure Foreman DB is up: - Checking connection to the Foreman DB [OK] -------------------------------------------------------------------------------- Setup hammer: [SKIPPED] Satellite server is not running. Hammer can't be setup now. -------------------------------------------------------------------------------- Running Backup ================================================================================ Confirm turning off services is allowed: WARNING: This script will stop your services. Do you want to proceed?, [y(yes), q(quit)] y [OK] -------------------------------------------------------------------------------- Prepare backup Directory: Creating backup folder /home/incremental-satellite-backup-6.4/satellite-backup-2019-11-21-11-51-33 [OK] -------------------------------------------------------------------------------- Check if the directory exists and is writable: [OK] -------------------------------------------------------------------------------- Check if backup is on different logical volume then the source: [OK] -------------------------------------------------------------------------------- Generate metadata: - Saving metadata to metadata.yml [OK] -------------------------------------------------------------------------------- Detect features available in the local proxy: [OK] -------------------------------------------------------------------------------- Prepare mount point for the snapshot: [OK] -------------------------------------------------------------------------------- disable active sync plans: / Total 0 sync plans are now disabled. [OK] -------------------------------------------------------------------------------- Add maintenance_mode chain to iptables: [OK] -------------------------------------------------------------------------------- Stop applicable services: Stopping the following service(s): rh-mongodb34-mongod, postgresql, qdrouterd, qpidd, squid, pulp_celerybeat, pulp_resource_manager, pulp_streamer, pulp_workers, smart_proxy_dynflow_core, tomcat, dynflowd, httpd, puppetserver, foreman-proxy - All services stopped [OK] -------------------------------------------------------------------------------- Backup config files: \ Collecting config files to backup [OK] -------------------------------------------------------------------------------- Create and mount snapshot of Mongo DB: | Mounting snapshot of Mongo DB on /var/snap/mongodb [OK] -------------------------------------------------------------------------------- Create and mount snapshot of Pulp data: \ Mounting snapshot of Pulp on /var/snap/pulp [OK] -------------------------------------------------------------------------------- Create and mount snapshot of Candlepin DB: / Mounting snapshot of Postgres on /var/snap/pgsql [OK] -------------------------------------------------------------------------------- Create and mount snapshot of Foreman DB: Snapshot of Postgres is already mounted [OK] -------------------------------------------------------------------------------- Start applicable services: Starting the following service(s): rh-mongodb34-mongod, postgresql, qdrouterd, qpidd, squid, pulp_celerybeat, pulp_resource_manager, pulp_streamer, pulp_workers, smart_proxy_dynflow_core, tomcat, dynflowd, httpd, puppetserver, foreman-proxy \ All services started [OK] -------------------------------------------------------------------------------- re-enable sync plans: / Total 0 sync plans are now enabled. [OK] -------------------------------------------------------------------------------- Remove maintenance_mode chain from iptables: [OK] -------------------------------------------------------------------------------- Backup Pulp data: \ Collecting Pulp data [OK] -------------------------------------------------------------------------------- Backup Candlepin DB offline: | Collecting data from /var/snap/pgsql/var/lib/pgsql/data [OK] -------------------------------------------------------------------------------- Backup Foreman DB offline: Already done [OK] -------------------------------------------------------------------------------- Backup mongo offline: / Collecting Mongo data [OK] -------------------------------------------------------------------------------- Remove the snapshot mount points: [OK] -------------------------------------------------------------------------------- Compress backup data to save space: | Compressing backup of Postgress DB | Compressing backup of Mongo DB [OK] -------------------------------------------------------------------------------- Done with backup: 2019-11-21 12:18:08 +0530 **** BACKUP Complete, contents can be found in: /home/incremental-satellite-backup-6.4/satellite-backup-2019-11-21-11-51-33 **** [root@host1 /]# cd /home/incremental-satellite-backup-6.4/ [root@host1 incremental-satellite-backup-6.4]# ls -lhS total 0 drwxrwx---. 2 root postgres 203 Nov 21 12:18 satellite-backup-2019-11-21-11-51-33 drwxrwx---. 2 root postgres 132 Nov 21 11:34 satellite-backup-2019-11-21-11-26-59 drwxrwx---. 2 root postgres 132 Nov 21 11:43 satellite-backup-2019-11-21-11-41-56 drwxrwx---. 2 root postgres 132 Nov 21 11:49 satellite-backup-2019-11-21-11-48-44 [root@host1 incremental-satellite-backup-6.4]# du -sh 15G . [root@host1 incremental-satellite-backup-6.4]# cd satellite-backup-2019-11-21-11-51-33/ [root@host1 satellite-backup-2019-11-21-11-51-33]# ls config_files.tar.gz metadata.yml mongo_data.tar.gz pgsql_data.tar.gz pulp_data.tar [root@host1 satellite-backup-2019-11-21-11-51-33]# ls -halt total 15G drwxrwx---. 2 root postgres 203 Nov 21 12:18 . -rw-r--r--. 1 root root 2.7G Nov 21 12:14 mongo_data.tar.gz -rw-r--r--. 1 root root 1.1K Nov 21 12:14 .mongo.snar -rw-r--r--. 1 root root 25K Nov 21 12:10 .postgres.snar -rw-r--r--. 1 root root 215M Nov 21 12:10 pgsql_data.tar.gz -rw-r--r--. 1 root root 13M Nov 21 12:05 .pulp.snar -rw-r--r--. 1 root root 12G Nov 21 12:05 pulp_data.tar -rw-r--r--. 1 root root 692K Nov 21 11:52 .config.snar -rw-r--r--. 1 root root 181K Nov 21 11:52 config_files.tar.gz -rw-r--r--. 1 root root 75K Nov 21 11:52 metadata.yml drwxr-xr-x. 6 root root 182 Nov 21 11:51 .. [root@host1 satellite-backup-2019-11-21-11-51-33]# Version-Release number of selected component (if applicable): 6.4, 6.5 & 6.6 How reproducible: Always Steps to Reproduce: 1. Create a normal backup using the first command & then the second command to get the incremental snapshot backup ~~~ # satellite-maintain backup offline --assumeyes /home/satellite-backup-6.4 ~~~ 2. Create the incremental snapshot backup using the following command, ~~~ # satellite-maintain backup snapshot --incremental /home/satellite-backup-6.4/satellite-backup-2019-11-21-10-53-51/ /home/incremental-satellite-backup-6.4/ ~~~ 3. Now compare both the tarballs, they should have almost the same size. Actual results: Creates the same full backup Expected results: Should create only incremental backup Additional info: Similar bugzilla, https://bugzilla.redhat.com/show_bug.cgi?id=1445989
*** Bug 1855891 has been marked as a duplicate of this bug. ***
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30369 has been resolved.
Can we get a release of foreman_maintain 0.5.z with this fix in it?
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Satellite Maintenance 6.7.4 Async Bug Fix Update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:4126