diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-08-29 11:43:45 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-08-29 11:43:45 +0200 |
commit | 3d925a4505e8b973bd9c55f0d33315be5441b4ac (patch) | |
tree | 6a837bca8f44383fc41dd2beb182b45fe3398a72 | |
parent | b688a1bbb953a7a98934406f9e50dc8d1c08313b (diff) | |
download | nixcfg-3d925a4505e8b973bd9c55f0d33315be5441b4ac.tar.gz nixcfg-3d925a4505e8b973bd9c55f0d33315be5441b4ac.zip |
move emails to lille
-rw-r--r-- | cluster/prod/app/email/deploy/email.hcl | 4 | ||||
-rwxr-xr-x | restic_restore_gen | 16 |
2 files changed, 18 insertions, 2 deletions
diff --git a/cluster/prod/app/email/deploy/email.hcl b/cluster/prod/app/email/deploy/email.hcl index bbe7c22..dc8fd76 100644 --- a/cluster/prod/app/email/deploy/email.hcl +++ b/cluster/prod/app/email/deploy/email.hcl @@ -1,5 +1,5 @@ job "email" { - datacenters = ["orion"] + datacenters = ["scorpio"] type = "service" priority = 65 @@ -31,7 +31,7 @@ job "email" { constraint { attribute = "${attr.unique.hostname}" operator = "=" - value = "doradille" + value = "ananas" } config { diff --git a/restic_restore_gen b/restic_restore_gen new file mode 100755 index 0000000..e4bf5cb --- /dev/null +++ b/restic_restore_gen @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +svc=$1 # dovecot, plume, cryptpad, or consul +commit=$2 # backup id you want to restore, from restic summary +target=$3 # where to restore + +cat <<EOF +PROOFREAD AND THEN COPY PASTE: +---------------------------------------------------------------------------- +export RESTIC_REPOSITORY=`pass deuxfleurs/backups/$svc/restic_repository` +export RESTIC_PASSWORD=`pass deuxfleurs/backups/$svc/restic_password` +export AWS_ACCESS_KEY_ID=`pass deuxfleurs/backups/$svc/aws_s3_access_key` +export AWS_SECRET_ACCESS_KEY=`pass deuxfleurs/backups/$svc/aws_s3_secret_key` +restic restore $commit --target $target +---------------------------------------------------------------------------- +EOF |