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

Stash backup automatic delete old backups

Martin, SCM Support Feb 06, 2014

Hello

Is it possible over parameter or Properties to automatic delete old backupfiles?

i.ex. files older 14 days or keep only the last 30 backups?

Thanks

Martin

2 answers

1 accepted

0 votes
Answer accepted
Martin, SCM Support Feb 12, 2014

Hi all

Sure, with a cron job everything is possible. But we like solutions which give us all options included, like to gz the output, remove old backups, if we need it. :-)

So I will extend our backupscript with a delete command like this:

find /var/..../backups/* -mtime +30 -exec rm -f {} \;

Thanks

Martin

0 votes
Timothy Chin Community Leader Feb 06, 2014

I am quite sure that its not possible. Why not setup a cron to do it?

Charles O'Farrell Feb 07, 2014

Hi Martin,

As Timothy has stated - this is not currently possible. Is it possible to use a custom cron job instead?

Charles

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

3,259 views 1 22
Read article

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