Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure that the backup types match when doing incremental backups #891

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Jun 26, 2024

No description provided.

@evgeni
Copy link
Member Author

evgeni commented Jun 26, 2024

# foreman-maintain backup offline --incremental /var/off-size/katello-backup-2024-06-26-10-03-42/ /var/lol
Starting backup: 2024-06-26 10:32:22 +0000
Running preparation steps required to run the next scenarios
================================================================================
Make sure Foreman DB is up: 
/ Checking connection to the Foreman DB                               [OK]      
--------------------------------------------------------------------------------
Make sure Candlepin DB is up: 
- Checking connection to the Candlepin DB                             [OK]      
--------------------------------------------------------------------------------
Make sure Pulpcore DB is up: 
\ Checking connection to the Pulpcore DB                              [OK]      
--------------------------------------------------------------------------------


Running Backup
================================================================================
Check if the incremental backup has the right type:                   [FAIL]
The existing backup has PostgreSQL as a tarball, but the new one will have a dump.
--------------------------------------------------------------------------------
Scenario [Backup] failed.

The following steps ended up in failing state:

  [backup-incremental-parent-type]

Resolve the failed steps and rerun the command.
In case the failures are false positives, use
--whitelist="backup-incremental-parent-type"



Running Failed backup cleanup
================================================================================
Start applicable services: 

Starting the following service(s):
redis, postgresql, pulpcore-api, pulpcore-content, pulpcore-worker@1.service, pulpcore-worker@2.service, tomcat, dynflow-sidekiq@orchestrator, foreman, httpd, dynflow-sidekiq@worker-1, dynflow-sidekiq@worker-hosts-queue-1, foreman-proxy
- All services started                                                [OK]      
--------------------------------------------------------------------------------
Clean up backup directory:                                            [OK]
--------------------------------------------------------------------------------

Done with backup: 2024-06-26 10:32:23 +0000
Backup didn't finish. Incomplete backup was removed.

Gotta find out how to move that check to "prep"

@evgeni evgeni force-pushed the verify-increment-parent branch 2 times, most recently from 226da9a to beadad4 Compare July 10, 2024 09:26
@evgeni
Copy link
Member Author

evgeni commented Jul 10, 2024

@ehelms ready!

description 'Check if the incremental backup has the right type'
tags :backup
param :incremental_dir, 'Path to existing backup directory'
param :online_backup, 'Select for online backup', :flag => true, :default => false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the supposition that if this is not set, it defaults to offline backup?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

end

def run
return unless @incremental_dir
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This parameter is required right? So can this ever be true?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This parameter can be nil (as in: set to nil by the caller) when we're creating a non-incremental (=base) backup

@evgeni evgeni merged commit 9718669 into master Jul 11, 2024
8 checks passed
@evgeni evgeni deleted the verify-increment-parent branch July 11, 2024 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants