Skip to content

Commit 388cbcc

Browse files
committed
Merge pull request #2 from tedivm/timing
Offset different backups time/hour so they don't start at once
2 parents 03c7c5d + 19b139f commit 388cbcc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

manifests/server/config.pp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,24 +95,24 @@
9595
command => "${rsnapshot::server::cmd_rsnapshot} -c ${config_file} daily",
9696
user => $server_user,
9797
hour => $backup_time_hour,
98-
minute => $backup_time_minute
98+
minute => ($backup_time_minute + 50) % 60
9999
} ->
100100

101101
## weekly
102102
cron { "rsnapshot-${name}-weekly" :
103103
command => "${rsnapshot::server::cmd_rsnapshot} -c ${config_file} weekly",
104104
user => $server_user,
105105
hour => ($backup_time_hour + 3) % 24,
106-
minute => $backup_time_minute,
106+
minute => ($backup_time_minute + 50) % 60,
107107
weekday => $backup_time_weekday
108108
} ->
109109

110110
## monthly
111111
cron { "rsnapshot-${name}-monthly" :
112112
command => "${rsnapshot::server::cmd_rsnapshot} -c ${config_file} monthly",
113113
user => $server_user,
114-
hour => ($backup_time_hour + 6) % 24,
115-
minute => $backup_time_minute,
114+
hour => ($backup_time_hour + 7) % 24,
115+
minute => ($backup_time_minute + 50) % 60,
116116
monthday => $backup_time_dom
117117
}
118118

0 commit comments

Comments
 (0)