Project

Profile

Help

Story #2901

As the admin user for a Pulp 2.11.z server running on RHEL 6.9, I am able to backup my database and import into a new Pulp 2.13.z server running on RHEL 7.3+

Added by kdelee@redhat.com over 2 years ago. Updated 6 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

100%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Documentation, Pulp 2
Complexity:
Smash Test:
Verified:
No
Verification Required:
Yes
Sprint:

Description

To support users migrating from RHEL 6 to RHEL 7, this migration should be both possible and well documented.

The only documentation I've found on docs.pulpproject.org are relatively brief and don't address this use case in particular. [0] They appear to have not changed from the the 2.11 version of the docs [1]

[0] http://docs.pulpproject.org/user-guide/server.html#backups
[1] http://docs.pulpproject.org/en/2.11/user-guide/server.html#backups


Checklist


Subtasks

Issue #2944: "incorrect header check" when searching for files restored from backupCLOSED - NOTABUGActions

History

#1 Updated by kdelee@redhat.com over 2 years ago

  • Assignee set to kdelee@redhat.com

#2 Updated by kdelee@redhat.com over 2 years ago

  • Private changed from No to Yes

#3 Updated by kdelee@redhat.com over 2 years ago

  • Status changed from NEW to ASSIGNED

#4 Updated by kdelee@redhat.com over 2 years ago

  • Private changed from Yes to No

#5 Updated by kdelee@redhat.com over 2 years ago

Due to https://pulp.plan.io/issues/2618 it seems that even if crane is set up correctly, a docker client on another host will not be able to fetch images from a 2.11 install on RHEL6 because it fails on the checksum verification.

If docker is able to make a connection and find the image, this may as good as it gets.

#6 Updated by kdelee@redhat.com about 2 years ago

Restore problems moved to issue #2944

#7 Updated by kdelee@redhat.com about 2 years ago

Tools for population and restore tests now live in https://github.com/PulpQE/pulp-migrate

#8 Updated by kdelee@redhat.com about 2 years ago

Created video to show successful backup/restore and it is posted to Pulp youtube channel:

https://youtu.be/CkCmTv2V-Qs

The docs for http://docs.pulpproject.org/user-guide/server.html#backups
Are reasonable but don't mention mongodump and mongorestore or SELinux issues users may face.

#9 Updated by kdelee@redhat.com about 2 years ago

  • Status changed from ASSIGNED to MODIFIED

#10 Updated by kdelee@redhat.com about 2 years ago

Merged ansible roles to pulp_packaging that perform this backup/restore process.

https://github.com/pulp/pulp_packaging/commit/05e9c1967fac6bd6beb2b4f50eea25b32ab9d913

#11 Updated by kdelee@redhat.com about 2 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Merged jenkins-job-builder definitions to pulp_packaging and updated jobs on jenkins. [0]

[0] https://github.com/pulp/pulp_packaging/pull/417

#12 Updated by kdelee@redhat.com about 2 years ago

In summary, this process is possible if the user does the following:

On the RHEL6 pulp 2.11.z install:

1) Stop the following services:

    - httpd
    - pulp_celerybeat
    - pulp_resource_manager
    - pulp_streamer
    - pulp_workers
    - qpidd

2) Dump mongodb database

mongodump --db pulp_database --out mongo_backup_dir

3) Backup file system locations. This could be done multiple ways. Here is one example:

tar -cjf etc_pki_pulp.tar.bz2 /etc/pki/pulp/
tar -cfj etc_pulp.tar.bz2 /etc/pulp/
tar -cfj var_lib_pulp.tar.bz2 /var/lib/pulp/

The services can now be restarted if desired.

These should then be transferred to the RHEL7 server.

On the RHEL7 pulp 2.13.z install: (Note: this assumes there is NO content on the pulp 2.13.z install)
1) Stop the following services:

    - httpd
    - pulp_celerybeat
    - pulp_resource_manager
    - pulp_streamer
    - pulp_workers
    - qpidd

2) Unpack the file system backups: (This assumes SELinux is enabled and runs restorcon on the files)

cd /
tar vxjf ${path_to_backups}/etc_pki_pulp.tar.bz2
restorcon -r /etc/pki/pulp
tar vxjf ${path_to_backups}/etc_pulp.tar.bz2
restorcon -r /etc/pulp
tar vxjf ${path_to_backups}/var_lib_pulp.tar.bz2
restorcon -r /var/lib/pulp

3) Drop the pulp database, restore old database, run pulp-manage-db

mongo pulp_database --eval 'db.dropDatabase()'
mongorestore ${path_to_backups}/mongo_backup_dir/
sudo -u apache pulp-manage-db

Then restart the services.

Now the content should be visible, any publish content will still be published.

If you sync the repos more content will likely appear because of changes in the plugins (especially docker and python).

#13 Updated by bmbouter 6 months ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF