fix backup service

This commit is contained in:
TheWanderingCrow 2025-12-08 09:03:45 -05:00
parent b5f3463ee2
commit 1d55fff3a0

View file

@ -2,9 +2,11 @@
pkgs,
inputs,
...
}: let
}:
let
volumePath = "/overseer/services";
in {
in
{
systemd.tmpfiles.rules = [
"d ${volumePath}/flamesites 0750 crow"
"d ${volumePath}/flamesites/swgalaxyproject 0750 crow"
@ -13,7 +15,7 @@ in {
systemd.timers.flamesite-backup = {
enable = true;
wantedBy = ["timers.target"];
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "1hr";
OnUnitActiveSec = "1hr";
@ -24,7 +26,7 @@ in {
systemd.services.flamesite-backup = {
script = ''
${pkgs.podman}/bin/podman exec swgal_db_1 sh -c 'exec mysqldump --no-tablespaces -usgr_user -psgr_pass sgr_db' > ${volumePath}/flamesites/swgalaxyproject/db.sql
${pkgs.podman}/bin/podman exec nssbluegrass_db_1 sh -c 'exec mysqldump --no-tablespaces -unns_user -pnns_pass nns_db' > ${volumePath}/flamesites/nnsbluegrass/db.sql
${pkgs.podman}/bin/podman exec nnsbluegrass_db_1 sh -c 'exec mysqldump --no-tablespaces -unns_user -pnns_pass nns_db' > ${volumePath}/flamesites/nnsbluegrass/db.sql
'';
serviceConfig = {
Type = "oneshot";