From eb41c584051fa62cf9c995694806480ecb8d1968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 24 Oct 2023 18:49:26 +0200 Subject: [PATCH] fix and document backup & restore --- README.md | 6 ++++++ modules/nixos-wiki/backup.nix | 1 + 2 files changed, 7 insertions(+) diff --git a/README.md b/README.md index e5c33d3..053104e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ # nixos-wiki-infra This project contains everything to setup yourself a mirror of https://nixos.wiki/ + +After installing run: + +``` +systemctl start wiki-backup.service && systemctl start wiki-restore +``` diff --git a/modules/nixos-wiki/backup.nix b/modules/nixos-wiki/backup.nix index a5aeb58..7a57658 100644 --- a/modules/nixos-wiki/backup.nix +++ b/modules/nixos-wiki/backup.nix @@ -55,6 +55,7 @@ in serviceConfig = { ExecStart = [ + "${pkgs.coreutils}/bin/mkdir -p /var/backup" "${pkgs.wget}/bin/wget https://nixos.wiki/images/wikidump.xml.gz -O ${wikiDump}.new" "${pkgs.coreutils}/bin/mv ${wikiDump}.new ${wikiDump}" ];