Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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 Community Leader Jan 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

Hello @Pramodh 

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 Community Leader Jan 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

Hi @Pramodh 

Oh, I see.

Ok, thanks for the clarification.

Pramodh Community Leader Jan 21, 2021

Hi @jachiev 

Happy to help :-)

Please accept the answer if have answered your question

Thanks,
Pramodh

brbojorque Community Leader Jan 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 Community Leader Jan 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

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

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you