From 0b32b3c8b2f3c1680a4cc3b7d9c329ee15b6a55e Mon Sep 17 00:00:00 2001 From: Lyn Date: Sat, 17 Feb 2024 05:44:04 +0100 Subject: [PATCH] this finally works phew --- backup.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backup.nix b/backup.nix index dba4cc5..ebf08b2 100644 --- a/backup.nix +++ b/backup.nix @@ -8,11 +8,11 @@ let #stop forgejo systemctl stop forgejo.service # MySQL-Backup - MYSQL_OPTION_FILE="/etc/nixos/dbauth.cnf" MYSQL_DATABASE="forgejodb" - mysqldump --defaults-file="${MYSQL_OPTION_FILE}" $MYSQL_DATABASE > /borgbackupcache/forgejobackup.sql + ${pkgs.mariadb}/bin/mysqldump -u root ''${MYSQL_DATABASE} > /borgbackupcache/forgejobackup.sql # BorgBackup - export BORG_REPO="ssh://backup@cloud.shibe.pro://mnt/onedrive/Backups/borg" + export BORG_PASSCOMMAND="cat /etc/nixos/borgpassword" + export BORG_REPO="backup@cloud.shibe.pro:/mnt/onedrive/Backups/borg/forgejo" export BACKUP_NAME="forgejo-$(date +%Y-%m-%d)" # Add everything to be backed up @@ -39,7 +39,7 @@ let systemd.services.borg-backup = { description = "Borg Backup for Forgejo and MySQL"; serviceConfig = { - ExecStart = "${forgejo-borgbackup}"; + ExecStart = "${forgejo-borgbackup}/bin/forgejo-borgbackup"; User = "root"; }; wantedBy = [ "multi-user.target" ]; @@ -53,4 +53,4 @@ let Persistent = true; }; }; - } \ No newline at end of file + }