chore: backup infrastructure configurations [skip ci]
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T02:45:43.537299+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T03:45:46.296248+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T04:45:48.832010+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T05:45:51.550362+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T06:45:54.168631+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T07:45:56.732196+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T08:45:59.323501+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T09:46:01.881548+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T10:46:04.441094+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T11:46:07.049448+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T12:46:09.634580+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T13:46:12.244418+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T14:46:14.839699+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T15:46:17.402279+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T16:46:20.027692+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T17:46:22.603017+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T18:46:25.134197+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T19:46:27.681285+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T20:46:30.405940+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T21:46:32.963094+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T22:46:35.557528+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-12T23:46:38.135492+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-13T00:46:40.732363+00:00"}
|
||||
@@ -0,0 +1 @@
|
||||
{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-01-13T01:46:43.318558+00:00"}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"backup_timestamp": "2026-01-12T02:01:44.758777",
|
||||
"total_keys": 765,
|
||||
"successful_backups": 760,
|
||||
"backup_timestamp": "2026-01-13T02:01:32.458030",
|
||||
"total_keys": 789,
|
||||
"successful_backups": 784,
|
||||
"failed_backups": 5,
|
||||
"consul_address": "http://consul.service.dc1.consul:8500"
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
{"conn_url":"postgres://192.168.4.227:5432/postgres","api_url":"http://192.168.4.227:8008/patroni","state":"running","role":"replica","version":"4.0.4","xlog_location":650048485496,"replication_state":"streaming","timeline":248}
|
||||
{"conn_url":"postgres://192.168.4.227:5432/postgres","api_url":"http://192.168.4.227:8008/patroni","state":"running","role":"replica","version":"4.0.4","xlog_location":651425742848,"replication_state":"streaming","timeline":248}
|
||||
@@ -1 +1 @@
|
||||
{"conn_url":"postgres://192.168.4.228:5432/postgres","api_url":"http://192.168.4.228:8008/patroni","state":"running","role":"primary","version":"4.0.4","xlog_location":650048485496,"timeline":248}
|
||||
{"conn_url":"postgres://192.168.4.228:5432/postgres","api_url":"http://192.168.4.228:8008/patroni","state":"running","role":"primary","version":"4.0.4","xlog_location":651423645696,"timeline":248}
|
||||
@@ -1 +1 @@
|
||||
{"conn_url":"postgres://192.168.4.36:5432/postgres","api_url":"http://192.168.4.36:8008/patroni","state":"running","role":"replica","version":"4.0.4","xlog_location":650048539360,"replication_state":"streaming","timeline":248}
|
||||
{"conn_url":"postgres://192.168.4.36:5432/postgres","api_url":"http://192.168.4.36:8008/patroni","state":"running","role":"replica","version":"4.0.4","xlog_location":651430854656,"replication_state":"streaming","timeline":248}
|
||||
@@ -1 +1 @@
|
||||
{"optime":650048485496,"slots":{"pg_odroid7":650048485496,"pg_opti1":650048485496,"pg_odroid8":650048485496},"retain_slots":["pg_odroid7","pg_odroid8","pg_opti1"]}
|
||||
{"optime":651423645696,"slots":{"pg_odroid7":651423645696,"pg_opti1":651423645696,"pg_odroid8":651423645696},"retain_slots":["pg_odroid7","pg_odroid8","pg_opti1"]}
|
||||
@@ -24,28 +24,6 @@ job "foodplanner" {
|
||||
}
|
||||
}
|
||||
|
||||
# Prestart restore task
|
||||
task "restore" {
|
||||
driver = "docker"
|
||||
lifecycle {
|
||||
hook = "prestart"
|
||||
sidecar = false
|
||||
}
|
||||
config {
|
||||
# image = "litestream/litestream:latest"
|
||||
image = "litestream/litestream:0.3"
|
||||
args = [
|
||||
"restore",
|
||||
# "-if-replica-exists",
|
||||
#"-if-db-not-exists",
|
||||
"-o", "/alloc/tmp/meal_planner.db",
|
||||
"sftp://root:odroid@192.168.4.63/mnt/Shares/litestream/foodplanner.db"
|
||||
]
|
||||
volumes = [
|
||||
"/opt/nomad/data:/data"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
task "app" {
|
||||
driver = "docker"
|
||||
@@ -53,16 +31,10 @@ job "foodplanner" {
|
||||
config {
|
||||
image = "ghcr.io/sstent/foodplanner:main"
|
||||
ports = ["http"]
|
||||
|
||||
# Mount the SQLite database file to persist data
|
||||
# Adjust the source path as needed for your environment
|
||||
volumes = [
|
||||
"/mnt/Public/configs/FoodPlanner_backups:/app/backups/",
|
||||
]
|
||||
}
|
||||
env {
|
||||
DATABASE_PATH = "/alloc/tmp"
|
||||
DATABASE_URL = "sqlite:////alloc/tmp/meal_planner.db"
|
||||
DATABASE_URL = "postgresql://postgres:postgres@master.postgres.service.dc1.consul/meal_planner"
|
||||
|
||||
}
|
||||
resources {
|
||||
cpu = 500
|
||||
@@ -78,22 +50,6 @@ job "foodplanner" {
|
||||
}
|
||||
}
|
||||
|
||||
# Litestream sidecar for continuous replication
|
||||
task "litestream" {
|
||||
driver = "docker"
|
||||
lifecycle {
|
||||
hook = "poststart" # runs after main task starts
|
||||
sidecar = true
|
||||
}
|
||||
config {
|
||||
# image = "litestream/litestream:0.5.0-test.10"
|
||||
image = "litestream/litestream:0.3"
|
||||
args = [
|
||||
"replicate",
|
||||
"/alloc/tmp/meal_planner.db",
|
||||
"sftp://root:odroid@192.168.4.63/mnt/Shares/litestream/foodplanner.db"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user