Proper Process for Backing up and Restoring Instances Without Using XML

Steve Schmidt
Contributor
July 3, 2019

I am new to Jira, but I have my production instance set up, and I have the xml backups tested and working.  Now I am trying to backup the directories/databases independently, as advised by Atlassian.

 

I cannot figure out the process for restoring my instance without the xml though.  I have tried following this page: https://confluence.atlassian.com/adminjiraserver/creating-a-test-environment-for-jira-966063324.html as my overall goal is to create a test environment that I can restore/destroy at will, but I constantly get errors when trying to copy over the directories or when I try to restore the database.  The one time I managed to get everything to start up correctly, it was missing a lot of data.

 

What is the proper process for restoring from backup when not using xml?  I am using pgadmin 4, postgres server, and have the same jira version installed on both environments.  Where do I go from there?  

1 answer

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 3, 2019

The "proper" process is pretty much what you are trying, and you suggest that you're getting a lot of it right, so we need to look at why it is not working for you.

The most simple process that works for me:

  • Assumes source and target are set up (almost) identically in terms of config.  Same versions of everything, same directory structure, same user directory (that one bites a lot harder than you might think when it's not)
  • Backup database with pgdump
  • Copy attachments from home/attachments directory to the home/attachments directory on the target
  • Restore database on target
  • Start target Jira, immediately re-index

There are other variations, including

  • taking the whole home directory (if you do that, you will need to override the database settings in dbconfig.xml to point the test system away from the production database to the one you are restoring the data into)
  • Master/slave database replication
  • Rsync or even share attachments (Jira isn't that bothered if attachments are missing/wrong - it doesn't significantly affect most stuff you want to test with)

So, we need an outline of what you are doing, in enough detail to start to focus on which parts might be going wrong.  What have you done that I've not covered or mentioned varying above?  What errors do you get when you try to start the target Jira?

Steve Schmidt
Contributor
July 3, 2019

Hi Nic,

  • Assumes source and target are set up (almost) identically in terms of config.  Same versions of everything, same directory structure, same user directory (that one bites a lot harder than you might think when it's not)

Im having a bit of a hard time with this one.  I know that my versions are the same, but since I didnt install the initial production version Im not sure how they have it set up.  They have both Jira Software and Jira service desk installed, but service desk is seemingly standalone, so do I need both?  If I do need both, does the installation/setup order matter?  Also, a consistent problem Im having is logging in doesnt work after I do get the instance up.  The admin account I set to be the same as production does not work for logging in (this should be the admin in the internal directory), neither does my external production admin.  When I run a query to see which user directory is being used it shows only internal and I tried it in the default position (1) and in position 0.  Neither allowed me in.

  • Backup database with pgdump

Can you explain pgdump?  I am using an existing pgadmin 4 install and I am having a hard time with restoring databases.  It works once in awhile but it seems to error a lot.  It wont even take a .sql file for restore (which happens to be what the program I use to backup puts the file into).  Besides a collation of C is there any other requirements?

  • Copy attachments from home/attachments directory to the home/attachments directory on the target

I was attempting to copy the entire installation/home directory to the new test directory, I imagine this would cover that, but it is something

  • Restore database on target

On target?  Im just assuming this means targetting the correct database during restore.

  • Start target Jira, immediately re-index

There are other variations, including

  • taking the whole home directory (if you do that, you will need to override the database settings in dbconfig.xml to point the test system away from the production database to the one you are restoring the data into)

I did modify dbconfig.xml to point to the new database.  Any other settings doing it this way?

  • Master/slave database replication

Can you elaborate?  Are you talking about automated replication between production and test?  Because that would be awesome.

  • Rsync or even share attachments (Jira isn't that bothered if attachments are missing/wrong - it doesn't significantly affect most stuff you want to test with)

 

Thanks in advance for your patience and help.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events