mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-10 01:24:05 -05:00
fix backup service
This commit is contained in:
parent
b5f3463ee2
commit
1d55fff3a0
1 changed files with 6 additions and 4 deletions
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue