Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BorgBackup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ansible
Roles
BorgBackup
Commits
4e58c6b3
Commit
4e58c6b3
authored
9 months ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
ansible-inventories/lakedrops#93 Add borgmatic compact cron job once a month
parent
31606028
Branches
main
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tasks/app.yml
+1
-0
1 addition, 0 deletions
tasks/app.yml
tasks/config.yml
+12
-0
12 additions, 0 deletions
tasks/config.yml
with
13 additions
and
0 deletions
tasks/app.yml
+
1
−
0
View file @
4e58c6b3
...
@@ -51,6 +51,7 @@
...
@@ -51,6 +51,7 @@
content
:
|
content
:
|
55 */6 * * * PATH=$PATH:/usr/bin /usr/local/bin/borgmatic --stats -v 0 2>&1 && {{ lookup('healthchecks', '', user='root', jobname=['Backup', application, application_id]|join(' '), schedule='55 */6 * * *', disabled=crons_disabled|default(false)) }}
55 */6 * * * PATH=$PATH:/usr/bin /usr/local/bin/borgmatic --stats -v 0 2>&1 && {{ lookup('healthchecks', '', user='root', jobname=['Backup', application, application_id]|join(' '), schedule='55 */6 * * *', disabled=crons_disabled|default(false)) }}
30 23 1 * * PATH=$PATH:/usr/bin /usr/local/bin/borgmatic check -v 0 2>&1 && {{ lookup('healthchecks', '', user='root', jobname=['Check Backup', application, application_id]|join(' '), schedule='30 23 1 * *', disabled=crons_disabled|default(false)) }}
30 23 1 * * PATH=$PATH:/usr/bin /usr/local/bin/borgmatic check -v 0 2>&1 && {{ lookup('healthchecks', '', user='root', jobname=['Check Backup', application, application_id]|join(' '), schedule='30 23 1 * *', disabled=crons_disabled|default(false)) }}
30 23 5 * * PATH=$PATH:/usr/bin /usr/local/bin/borgmatic compact -v 0 2>&1 && {{ lookup('healthchecks', '', user='root', jobname=['Compact Backup', application, application_id]|join(' '), schedule='30 23 5 * *', disabled=crons_disabled|default(false)) }}
dest
:
'
{{
application_root
}}/borgconfig/crontab.txt'
dest
:
'
{{
application_root
}}/borgconfig/crontab.txt'
owner
:
root
owner
:
root
group
:
root
group
:
root
...
...
This diff is collapsed.
Click to expand it.
tasks/config.yml
+
12
−
0
View file @
4e58c6b3
...
@@ -72,6 +72,18 @@
...
@@ -72,6 +72,18 @@
tags
:
tags
:
-
cron
-
cron
-
name
:
Add cron job for compact
cron
:
name
:
borgmatic-check
day
:
5
hour
:
23
minute
:
30
cron_file
:
borgmatic
user
:
root
job
:
systemd-inhibit --why="Backup Compact is running" --who="Borg Compact" /usr/local/bin/borgmatic -v 1 compact > /var/log/borg-compact.log 2>&1 && {{ lookup('healthchecks', '', user='root', jobname='borgmatic-compact', schedule=['30','23','5','*','*']|join(' '), duration=7200) }}
tags
:
-
cron
-
name
:
Set PATH for borgmatic cron job.
-
name
:
Set PATH for borgmatic cron job.
cron
:
cron
:
cron_file
:
'
{{
item
}}'
cron_file
:
'
{{
item
}}'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment