feat: backup configs

This commit is contained in:
2025-01-28 17:52:58 -08:00
parent 5e5cce5470
commit 600cc2b8e3
7 changed files with 711 additions and 14 deletions
Executable
+12
View File
@@ -0,0 +1,12 @@
servers=("prod" "irc" "fedi" "matrix" "gitea")
for server in "${servers[@]}"
do
echo "Pushing $server"
server_ip=$(ssh -o IdentityAgent=~/.1password/agent.sock $server "hostname -I | cut -d' ' -f1")
echo "Server IP: $server_ip"
rsync --archive -e "ssh -o IdentityAgent=~/.1password/agent.sock" configs/$server.conf root@$server_ip:/etc/nginx/conf.d/server.conf
ssh -o IdentityAgent=~/.1password/agent.sock root@$server_ip "systemctl restart nginx"
done