Skip to content

Commit 4dc1c76

Browse files
committed
chore: updates to run physical backups as a service (#1235)
* chore: init commence-backup service * chore: bump adminapi and adminmgr * chore: bump version * fix: provide correct filename
1 parent a2f1ff8 commit 4dc1c76

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

Diff for: ansible/files/adminapi.sudoers.conf

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Cmnd_Alias PGBOUNCER = /bin/systemctl start pgbouncer.service, /bin/systemctl st
1717
%adminapi ALL= NOPASSWD: /usr/bin/systemctl restart postgresql.service
1818
%adminapi ALL= NOPASSWD: /usr/bin/systemctl show -p NRestarts postgresql.service
1919
%adminapi ALL= NOPASSWD: /usr/bin/systemctl restart adminapi.service
20+
%adminapi ALL= NOPASSWD: /usr/bin/systemctl is-active commence-backup.service
21+
%adminapi ALL= NOPASSWD: /usr/bin/systemctl start commence-backup.service
2022
%adminapi ALL= NOPASSWD: /bin/systemctl daemon-reload
2123
%adminapi ALL= NOPASSWD: /bin/systemctl restart services.slice
2224
%adminapi ALL= NOPASSWD: /usr/sbin/nft -f /etc/nftables/supabase_managed.conf

Diff for: ansible/files/commence-backup.service.j2

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[Unit]
2+
Description=Async commence physical backup
3+
4+
[Service]
5+
Type=simple
6+
User=adminapi
7+
ExecStart=/usr/bin/admin-mgr commence-backup --run-as-service true
8+
Restart=no
9+
OOMScoreAdjust=-1000
10+
11+
[Install]
12+
WantedBy=multi-user.target

Diff for: ansible/tasks/internal/admin-api.yml

+5
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@
7979
src: files/adminapi.service.j2
8080
dest: /etc/systemd/system/adminapi.service
8181

82+
- name: adminapi - create service file for commence backup process
83+
template:
84+
src: files/commence-backup.service.j2
85+
dest: /etc/systemd/system/commence-backup.service
86+
8287
- name: UFW - Allow connections to adminapi ports
8388
ufw:
8489
rule: allow

Diff for: ansible/vars.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ postgres_exporter_release_checksum:
5050
arm64: sha256:29ba62d538b92d39952afe12ee2e1f4401250d678ff4b354ff2752f4321c87a0
5151
amd64: sha256:cb89fc5bf4485fb554e0d640d9684fae143a4b2d5fa443009bd29c59f9129e84
5252

53-
adminapi_release: 0.68.0
54-
adminmgr_release: 0.22.1
53+
adminapi_release: 0.71.1
54+
adminmgr_release: 0.24.0
5555

5656
# Postgres Extensions
5757
postgis_release: "3.3.2"

0 commit comments

Comments
 (0)