Skip to content

Commit

Permalink
add schedule parameter in config
Browse files Browse the repository at this point in the history
  • Loading branch information
creativeprojects committed Jul 3, 2020
1 parent b0dfe27 commit db4fd20
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/profile.go
Expand Up @@ -27,6 +27,7 @@ type Profile struct {
RunBefore []string `mapstructure:"run-before"`
RunAfter []string `mapstructure:"run-after"`
RunAfterFail []string `mapstructure:"run-after-fail"`
Schedule []string `mapstructure:"schedule"`
Environment map[string]string `mapstructure:"env"`
Backup *BackupSection `mapstructure:"backup"`
Retention *RetentionSection `mapstructure:"retention"`
Expand Down
64 changes: 64 additions & 0 deletions examples/linux.yaml
@@ -0,0 +1,64 @@
global:
default-command: version
initialize: false
priority: low

default:
env:
tmp: /tmp
password-file: key
repository: /tmp/backup

documents:
inherit: default
schedule: "*:0,15,30,45" # every 15 minutes
backup:
source: ~/Documents
snapshots:
tag: documents

self:
inherit: default
backup:
source: ./
snapshots:
tag: self

src:
inherit: default
initialize: true
lock: "/tmp/resticprofile-profile-src.lock"
backup:
check-before: true
exclude:
- /**/.git
exclude-caches: true
one-file-system: false
run-after: echo All Done!
run-before:
- echo Starting!
- ls -al ~/go
source:
- ~/go
tag:
- test
- dev
retention:
after-backup: true
before-backup: false
compact: false
keep-within: 30d
prune: true
snapshots:
tag:
- test
- dev

stdin:
inherit: default
backup:
stdin: true
stdin-filename: stdin-test
tag: stdin
snapshots:
tag: stdin

0 comments on commit db4fd20

Please sign in to comment.