Compare commits

..

3 commits

Author SHA1 Message Date
teutat3s 02629598aa
Merge pull request 'obs-portal: fix backups, docker command does not need a TTY' (#233) from obs-backup-fix into main
Reviewed-on: #233
Reviewed-by: b12f <b12f@noreply.git.pub.solar>
2024-09-09 15:43:14 +00:00
teutat3s 44f708ec76
obs-portal: run backups 1h later to avoid lock conflict
Some checks failed
Flake checks / Check (pull_request) Has been cancelled
2024-09-09 17:28:57 +02:00
teutat3s cd82b83427
obs-portal: fix backups, docker command does not
All checks were successful
Flake checks / Check (pull_request) Successful in 20m28s
need a TTY
2024-08-31 22:05:11 +02:00

View file

@ -154,11 +154,11 @@ in
"/tmp/obs-portal-backup.sql" "/tmp/obs-portal-backup.sql"
]; ];
timerConfig = { timerConfig = {
OnCalendar = "*-*-* 00:30:00 Etc/UTC"; OnCalendar = "*-*-* 01:30:00 Etc/UTC";
}; };
initialize = true; initialize = true;
backupPrepareCommand = '' backupPrepareCommand = ''
${pkgs.docker}/bin/docker exec -ti --user postgres obs-portal-db pg_dump obs > /tmp/obs-portal-backup.sql ${pkgs.docker}/bin/docker exec -i --user postgres obs-portal-db pg_dump obs > /tmp/obs-portal-backup.sql
''; '';
backupCleanupCommand = '' backupCleanupCommand = ''
rm /tmp/obs-portal-backup.sql rm /tmp/obs-portal-backup.sql