From f28b7476c8e521f7178337be31ae447d44827b7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Thu, 25 May 2023 12:11:24 +0100 Subject: [PATCH] stop masto server before backups to try to prevent ooms --- nixos/boxes/vpsfree1/backups.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/boxes/vpsfree1/backups.nix b/nixos/boxes/vpsfree1/backups.nix index c18e7e01..61021df9 100644 --- a/nixos/boxes/vpsfree1/backups.nix +++ b/nixos/boxes/vpsfree1/backups.nix @@ -25,8 +25,12 @@ in rec { repository = "b2:cyplo-restic-vpsfree"; backupPrepareCommand = '' mkdir -p ${containersBackupPath}/ + systemctl stop container@mastodon.service ${pkgs.podman}/bin/podman volume export woodpecker-server-data -o ${containersBackupPath}/woodpecker.tar ''; + backupCleanupCommand = '' + systemctl start container@mastodon.service + ''; timerConfig = { OnCalendar = "hourly"; }; environmentFile = "${config.sops.secrets.restic-backups-b2-environment.path}";