2023-08-03 16:55:00 +00:00
|
|
|
job "lidarr" {
|
|
|
|
schedule = "@daily"
|
|
|
|
|
|
|
|
config {
|
2023-11-07 00:35:02 +00:00
|
|
|
repo = "s3://backups-minio.agnosticfront.thefij:8443/nomad/lidarr"
|
2023-08-03 16:55:00 +00:00
|
|
|
passphrase = env("BACKUP_PASSPHRASE")
|
2023-11-07 00:35:02 +00:00
|
|
|
|
|
|
|
options {
|
|
|
|
InsecureTls = true
|
|
|
|
}
|
2023-08-03 16:55:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
task "Backup main database" {
|
|
|
|
postgres "Backup database" {
|
2023-08-29 19:52:26 +00:00
|
|
|
hostname = env("POSTGRES_HOST")
|
|
|
|
port = env("POSTGRES_PORT")
|
|
|
|
username = env("POSTGRES_USER")
|
|
|
|
password = env("POSTGRES_PASSWORD")
|
2023-08-03 16:55:00 +00:00
|
|
|
database = "lidarr"
|
|
|
|
no_tablespaces = true
|
|
|
|
dump_to = "/data/nas-container/lidarr/Backups/dump-lidarr.sql"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task "Backup logs database" {
|
|
|
|
postgres "Backup database" {
|
2023-08-29 19:52:26 +00:00
|
|
|
hostname = env("POSTGRES_HOST")
|
|
|
|
port = env("POSTGRES_PORT")
|
|
|
|
username = env("POSTGRES_USER")
|
|
|
|
password = env("POSTGRES_PASSWORD")
|
2023-08-03 16:55:00 +00:00
|
|
|
database = "lidarr-logs"
|
|
|
|
no_tablespaces = true
|
|
|
|
dump_to = "/data/nas-container/lidarr/Backups/dump-lidarr-logs.sql"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
backup {
|
|
|
|
paths = ["/data/nas-container/lidarr"]
|
|
|
|
|
|
|
|
backup_opts {
|
2023-11-08 00:50:02 +00:00
|
|
|
Exclude = [
|
|
|
|
"lidarr_backup_*.zip",
|
|
|
|
"/data/nas-container/lidarr/MediaCover",
|
|
|
|
"/data/nas-container/lidarr/logs",
|
|
|
|
]
|
2023-08-03 16:55:00 +00:00
|
|
|
Host = "nomad"
|
|
|
|
}
|
|
|
|
|
|
|
|
restore_opts {
|
|
|
|
Host = ["nomad"]
|
|
|
|
# Because path is absolute
|
|
|
|
Target = "/"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
forget {
|
|
|
|
KeepLast = 2
|
|
|
|
KeepDaily = 30
|
|
|
|
KeepWeekly = 8
|
|
|
|
KeepMonthly = 6
|
|
|
|
KeepYearly = 2
|
|
|
|
Prune = true
|
|
|
|
}
|
|
|
|
}
|