mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 05:36:59 +01:00
Move backup to Hetzner's storage box
This commit is contained in:
parent
8c4e559348
commit
ff0abf6309
4 changed files with 32 additions and 18 deletions
|
|
@ -1,5 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
{ config, lib, pkgs, ... }: {
|
||||
imports = [
|
||||
../environment.nix
|
||||
../hardware/hcloud.nix
|
||||
|
|
@ -8,7 +7,10 @@
|
|||
../modules/monitoring-exporters.nix
|
||||
];
|
||||
|
||||
networking.firewall.interfaces."eth1".allowedTCPPorts = [ config.services.prometheus.exporters.node.port config.services.postgresql.port ];
|
||||
networking.firewall.interfaces."eth1".allowedTCPPorts = [
|
||||
config.services.prometheus.exporters.node.port
|
||||
config.services.postgresql.port
|
||||
];
|
||||
|
||||
sops.secrets = {
|
||||
borgSshKey = {
|
||||
|
|
@ -20,6 +22,7 @@
|
|||
custom = {
|
||||
services.backup-job = {
|
||||
enable = true;
|
||||
repoName = "db1";
|
||||
readWritePaths = [ "/nix/var/data/postgresql" "/nix/var/data/backup/" ];
|
||||
preHook = ''
|
||||
${pkgs.postgresql_12}/bin/pg_dump -U synapse synapse > /nix/var/data/postgresql/synapse.dmp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue