Skip to content

Commit db4fd20

Browse files
add schedule parameter in config
1 parent b0dfe27 commit db4fd20

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

config/profile.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ type Profile struct {
2727
RunBefore []string `mapstructure:"run-before"`
2828
RunAfter []string `mapstructure:"run-after"`
2929
RunAfterFail []string `mapstructure:"run-after-fail"`
30+
Schedule []string `mapstructure:"schedule"`
3031
Environment map[string]string `mapstructure:"env"`
3132
Backup *BackupSection `mapstructure:"backup"`
3233
Retention *RetentionSection `mapstructure:"retention"`

examples/linux.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
global:
2+
default-command: version
3+
initialize: false
4+
priority: low
5+
6+
default:
7+
env:
8+
tmp: /tmp
9+
password-file: key
10+
repository: /tmp/backup
11+
12+
documents:
13+
inherit: default
14+
schedule: "*:0,15,30,45" # every 15 minutes
15+
backup:
16+
source: ~/Documents
17+
snapshots:
18+
tag: documents
19+
20+
self:
21+
inherit: default
22+
backup:
23+
source: ./
24+
snapshots:
25+
tag: self
26+
27+
src:
28+
inherit: default
29+
initialize: true
30+
lock: "/tmp/resticprofile-profile-src.lock"
31+
backup:
32+
check-before: true
33+
exclude:
34+
- /**/.git
35+
exclude-caches: true
36+
one-file-system: false
37+
run-after: echo All Done!
38+
run-before:
39+
- echo Starting!
40+
- ls -al ~/go
41+
source:
42+
- ~/go
43+
tag:
44+
- test
45+
- dev
46+
retention:
47+
after-backup: true
48+
before-backup: false
49+
compact: false
50+
keep-within: 30d
51+
prune: true
52+
snapshots:
53+
tag:
54+
- test
55+
- dev
56+
57+
stdin:
58+
inherit: default
59+
backup:
60+
stdin: true
61+
stdin-filename: stdin-test
62+
tag: stdin
63+
snapshots:
64+
tag: stdin

0 commit comments

Comments
 (0)