From 5470d4006db2286c98350735b5516c9d0b783771 Mon Sep 17 00:00:00 2001 From: DuN0z Date: Mon, 3 Nov 2025 09:59:17 +0100 Subject: [PATCH] =?UTF-8?q?Add:=20un=20peu=20de=20sobri=C3=A9t=C3=A9=20?= =?UTF-8?q?=C3=A9nerg=C3=A9tique?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../un-peu-de-sobriete-energetique.en.md | 48 +++++++++++++++++++ .../un-peu-de-sobriete-energetique.fr.md | 48 +++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 content/posts/un-peu-de-sobriete-energetique.en.md create mode 100644 content/posts/un-peu-de-sobriete-energetique.fr.md diff --git a/content/posts/un-peu-de-sobriete-energetique.en.md b/content/posts/un-peu-de-sobriete-energetique.en.md new file mode 100644 index 0000000..4a16765 --- /dev/null +++ b/content/posts/un-peu-de-sobriete-energetique.en.md @@ -0,0 +1,48 @@ ++++ +date = '2025-11-03T09:31:57+01:00' +draft = false +tags = [ "homelab" ] +title = 'A little energy-conciousness' ++++ + +I like when things take care of themselves. +But before you can automate backups, the machine to be backed up has to be awake. +Pennsardin — my big desktop tower running a RAID 5 array — has an annoying tendency to sleep deeply. + +Instead of leaving it powered on 24/7 just “for convenience,” I chose **energy sobriety**. +My main server stays on, but the others only wake up when they actually have work to do — +in this case, during nightly backups. + +A short Bash script, a bit of patience, and the process flows naturally. + +```bash +#!/usr/bin/env bash + +MAC="00:52:54:46:58:34" +echo "[+] Waking up Pennsardin via Wake-on-LAN" +wakeonlan ${MAC} + +echo "[+] Waiting for Pennsardin to respond" +until ping -c1 192.168.0.12 &>/dev/null; do + sleep 1 + printf "." +done +echo -e "\n[+] Pennsardin is online" + +echo "[+] Connecting to lomig@pennsardin ..." +exec ssh lomig@192.168.0.12 +``` + +Here’s the idea: + +1. A Wake-on-LAN packet brings the system out of its nap. +2. A simple loop waits for the first ping reply — making sure the machine is really awake. +3. Finally, an SSH connection triggers the backup sequence. + +This little ritual sums up my homelab philosophy perfectly: +automate without wasting. +You don’t need an always-on cluster to handle a few backups and a blog — just a bit of organization, restraint, and common sense. + +Next step? +Scheduling this wake-up via systemd, and letting Pennsardin go back to sleep once the backup is done. +A digital butler — punctual and energy-conscious. diff --git a/content/posts/un-peu-de-sobriete-energetique.fr.md b/content/posts/un-peu-de-sobriete-energetique.fr.md new file mode 100644 index 0000000..fdf060b --- /dev/null +++ b/content/posts/un-peu-de-sobriete-energetique.fr.md @@ -0,0 +1,48 @@ ++++ +date = '2025-11-03T09:31:57+01:00' +draft = false +tags = [ "homelab" ] +title = 'Un peu de sobriete energetique' ++++ + +J’aime bien quand les choses se font toutes seules. +Mais avant d’arriver à une sauvegarde automatique, encore faut-il que la machine à sauvegarder soit réveillée. +Et Pennsardin — ma grosse tour équipée d’un RAID 5 — a la fâcheuse tendance à dormir profondément. + +Plutôt que de la laisser tourner 24h/24 pour “gagner du temps”, j’ai préféré miser sur la **sobriété énergétique**. +Mon serveur principal reste allumé en permanence, mais les autres ne s’éveillent que quand c’est vraiment utile : +ici, pour les sauvegardes nocturnes. + +Un simple script Bash, un peu d’attente, et tout s’enchaîne tranquillement. + +```bash +#!/usr/bin/env bash + +MAC="00:52:54:46:58:34" +echo "[+] Réveil de Pennsardin via Wake-on-Lan" +wakeonlan ${MAC} + +echo "[+] Attente que Pennsardin soit joignable" +until ping -c1 192.168.0.12 &>/dev/null; do + sleep 1 + printf "." +done +echo -e "\n[+] Pennsardin en ligne" + +echo "[+] Connexion à dunoz@pennsardin ..." +exec ssh lomig@192.168.0.12 +``` + +Le principe est simple : + +1. Un Wake-on-LAN pour sortir la machine de sa sieste. +2. Une boucle qui attend le ping, histoire d’être sûr qu’elle a bien les yeux ouverts. +3. Et enfin, une connexion SSH pour déclencher la sauvegarde. + +Ce petit rituel résume bien la philosophie du homelab : +automatiser sans gaspiller. +On n’a pas besoin d’un cluster en éveil constant pour faire tourner trois sauvegardes et un blog — juste un peu d’organisation, de parcimonie et de bon sens. + +La prochaine étape ? +Planifier ce réveil via systemd et remettre Pennsardin en veille une fois la sauvegarde terminée. +Un majordome numérique, économe et ponctuel.