restic-scheduler/test/test.hcl

42 lines
654 B
HCL
Raw Normal View History

2022-02-23 00:39:01 +00:00
job "TestBackup" {
2022-04-13 05:28:28 +00:00
schedule = "* * * * *"
2022-02-23 00:39:01 +00:00
config {
2022-04-13 05:28:28 +00:00
repo = "test/data/backups"
2022-02-23 00:39:01 +00:00
passphrase = "supersecret"
options {
2022-04-13 05:28:28 +00:00
CacheDir = "test/data/cache"
2022-02-23 00:39:01 +00:00
}
}
2022-04-13 05:28:28 +00:00
task "create test data" {
pre_script {
on_backup = "echo test > test/data/data/test.txt"
2022-02-23 00:39:01 +00:00
}
}
2022-04-13 05:28:28 +00:00
task "backup phases" {
pre_script {
on_backup = "echo 'pre-backup'"
on_restore = "echo 'pre-restore'"
}
2022-04-13 05:28:28 +00:00
post_script {
on_backup = "echo 'post-backup'"
on_restore = "echo 'post-restore'"
2022-02-23 00:39:01 +00:00
}
}
2022-04-13 05:28:28 +00:00
backup {
paths = ["./test/data/data"]
restore_opts {
Target = "."
2022-02-23 00:39:01 +00:00
}
}
forget {
KeepLast = 2
}
}