Commit f8d2002 1 parent 35bc1dc commit f8d2002 Copy full SHA for f8d2002
File tree 2 files changed +20
-7
lines changed
2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 22
22
enable = true ;
23
23
} ;
24
24
25
+ environment . etc = {
26
+ "prune.sh" = {
27
+ enable = true ;
28
+ text = ''
29
+ borg prune -v --list /var/bak/websites --keep-within=7d
30
+ borg prune -v --list /var/bak/log --keep-within=7d
31
+ '' ;
32
+ } ;
33
+ } ;
34
+
35
+ services . cron = {
36
+ enable = true ;
37
+ # Run the prune script everyday at 2 AM
38
+ systemCronJobs = [
39
+ "0 2 * * * /etc/prune.sh"
40
+ ] ;
41
+ } ;
42
+
25
43
services . borgbackup = {
26
44
repos . "/var/bak/" = {
27
45
path = "/var/bak/" ;
Original file line number Diff line number Diff line change 41
41
settings . "multiple paths" = {
42
42
compress = true ;
43
43
files = [
44
- "/var/log/websites/nginx.log"
45
- "/var/log/websites/mail"
46
- "/var/log/websites/messages"
47
-
48
- "/var/log/dhcp/kea.log"
49
- "/var/log/dhcp/nginx.log"
50
- "/var/log/dhcp/messages"
44
+ "/var/log/websites/*"
45
+ "/var/log/dhcp/*"
51
46
] ;
52
47
53
48
postrotate = ''
You can’t perform that action at this time.
0 commit comments