From 276e0365b5b61db4dcff952304d86040973cf4fd Mon Sep 17 00:00:00 2001 From: Chaos Date: Sat, 29 Jul 2023 19:35:27 +0000 Subject: [PATCH] backup Public folder --- home/base/ssh.nix | 2 +- .../containers/storage/profiles/rclone-sync.nix | 10 ++++++++++ .../containers/storage/profiles/rclone_config.template | 10 ++++++++++ .../hetzner-vm/containers/storage/profiles/secrets.nix | 1 + 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/home/base/ssh.nix b/home/base/ssh.nix index e23d5f7..e48b8a2 100644 --- a/home/base/ssh.nix +++ b/home/base/ssh.nix @@ -2,7 +2,7 @@ programs.ssh.enable = true; programs.ssh.matchBlocks = lib.mkMerge - ((lib.forEach ["hetzner-vm" "vault" "vault-decrypt" "buildbox"] (hostname: { + ((lib.forEach ["hetzner-vm" "vault" "vault-decrypt"] (hostname: { "${hostname}" = { user = "root"; hostname = "${hostname}.servers.genderfucked.monster"; diff --git a/hosts/hetzner-vm/containers/storage/profiles/rclone-sync.nix b/hosts/hetzner-vm/containers/storage/profiles/rclone-sync.nix index d3bd664..3c4ee99 100644 --- a/hosts/hetzner-vm/containers/storage/profiles/rclone-sync.nix +++ b/hosts/hetzner-vm/containers/storage/profiles/rclone-sync.nix @@ -35,6 +35,11 @@ dest = "B2-Chaos-Personal:"; id = "chaos_b2_personal"; } + { + source = "StorageBox:Public"; + dest = "B2-Chaos-Public:"; + id = "chaos_b2_public"; + } # Pheonix System's B2 { source = "StorageBox:Backups"; @@ -56,6 +61,11 @@ dest = "B2-Phoenix-Cryptidz-Storage:Personal"; id = "phoenix_b2_personal"; } + { + source = "StorageBox:Public"; + dest = "B2-Phoenix-Cryptidz-Storage:Public"; + id = "phoenix_b2_public"; + } ]; }; } diff --git a/hosts/hetzner-vm/containers/storage/profiles/rclone_config.template b/hosts/hetzner-vm/containers/storage/profiles/rclone_config.template index 06cdb43..a10241b 100644 --- a/hosts/hetzner-vm/containers/storage/profiles/rclone_config.template +++ b/hosts/hetzner-vm/containers/storage/profiles/rclone_config.template @@ -56,6 +56,16 @@ hard_delete = true type = alias remote = B2-Chaos-Personal-Source:Chaos-Personal +[B2-Chaos-Public-Source] +type = b2 +account = B2_CHAOS_PUBLIC_ACCOUNT +key = B2_CHAOS_PUBLIC_KEY +hard_delete = true + +[B2-Chaos-Public] +type = alias +remote = B2-Chaos-Public-Source:Chaos-Public + [B2-Phoenix-Cryptidz-Storage-Source] type = b2 account = B2_PHOENIX_CRYPTIDZ_STORAGE_ACCOUNT diff --git a/hosts/hetzner-vm/containers/storage/profiles/secrets.nix b/hosts/hetzner-vm/containers/storage/profiles/secrets.nix index 532e949..8b072dd 100644 --- a/hosts/hetzner-vm/containers/storage/profiles/secrets.nix +++ b/hosts/hetzner-vm/containers/storage/profiles/secrets.nix @@ -125,6 +125,7 @@ simple_get_replace_b2 "/api-keys/backblaze/Chaos-Photos" "B2_CHAOS_PHOTOS" ./template simple_get_replace_b2 "/api-keys/backblaze/Chaos-Music" "B2_CHAOS_MUSIC" ./template simple_get_replace_b2 "/api-keys/backblaze/Chaos-Personal" "B2_CHAOS_PERSONAL" ./template + simple_get_replace_b2 "/api-keys/backblaze/Chaos-Public" "B2_CHAOS_PUBLIC" ./template simple_get_replace_b2 "/api-keys/backblaze/Phoenix-Cryptidz-Storage" "B2_PHOENIX_CRYPTIDZ_STORAGE" ./template PUTIO_PASSWORD="token/$(simple_get /api-keys/putio .oauth_token)"