Skip to content

Support offline restore on proxy deployments - #684

Draft
sjha4 wants to merge 2 commits into
theforeman:masterfrom
sjha4:proxy_restore
Draft

Support offline restore on proxy deployments#684
sjha4 wants to merge 2 commits into
theforeman:masterfrom
sjha4:proxy_restore

Conversation

@sjha4

@sjha4 sjha4 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Why are you introducing these changes? (Problem description, related links)

Support offline restore on proxies. Built on top of offline restore commit hence marking draft.

What are the changes introduced in this pull request?

  • Adds some proxy specific logic to offline restore to be able to run against proxy deployments.

How to test this pull request

  1. Set up a proxy
  2. Run foremanctl backup /tmp/backup --target-host proxy
  3. Run foremanctl restore /tmp/backup/backup_dir --target-host proxy --force

Checklist

  • Tests added/updated (if applicable)
  • Documentation updated (if applicable)

Chyenne8 and others added 2 commits July 15, 2026 13:44
Complete offline backup restore with validation, database/content restoration, and automatic redeployment. Includes safety checks to prevent accidental data loss.
@sjha4

sjha4 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

In first read of the PR, this should work with #611 with this so we can claim proxy backup-restore really brings proxy to backed up state. Otherwise we'll require a complete proxy sync after restore to handle container gateway. I'll test both PRs together and see if we need any updates.

@sjha4

sjha4 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

I did some testing of this with Cheyenne's restore PR and Ian's container_gateway PR with this. Was able to backup container_gateway DB and restore the DB and redeploy proxy with correct features, content and container_gateway. Will keep this in draft till the restore PR goes in so the commits can be cleaned up.

Backup on proxy with pulp and container_gateway

TASK [backup : Display backup completion] ********************************************************************************************************
ok: [localhost] => 
    msg: |-
        Backup completed successfully.
        Location: /tmp/backup/foreman-backup-20260723T130214
        Databases: pulp, container_gateway

Restore validate:

TASK [restore : Verify database dump files exist] ************************************************************************************************
ok: [localhost] => (item=pulp)
ok: [localhost] => (item=container_gateway)

Restore:

TASK [restore : Build database restore configuration] ********************************************************************************************
ok: [localhost] => (item=pulp)
ok: [localhost] => (item=container_gateway)

TASK [restore : Verify dump files exist] *********************************************************************************************************
ok: [localhost] => (item=pulp.dump)
ok: [localhost] => (item=container_gateway.dump)

TASK [restore : Drop existing databases] *********************************************************************************************************
changed: [localhost] => (item=pulp)
changed: [localhost] => (item=container_gateway)

TASK [restore : Create empty databases] **********************************************************************************************************
changed: [localhost] => (item=pulp)
changed: [localhost] => (item=container_gateway)

TASK [restore : Enable postgres_fdw extension for IOP databases] *********************************************************************************
skipping: [localhost] => (item=pulp) 
skipping: [localhost] => (item=container_gateway) 
skipping: [localhost]

TASK [restore : Restore databases from dump files] ***********************************************************************************************
changed: [localhost] => (item=pulp.dump → pulp)
changed: [localhost] => (item=container_gateway.dump → container_gateway)

@sjha4 sjha4 mentioned this pull request Jul 23, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants