#757 How does upgrades of instances installed from RPM work?
Closed: Fixed Opened by jhutar.

Hello. This is a great tool. Thank you for a lots of work done here!

This is more a question (2 questions) than an issue, although this could be understood as "please document this":

In case I'll install 1.0.1 version from RPMs and run it for some time, creating some content in it. What would be the process for me later when new version of Pagure will be released? Are there some DB upgrade scripts?

Is there some process on how to backup and restore an instance? Would DB dump + copy of /var/www/releases/ + /srv/git/ + /etc/httpd/conf.d/pagure.conf + /usr/share/pagure/pagure.wsgi be enough?

If this is not appropriate here, please feel free to point me to somewhere else.

Thank you very much in advance.


Hi,

This is totally the right place for questions and remarks (we could probably use a mailing list at one point, but we don't have one yet).

So, I just updated pagure.io to 1.1 and pagure.io is installed via RPM and there was a DB scheme change, so things are pretty fresh in my mind :)

The update went as follow:

  • yum update all the pagure pagure (there are 4, the main one, the event source service, the milter and the web-hook service)
  • cd /etc/pagure/ && alembic upgrade head
  • systemctl restart httpd pagure_milter pagure_ev postfix pagure_webhook to restart all the services

We're using alembic to perform the DB scheme changes (if there is a change to do to an existing table, if we need to add a table, we just re-run the createdb script cf Create the database in https://docs.pagure.org/pagure/install.html#set-up-pagure).

As for the backups, what you listed sounds good, you need to backup the DB, the git repos and then your configuration files, so maybe include /etc/pagure as well.

Did this answer your question? I have a PR coming up with more improvements to the documentation, maybe we can revisit this ticket after the PR is merged?

Thank you. This answered it perfectly! Feel free to close this ticket.

@pingou changed the status to Closed

Metadata