Forums

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

Cron expression for every 2 hours for Jira Backups

Bunty
Contributor
April 12, 2019

Hi Everyone,

We have added following cron expression in Jira to get Backups for every 2 hours.

0 */2 * * * ?

But we are getting backups for every 2 min.

Any help?

Thanks in Advance,

Bunty

4 answers

2 accepted

0 votes
Answer accepted
Payne
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.
April 15, 2019

Note that the first position is seconds, then minutes, then hours, so you want:

0 0 */2 * * ?

Bunty
Contributor
April 17, 2019

Thanks @Payne ,

It worked.

Like Payne likes this
0 votes
Answer accepted
Craig Castle-Mead
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.
April 12, 2019

And for next time you're looking to make/check a cron, there's some very useful online cron tools to assist - eg: http://www.cronmaker.com/

(or just google something like "online cron" if you forget that site)

 

CCM

1 vote
Gonchik Tsymzhitov
Community Champion
April 12, 2019

Hi! 

*/2 * * * *

 

But for what do you need that backup ? Maybe better to evaluate replication of DB ? 

Bunty
Contributor
April 14, 2019

Hi @Gonchik Tsymzhitov ,

We are getting XML backups for every 1 min with the expression you suggested.

Backup.PNGlinux.PNG

We are having issues with our hardware platform, till the issues got resolved we want to take the XML backups for every 2 hours.

Thanks,

Manikanta

0 votes
Dave Theodore [Coyote Creek Consulting]
Community Champion
April 12, 2019

Doing XML dumps is one of the most expensive operations you can ask Jira to do. It is really intended to be a migration method and not a backup method.  

Atlassian recommends using native database backup technology now, as Gonchik mentioned.  Here's the documentation from Atlassian with their official stance on this. Note the box in red.

Suggest an answer

Log in or Sign up to answer