Project

Profile

Help

Story #2901

closed

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 7 years ago. Updated over 5 years ago.

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

100%

Estimated time:
(Total: 0:00 h)
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Documentation, Pulp 2
Sprint:
Quarter:

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


Sub-issues 1 (0 open1 closed)

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

Updated by kdelee@redhat.com over 7 years ago

  • Assignee set to kdelee@redhat.com
Actions #2

Updated by kdelee@redhat.com over 7 years ago

  • Private changed from No to Yes
Actions #3

Updated by kdelee@redhat.com over 7 years ago

  • Status changed from NEW to ASSIGNED
Actions #4

Updated by kdelee@redhat.com over 7 years ago

  • Private changed from Yes to No
Actions #5

Updated by kdelee@redhat.com over 7 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.

Actions #6

Updated by kdelee@redhat.com over 7 years ago

Restore problems moved to issue #2944

Actions #7

Updated by kdelee@redhat.com over 7 years ago

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

Actions #8

Updated by kdelee@redhat.com over 7 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.

Actions #9

Updated by kdelee@redhat.com over 7 years ago

  • Status changed from ASSIGNED to MODIFIED
Actions #10

Updated by kdelee@redhat.com over 7 years ago

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

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

Actions #11

Updated by kdelee@redhat.com over 7 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

Actions #12

Updated by kdelee@redhat.com over 7 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).

Actions #13

Updated by bmbouter over 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF