Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to safely backup jira-home automatically in Linux Server?

jachiev
Contributor
January 21, 2021

Hello,

Context:

I have a Jira Server instance running on a Linux server. I want every night the jira-home directory is backup in an X destination of the server. But as I want that to be automatic, I don't want to stop the Jira service to do this procedure.

As you know this jira-home directory is a "live" directory, it has a constant change in the files while the application runs.

I want to set up a cron job for this process, using the "rsycn" or "tar" command for that. where the source directory is the "live" directory home from jira.

My question is, is it safe to run any of these commands under a "live" source directory?

Data is not compromised/missing/corrupted?

If you have a better idea of how to achieve such a goal, I listen.

Thanks!

1 answer

1 accepted

0 votes
Answer accepted
Pramodh M
Community Champion
January 21, 2021

Hi @jachiev 

It's not recommended to run tar. 

Why?

Although it doesn't affect the running Jira process, as there will be write operations to Jira home directory and at that moment you are running tar, there will be some oddities (there might be duplicated files, missing files)

I recommend going with the Jira-backed zip file and if you can increase the resource of that server, that would suffice.

Thanks,
Pramodh

jachiev
Contributor
January 21, 2021

Hello @Pramodh M 

So you mean that I should use the automatic export system from JIRA software that exports XML backup into a zip file at <jira-home>/export?

I was thinking the same thing, But I also want to keep a backup on the attachments.

or did I misunderstood the solution?

thanks!

Pramodh M
Community Champion
January 21, 2021

Hi @jachiev 

If attachments are there - copy the attachments folder too, and once you import the zip file into a newly installed instance, all attachments will there.

Thanks,
Pramodh

Like • jachiev likes this
jachiev
Contributor
January 21, 2021

Hi @Pramodh M 

Oh, I see.

Ok, thanks for the clarification.

Pramodh M
Community Champion
January 21, 2021

Hi @jachiev 

Happy to help :-)

Please accept the answer if have answered your question

Thanks,
Pramodh

brbojorque
Community Champion
January 21, 2021

For large instances, Jira automated backup is often not recommended because it actually freezes the server every time it runs.

I've tried rsync and just run it during off-hours, it works great! 

If using AWS, let AWS create a backup instead of the application.

Like • jachiev likes this
Pramodh M
Community Champion
January 21, 2021

Using tar and then doing rsync of that tar file is not recommended, however, doing rsync as @brbojorque said works. remember off-hours.

If it's not a large instance go with a Jira-backed zip file. It would suffice.

Thanks,
Pramodh

Like • jachiev likes this
jachiev
Contributor
January 22, 2021

I think I will go with rsync, now that I know it is safe for the system to be used (taking in consideration that new data can be updated during the process and run that process during off-hours)

I would like to use the Jira automated backups, but with the use case, I just had this week. I also require to have the attachments to be available in a restore.

My proposal process for a script:

  1. dump the jira database into a tar file.
  2. rsync jira-home to an ABC-destination repo
  3. tar that ABC-destination repo after the rsync
  4. have both tar files available to be restored in a staging test server any time I want.
  5. rotate those tar files depending on the days old.

 

@brbojorque thanks for the info. Very helpful. I have the server in AZURE... I see your point. The problem is that I don't manage that admin interface. that is IT responsibility in my company. So I want to avoid any dependency because IT is not even in my timezone (which makes it very frustrating and difficult).

Thanks a lot for the inputs.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, confluence, loom, atlassian intelligence, ai notes, ai-powered meeting notes, atlassian community events, ace, confluence ai, loom ai integration, ai note-taking, atlassian ai features, team '25, atlassian live learning, confluence automation

Unlock AI-powered meeting notes: Join our live learning session! 📹

Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.

Register today!
AUG Leaders

Atlassian Community Events