From 3f01f6be7384b4a8bc6184a6c1ad21fe4e38e85f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 15 Dec 2025 02:00:56 +0000 Subject: [PATCH] chore: backup infrastructure configurations [skip ci] --- consul_backup/fitbit-garmin-sync/config | 28 ++++++++++++++++++ .../logs/2025-12-14T19:48:56.903644+00:00 | 1 + .../logs/2025-12-14T21:32:33.227994+00:00 | 1 + .../records/76d66d18dbedbd5f04846fe39e5a5232 | 1 + .../records/e637f6df37d757ac3754b09ad1e4291a | 1 + consul_backup/metadata.json | 6 ++-- .../nomad/postgres/members/pg-odroid7 | 2 +- .../nomad/postgres/members/pg-odroid8 | 2 +- consul_backup/nomad/postgres/members/pg-opti1 | 2 +- consul_backup/nomad/postgres/status | 2 +- nomad_backup/fitbit-garmin-sync.hcl | 29 +++++++++++++++++++ 11 files changed, 68 insertions(+), 7 deletions(-) create mode 100644 consul_backup/fitbit-garmin-sync/config create mode 100644 consul_backup/fitbit-garmin-sync/logs/2025-12-14T19:48:56.903644+00:00 create mode 100644 consul_backup/fitbit-garmin-sync/logs/2025-12-14T21:32:33.227994+00:00 create mode 100644 consul_backup/fitbit-garmin-sync/records/76d66d18dbedbd5f04846fe39e5a5232 create mode 100644 consul_backup/fitbit-garmin-sync/records/e637f6df37d757ac3754b09ad1e4291a create mode 100644 nomad_backup/fitbit-garmin-sync.hcl diff --git a/consul_backup/fitbit-garmin-sync/config b/consul_backup/fitbit-garmin-sync/config new file mode 100644 index 0000000..83d0e85 --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/config @@ -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" + } +} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2025-12-14T19:48:56.903644+00:00 b/consul_backup/fitbit-garmin-sync/logs/2025-12-14T19:48:56.903644+00:00 new file mode 100644 index 0000000..ef19a71 --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/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-14T19:48:56.903644+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2025-12-14T21:32:33.227994+00:00 b/consul_backup/fitbit-garmin-sync/logs/2025-12-14T21:32:33.227994+00:00 new file mode 100644 index 0000000..bc11259 --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2025-12-14T21:32:33.227994+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"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/records/76d66d18dbedbd5f04846fe39e5a5232 b/consul_backup/fitbit-garmin-sync/records/76d66d18dbedbd5f04846fe39e5a5232 new file mode 100644 index 0000000..bbd41c4 --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/records/76d66d18dbedbd5f04846fe39e5a5232 @@ -0,0 +1 @@ +{"timestamp": "2025-12-10T05:57:53+00:00", "weight_kg": 92.305972, "source": "fitbit", "sync_id": "76d66d18dbedbd5f04846fe39e5a5232", "synced_to_garmin": true} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/records/e637f6df37d757ac3754b09ad1e4291a b/consul_backup/fitbit-garmin-sync/records/e637f6df37d757ac3754b09ad1e4291a new file mode 100644 index 0000000..8e26a57 --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/records/e637f6df37d757ac3754b09ad1e4291a @@ -0,0 +1 @@ +{"timestamp": "2025-12-14T05:25:49+00:00", "weight_kg": 91.85238, "source": "fitbit", "sync_id": "e637f6df37d757ac3754b09ad1e4291a", "synced_to_garmin": true} \ No newline at end of file diff --git a/consul_backup/metadata.json b/consul_backup/metadata.json index 35ef065..0a22a91 100644 --- a/consul_backup/metadata.json +++ b/consul_backup/metadata.json @@ -1,7 +1,7 @@ { - "backup_timestamp": "2025-12-14T02:00:54.744817", - "total_keys": 78, - "successful_backups": 73, + "backup_timestamp": "2025-12-15T02:00:55.909969", + "total_keys": 83, + "successful_backups": 78, "failed_backups": 5, "consul_address": "http://consul.service.dc1.consul:8500" } \ No newline at end of file diff --git a/consul_backup/nomad/postgres/members/pg-odroid7 b/consul_backup/nomad/postgres/members/pg-odroid7 index 9aa50b4..36609d8 100644 --- a/consul_backup/nomad/postgres/members/pg-odroid7 +++ b/consul_backup/nomad/postgres/members/pg-odroid7 @@ -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} \ No newline at end of file +{"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} \ No newline at end of file diff --git a/consul_backup/nomad/postgres/members/pg-odroid8 b/consul_backup/nomad/postgres/members/pg-odroid8 index 2304971..ec7a221 100644 --- a/consul_backup/nomad/postgres/members/pg-odroid8 +++ b/consul_backup/nomad/postgres/members/pg-odroid8 @@ -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} \ No newline at end of file +{"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} \ No newline at end of file diff --git a/consul_backup/nomad/postgres/members/pg-opti1 b/consul_backup/nomad/postgres/members/pg-opti1 index d561473..16efc2b 100644 --- a/consul_backup/nomad/postgres/members/pg-opti1 +++ b/consul_backup/nomad/postgres/members/pg-opti1 @@ -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} \ No newline at end of file +{"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} \ No newline at end of file diff --git a/consul_backup/nomad/postgres/status b/consul_backup/nomad/postgres/status index d7c1425..ecc41bf 100644 --- a/consul_backup/nomad/postgres/status +++ b/consul_backup/nomad/postgres/status @@ -1 +1 @@ -{"optime":612108514896,"slots":{"pg_odroid7":612108514896,"pg_opti1":612108514896,"pg_odroid8":612108514896},"retain_slots":["pg_odroid7","pg_odroid8","pg_opti1"]} \ No newline at end of file +{"optime":613267587488,"slots":{"pg_odroid7":613267587488,"pg_opti1":613267587488,"pg_odroid8":613267587488},"retain_slots":["pg_odroid7","pg_odroid8","pg_opti1"]} \ No newline at end of file diff --git a/nomad_backup/fitbit-garmin-sync.hcl b/nomad_backup/fitbit-garmin-sync.hcl new file mode 100644 index 0000000..cfcbbd8 --- /dev/null +++ b/nomad_backup/fitbit-garmin-sync.hcl @@ -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. + } + } +}