Forums

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

Removing old Jira backup files from /var/atlassian/jira/export

Boyd K
Contributor
February 1, 2023

Using Jira Data Center 9.4.1, is there a way to automate or schedule the removal of backup files that are created under /var/atlassian/jira/export that are of a certain age, say older than 3 months or 1 month?  I suspect that I would need to come up with a cron job to execute a script that removes files per their timestamps.

Also, is there a way to change how Jira creates backup files, namely instead of YYYY-MMM-DD--hhmm.zip (2023-Feb-01--1200.zip), it would name it YYYY-MM-DD--hhmm.zip (2023-02-01--1200.zip)?

1 answer

1 accepted

0 votes
Answer accepted
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.
February 1, 2023

Three thoughts:

  1. It was possible to change the export file name format ages ago, but I seem to remember it went away at some point.
  2. I always used "logrotate" to kill them off.  But yes, cron is easy too:  
    1. A set of old files I need to archive, rather than delete, but:
    2. find /mnt/data/atlas/db -name "*.zip" -type f -mtime 14 -exec mv {} /mnt/atlas-db-archive \;
    3. moves them after they've not been updated for a fortnight.
  3. XML backups are not recommended for anything but a small Jira, and DC installs tend not to be small.  Backups of the database and attachments are when you need to be taking! 

When you're doing the backup "properly" (of course, I do not know your circumstances, so it may well be that XML is fine for you), turn of the XML, it's just burning electricity and disk space!

Boyd K
Contributor
February 3, 2023

Thanks, going to setup a scheduled task to execute such a command.

Like Nic Brough -Adaptavist- likes this

Suggest an answer

Log in or Sign up to answer