Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for periodic remove #6

Closed
darron1217 opened this issue Nov 27, 2017 · 11 comments
Closed

Support for periodic remove #6

darron1217 opened this issue Nov 27, 2017 · 11 comments

Comments

@darron1217
Copy link

It would be nice if we have a way to run remove-older-than periodically :)

How can we achieve it?

@Jack187
Copy link

Jack187 commented Nov 27, 2017

Hi darron,

it sounds familiar to the issue that I created.

#5

What do you think?

Regards,
Jack

@darron1217
Copy link
Author

@Jack187 Yep, it seems very silmilar for me, too :)
Anyway, @blacklabelops where are you?
I miss you.... :(

@blacklabelops
Copy link
Owner

Please give me another day :) Ill respond shortly.

@blacklabelops
Copy link
Owner

You can now define jobber cron jobs inside volumerize:

Example:

$ docker run -d \
    --name volumerize \
    -v jenkins_volume:/source:ro \
    -v backup_volume:/backup \
    -e "VOLUMERIZE_SOURCE=/source" \
    -e "VOLUMERIZE_TARGET=file:///backup" \
    -e "JOB_NAME2=RemoveOldBackups" \
    -e "JOB_COMMAND2=/etc/volumerize/remove-older-than 3D" \
    -e "JOB_TIME2=0 0 * * * *" \
    blacklabelops/volumerize

Note: Enumerated Jobber tasks must start with number 2 because 1 is held by the periodical backup task.

More details on how Jobber environment variables work: https://github.com/blacklabelops/jobber-cron

Note: blacklabelops/volumerizes is using Jobber version 1 not 2. I am currently not able to get Jobber running inside alpines latest docker image.

@darron1217
Copy link
Author

@blacklabelops Wow... the feedback is lightning fast 👍
I've learned many from your code. I really appreciate for that :)

@blacklabelops
Copy link
Owner

Please check functionality and give feedback.

@darron1217
Copy link
Author

@blacklabelops Yep, currently I'm testing it :)
It seems working now, but I need more test

@darron1217
Copy link
Author

darron1217 commented Nov 28, 2017

@blacklabelops It's working perfectly 👍
Is it working with X times?
e.g.

JOB_NAME2=RemoveOldBackups
JOB_NAME3=AnotherRemoveOldBackups
JOB_NAME4=YetAnotherRemoveOldBackups
...

@blacklabelops
Copy link
Owner

Yes, you can add as many jobs as you want.

Please close ticket when issue is resolved. It gives a better impression when the ticket owner closes a ticket and not the repository owner.

@darron1217
Copy link
Author

Thanks a lot :)

@blacklabelops
Copy link
Owner

Info:

  • You can list jobs with jobber list

  • You can test scheduled jobs with jobber test

dbuch0 added a commit to dbuch0/volumerize that referenced this issue Mar 21, 2018
Added a section for Additional Jobber Cron Jobs (mostly copied from comments in Closed Issue blacklabelops#6). Corrected example for 1 month in Enforcing Full Backups Periodically.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants