From 2a96b70cc232b7d91eb1f36846d70417d8b0d9e7 Mon Sep 17 00:00:00 2001 From: Bitcoin Txoko <142011724+bitcointxoko@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:44:40 +0200 Subject: [PATCH] Create backup.nix --- system/helpers/backup.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 system/helpers/backup.nix diff --git a/system/helpers/backup.nix b/system/helpers/backup.nix new file mode 100644 index 0000000..b7a1774 --- /dev/null +++ b/system/helpers/backup.nix @@ -0,0 +1,21 @@ + ### Backups + # Set this to enable nix-bitcoin's own backup service. By default, it + # uses duplicity to incrementally back up all important files in /var/lib to + # /var/lib/localBackups once a day. + { services.backups.enable = true; } + # + # You can pull the localBackups folder with + # `scp -r bitcoin-node:/var/lib/localBackups /my-backup-path/` + # Alternatively, you can also set a remote target url, for example + # services.backups.destination = "sftp://user@host[:port]/[relative|/absolute]_path"; + # Supply the sftp password by appending the FTP_PASSWORD environment variable + # to secrets/backup-encryption-env like so + # `echo "FTP_PASSWORD=" >> secrets/backup-encryption-env` + # You many also need to set a ssh host and publickey with + # programs.ssh.knownHosts."host" = { + # hostNames = [ "host" ]; + # publicKey = ""; + # }; + # If you also want to backup bulk data like the Bitcoin & Liquid blockchains + # and electrs data directory, enable + # services.backups.with-bulk-data = true;