chore: backup infrastructure configurations [skip ci]
This commit is contained in:
28
consul_backup/fitbit-garmin-sync/config
Normal file
28
consul_backup/fitbit-garmin-sync/config
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"garmin": {
|
||||||
|
"username": "stuart.stent@gmail.com",
|
||||||
|
"password": "Stainless7?Lisp?Strangle",
|
||||||
|
"is_china": false,
|
||||||
|
"session_data_file": "garmin_session.json"
|
||||||
|
},
|
||||||
|
"health_connect": {
|
||||||
|
"package_name": "androidx.health.connect.client"
|
||||||
|
},
|
||||||
|
"sync": {
|
||||||
|
"sync_interval_minutes": 60,
|
||||||
|
"lookback_days": 4,
|
||||||
|
"max_retries": 3,
|
||||||
|
"read_only_mode": false
|
||||||
|
},
|
||||||
|
"database": {
|
||||||
|
"path": "weight_sync.db"
|
||||||
|
},
|
||||||
|
"fitbit": {
|
||||||
|
"client_id": "22BQMP",
|
||||||
|
"client_secret": "280a9e3702af04f687a84862c3f6f6ac",
|
||||||
|
"access_token": "eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIyMkJRTVAiLCJzdWIiOiIyRk5WTkYiLCJpc3MiOiJGaXRiaXQiLCJ0eXAiOiJhY2Nlc3NfdG9rZW4iLCJzY29wZXMiOiJyc29jIHJzZXQgcmFjdCBybG9jIHJ3ZWkgcmhyIHJwcm8gcm51dCByc2xlIiwiZXhwIjoxNzY1NzQ5ODczLCJpYXQiOjE3NjU3MjEwNzN9.d8KqJuK7srtgfa38Ura1TyV2DQ1ImB4MMN81ebbg2bA",
|
||||||
|
"refresh_token": "fa132cacc175f660627effbc2915435f037e42cb3de9599284c7016d606d04f0",
|
||||||
|
"token_file": "fitbit_token.json",
|
||||||
|
"redirect_uri": "http://localhost:8080/fitbit-callback"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"sync_type": "weight_sync", "status": "success", "message": "Synced 1 records, 0 failed", "records_processed": 1, "timestamp": "2025-12-14T19:48:56.903644+00:00"}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"sync_type": "weight_sync", "status": "success", "message": "Synced 1 records, 0 failed", "records_processed": 1, "timestamp": "2025-12-14T21:32:33.227994+00:00"}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"timestamp": "2025-12-10T05:57:53+00:00", "weight_kg": 92.305972, "source": "fitbit", "sync_id": "76d66d18dbedbd5f04846fe39e5a5232", "synced_to_garmin": true}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"timestamp": "2025-12-14T05:25:49+00:00", "weight_kg": 91.85238, "source": "fitbit", "sync_id": "e637f6df37d757ac3754b09ad1e4291a", "synced_to_garmin": true}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"backup_timestamp": "2025-12-14T02:00:54.744817",
|
"backup_timestamp": "2025-12-15T02:00:55.909969",
|
||||||
"total_keys": 78,
|
"total_keys": 83,
|
||||||
"successful_backups": 73,
|
"successful_backups": 78,
|
||||||
"failed_backups": 5,
|
"failed_backups": 5,
|
||||||
"consul_address": "http://consul.service.dc1.consul:8500"
|
"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":612108514896,"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":613267585992,"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":612108514896,"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":613267587488,"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":612108513424,"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":613267803072,"replication_state":"streaming","timeline":248}
|
||||||
@@ -1 +1 @@
|
|||||||
{"optime":612108514896,"slots":{"pg_odroid7":612108514896,"pg_opti1":612108514896,"pg_odroid8":612108514896},"retain_slots":["pg_odroid7","pg_odroid8","pg_opti1"]}
|
{"optime":613267587488,"slots":{"pg_odroid7":613267587488,"pg_opti1":613267587488,"pg_odroid8":613267587488},"retain_slots":["pg_odroid7","pg_odroid8","pg_opti1"]}
|
||||||
29
nomad_backup/fitbit-garmin-sync.hcl
Normal file
29
nomad_backup/fitbit-garmin-sync.hcl
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
job "fitbit-garmin-sync" {
|
||||||
|
datacenters = ["dc1"]
|
||||||
|
type = "service"
|
||||||
|
|
||||||
|
group "sync" {
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
task "fitbit-garmin-sync" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "gitea.service.dc1.fbleagh.duckdns.org/sstent/fitbit_garmin_sync:latest"
|
||||||
|
volumes = [
|
||||||
|
"/mnt/Public/configs/fitbit-garmin-sync:/app/data"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
# Sensible resource allocation for a lightweight Python script.
|
||||||
|
resources {
|
||||||
|
cpu = 100 # MHz
|
||||||
|
memory = 128 # MB
|
||||||
|
}
|
||||||
|
|
||||||
|
# The service does not expose any ports.
|
||||||
|
# The application is a scheduled job, not a long-running service.
|
||||||
|
# The command to run is defined in the Dockerfile ENTRYPOINT and CMD.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user