<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
      <title>~&#x2F;magostinelli - borg</title>
      <link>https://www.agostinelli.eu</link>
      <description>La casa delle mie passioni</description>
      <generator>Zola</generator>
      <language>it</language>
      <atom:link href="https://www.agostinelli.eu/tags/borg/rss.xml" rel="self" type="application/rss+xml"/>
      <lastBuildDate>Tue, 17 Feb 2026 00:00:00 +0000</lastBuildDate>
      <item>
          <title>Backup con Borg e Borgmatic</title>
          <pubDate>Tue, 17 Feb 2026 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://www.agostinelli.eu/blog/backup-con-borg-e-borgmatic/</link>
          <guid>https://www.agostinelli.eu/blog/backup-con-borg-e-borgmatic/</guid>
          <description xml:base="https://www.agostinelli.eu/blog/backup-con-borg-e-borgmatic/">&lt;h1 id=&quot;backup-con-borg-e-borgmatic&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#backup-con-borg-e-borgmatic&quot; aria-label=&quot;Anchor link for: backup-con-borg-e-borgmatic&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Backup con Borg e Borgmatic&lt;&#x2F;h1&gt;
&lt;p&gt;Se anche tu sei un self-host compulsivo, la questione dei &lt;strong&gt;backup&lt;&#x2F;strong&gt; non è una scelta, ma una &lt;strong&gt;necessità&lt;&#x2F;strong&gt;. Dopo anni di utilizzo e varie prove, su tutti i miei server, utilizzo Borg come software per il backup: non solo è molto affidabile (ho avuto bisogno del restore qualche volta) ma anche straordinariamente semplice da gestire.&lt;&#x2F;p&gt;
&lt;p&gt;In questo articolo ti mostrerò perché questi due software hanno conquistato il mio cuore (e i miei dati), come funzionano e soprattutto come iniziare a usarli nel tuo ambiente self-hosted.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;chi-e-borg-e-perche-dovresti-usarlo&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#chi-e-borg-e-perche-dovresti-usarlo&quot; aria-label=&quot;Anchor link for: chi-e-borg-e-perche-dovresti-usarlo&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Chi è Borg e Perché Dovresti Usarlo&lt;&#x2F;h2&gt;
&lt;p&gt;Borg (BorgBackup) è un software di backup dedicato alla deduplica, compressione e cifratura dei dati. Sviluppato in Python con componenti critici in C, è stato pensato fin dall&#x27;inizio per essere veloce, efficiente e sicuro. A differenza di soluzioni più tradizionali, Borg non crea semplici copie dei tuoi file, ma applica una serie di tecniche sofisticate per rendere i backup efficienti e gestibili.&lt;&#x2F;p&gt;
&lt;p&gt;Borgmatic è un&#x27;&lt;em&gt;estensione&lt;&#x2F;em&gt; di Borg e permette di configurare il nostro backup attraverso un unico file di configurazione.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;img.agostinelli.eu&#x2F;2026&#x2F;borg-logo.png&quot; alt=&quot;Borg&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;le-tre-caratteristiche-che-cambiano-il-gioco&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#le-tre-caratteristiche-che-cambiano-il-gioco&quot; aria-label=&quot;Anchor link for: le-tre-caratteristiche-che-cambiano-il-gioco&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Le Tre Caratteristiche che Cambiano il Gioco&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;Deduplica&lt;&#x2F;strong&gt;: Questo è il punto che rende Borg veramente speciale. Immagina di avere 100 GB di dati e di fare un backup ogni giorno. Con i backup tradizionali, finiresti per avere 2.8 TB di dati in un mese (100 GB × 28 giorni). Con Borg, se solo il 5% dei tuoi dati cambia ogni giorno, utilizzerai solo circa 140 GB di spazio totale (100 GB iniziali + 5 GB × 28 giorni). Borg identifica i file identici e i blocchi di dati duplicati, memorizzandoli una sola volta.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Compressione&lt;&#x2F;strong&gt;: Borg comprime i dati utilizzando algoritmi come ZSTD, riducendo ulteriormente lo spazio occupato. Un documento di testo compresso può ridursi del 90%, immagini del 20-30%, database del 40-60%. La compressione avviene durante il backup, non dopo, quindi non impatta sulla velocità di accesso ai dati ripristinati.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Cifratura&lt;&#x2F;strong&gt;: Tutti i tuoi backup sono cifrati end-to-end con AES-256. Significa che anche se qualcuno riuscisse ad accedere al tuo repository di backup, non potrebbe leggere nulla senza la passphrase. La cifratura viene applicata sia in transito (se usi SSH) che a riposo sul disco.&lt;&#x2F;p&gt;
&lt;p&gt;Grazie a queste tre caratteristiche puoi usare anche un servizio esterno per il tuo backup, cosi avrai i tuoi dati al sicuro in un luogo diverso rispetto a quello di dove girano i tuoi servizi.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;il-vantaggio-decisivo-point-in-time-recovery&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#il-vantaggio-decisivo-point-in-time-recovery&quot; aria-label=&quot;Anchor link for: il-vantaggio-decisivo-point-in-time-recovery&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Il Vantaggio Decisivo: Point-in-Time Recovery&lt;&#x2F;h2&gt;
&lt;p&gt;Tra le molte cose che Borg fa bene, il point-in-time recovery è una capacità che raramente ho visto in altri backup tools gratuiti. Cosa significa? Semplicemente che puoi ripristinare i tuoi dati a qualsiasi punto nel tempo in cui hai eseguito un backup.&lt;&#x2F;p&gt;
&lt;p&gt;Facciamo un esempio concreto. Sei lunedì alle 14:30 e realizzi che un file importante è stato eliminato accidentalmente venerdì scorso. Con Borg, puoi accedere al backup di giovedì mattina alle 08:00 e recuperare esattamente quello che ti serve. Non è &quot;il file è sparito, è perso per sempre&quot;, ma &quot;posso scegliere quale versione del mio sistema voglio ripristinare&quot;.&lt;&#x2F;p&gt;
&lt;p&gt;Questo funziona perché ogni volta che esegui un backup con Borg, viene creato un &quot;snapshot&quot; completo dello stato del tuo sistema in quel momento. Borg poi usa la deduplica per assicurarsi che lo spazio aggiuntivo necessario sia minimo, ma tu mantieni sempre accesso a qualsiasi versione precedente.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;borg-in-pratica-cosa-devi-sapere&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#borg-in-pratica-cosa-devi-sapere&quot; aria-label=&quot;Anchor link for: borg-in-pratica-cosa-devi-sapere&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Borg in Pratica: Cosa Devi Sapere&lt;&#x2F;h2&gt;
&lt;p&gt;Borg è estremamente flessibile e può essere usato in molti modi diversi. Ecco gli scenari che coprono la maggior parte dei casi d&#x27;uso:&lt;&#x2F;p&gt;
&lt;h3 id=&quot;local-to-local-il-backup-nel-tuo-ufficio&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#local-to-local-il-backup-nel-tuo-ufficio&quot; aria-label=&quot;Anchor link for: local-to-local-il-backup-nel-tuo-ufficio&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Local-to-Local: Il Backup nel Tuo Ufficio&lt;&#x2F;h3&gt;
&lt;p&gt;Il caso più semplice è fare il backup dei tuoi dati locali su un disco esterno o su un&#x27;altra partizione. È velocissimo e non richiede internet. Il comando base è:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;borg&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; init&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; --&lt;&#x2F;span&gt;encryption&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-option z-shell&quot;&gt;=&lt;&#x2F;span&gt;repokey &#x2F;mnt&#x2F;backup&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;borg&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; create &#x2F;mnt&#x2F;backup::&lt;span class=&quot;z-meta z-group z-expansion z-brace z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-section z-expansion z-brace z-begin z-shell&quot;&gt;{&lt;&#x2F;span&gt;now&lt;span class=&quot;z-punctuation z-section z-expansion z-brace z-end z-shell&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &#x2F;home&#x2F;utente&#x2F;dati&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Perfetto per chi vuole un backup fisico nelle vicinanze e non si preoccupa di perdere tutto se la casa prende fuoco (per quello servono i backup remoti).&lt;&#x2F;p&gt;
&lt;h3 id=&quot;self-hosted-il-backup-su-un-altro-server&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#self-hosted-il-backup-su-un-altro-server&quot; aria-label=&quot;Anchor link for: self-hosted-il-backup-su-un-altro-server&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Self-Hosted: Il Backup su un Altro Server&lt;&#x2F;h3&gt;
&lt;p&gt;Questo è il mio setup preferito per il self-hosting. Hai il tuo server principale dove girano Nextcloud, il tuo Git personale, la tua email, quello che vuoi. E hai un secondo server (anche molto meno potente) dove archi i backup.&lt;&#x2F;p&gt;
&lt;p&gt;Borg comunica via SSH e comprime&#x2F;cifra tutto prima di inviare i dati. Anche se il server di backup venisse compromesso, non potrebbero leggere nulla. Il comando diventa:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;borg&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; create ssh:&#x2F;&#x2F;utente@backup.example.com:22&#x2F;path&#x2F;to&#x2F;repo::&lt;span class=&quot;z-meta z-group z-expansion z-brace z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-section z-expansion z-brace z-begin z-shell&quot;&gt;{&lt;&#x2F;span&gt;now&lt;span class=&quot;z-punctuation z-section z-expansion z-brace z-end z-shell&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &#x2F;dati&#x2F;importanti&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Bellissimo, vero? Un server, una passphrase, tutto cifrato. E lo spazio utilizzato è ridicolmente piccolo grazie alla deduplica.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;un-dettaglio-fondamentale-il-modello-client-server&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#un-dettaglio-fondamentale-il-modello-client-server&quot; aria-label=&quot;Anchor link for: un-dettaglio-fondamentale-il-modello-client-server&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Un Dettaglio Fondamentale: Il Modello Client-Server&lt;&#x2F;h3&gt;
&lt;p&gt;C&#x27;è una cosa importante da capire se decidi di fare il backup su un server remoto: Borg deve essere &lt;strong&gt;installato su entrambe le macchine&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;A differenza di altri strumenti che usano il protocollo SFTP o rsync &quot;passivo&quot;, Borg utilizza un modello &lt;em&gt;client-server&lt;&#x2F;em&gt;. Quando avvii un backup, il tuo server locale (il client) si connette via SSH al server di destinazione e avvia un&#x27;istanza di Borg anche lì (il server).&lt;&#x2F;p&gt;
&lt;p&gt;Perché questa complicazione? In realtà è un enorme vantaggio per due motivi:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Efficienza: Il server remoto calcola localmente quali pezzi di dati possiede già, evitando di farti inviare file che sono già nel repository.&lt;&#x2F;li&gt;
&lt;li&gt;Integrità: Il processo remoto verifica che i dati arrivino correttamente e gestisce la scrittura sul disco in modo atomico.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Ad esempio, se stai usando una VPS Debian come destinazione, ricordati di fare un semplice &lt;code&gt;apt install borgbackup&lt;&#x2F;code&gt;, altrimenti il client non saprà con chi parlare e riceverai un errore del tipo &lt;em&gt;Remote: bash: borg: command not found&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;servizi-di-terze-parti-hetzner-e-simili&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#servizi-di-terze-parti-hetzner-e-simili&quot; aria-label=&quot;Anchor link for: servizi-di-terze-parti-hetzner-e-simili&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Servizi di Terze Parti: Hetzner e Simili&lt;&#x2F;h3&gt;
&lt;p&gt;Se non vuoi gestire il tuo server di backup, ci sono servizi come Hetzner Storage Box che offrono spazio di backup a costi molto bassi (qualche euro al mese per TB). Borg lavora perfettamente con loro e mantiene la stessa garanzia di cifratura end-to-end.&lt;&#x2F;p&gt;
&lt;p&gt;Ad esempio, Hetzner (non mi hanno sponsorizzato), offre un servizio molto economico e ben funzionante chiamato storage box: https:&#x2F;&#x2F;www.hetzner.com&#x2F;storage&#x2F;storage-box&#x2F;
(Ci sono pacchetti con vari tagli di spazio disco).&lt;&#x2F;p&gt;
&lt;h2 id=&quot;borg-e-l-ecosistema-self-hosted&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#borg-e-l-ecosistema-self-hosted&quot; aria-label=&quot;Anchor link for: borg-e-l-ecosistema-self-hosted&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Borg e l&#x27;Ecosistema Self-Hosted&lt;&#x2F;h2&gt;
&lt;p&gt;Due sistemi che uso hanno adottato Borg come soluzione di backup nativa:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;YunoHost&lt;&#x2F;strong&gt;: Se usi YunoHost per gestire il tuo server, i backup sono gestiti di default attraverso Borg. L&#x27;interfaccia web di YunoHost ti permette di configurare tutto con pochi click. Scegli la destinazione, inserisci i parametri (credenziali e url), e il sistema si occupa di tutto.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Nextcloud AIO (All-in-One)&lt;&#x2F;strong&gt;: Nextcloud AIO, il modo più moderno di deployare Nextcloud, ha integrato Borg come sistema di backup predefinito. Quando installi Nextcloud AIO, la possibilità di fare backup via Borg è già incorporata. Questo dovrebbe dirvi tutto quello che dovete sapere sulla fiducia che anche i principali progetti ripongono in Borg.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;borgmatic-quando-borg-diventa-semplice&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#borgmatic-quando-borg-diventa-semplice&quot; aria-label=&quot;Anchor link for: borgmatic-quando-borg-diventa-semplice&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Borgmatic: Quando Borg Diventa Semplice&lt;&#x2F;h2&gt;
&lt;p&gt;Borg è fantastico, ma ha una curva di apprendimento. I comandi sono molti, le opzioni sono numerose, e ricordare tutti i parametri ogni volta è difficile. Qui entra in gioco Borgmatic.&lt;&#x2F;p&gt;
&lt;p&gt;Borgmatic è uno strato di semplificazione costruito sopra Borg. È un software che prende un file di configurazione (YAML, molto leggibile) e trasforma complessi flussi di backup in un singolo comando: &lt;code&gt;borgmatic&lt;&#x2F;code&gt;. Non solo, ma Borgmatic aggiunge funzionalità utili come le notifiche, la verifica automatica dei backup, il controllo della salute del repository e molto altro.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;img.agostinelli.eu&#x2F;2026&#x2F;borgmatic.png&quot; alt=&quot;Borgmatic&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;configurare-borgmatic-un-esempio-pratico&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#configurare-borgmatic-un-esempio-pratico&quot; aria-label=&quot;Anchor link for: configurare-borgmatic-un-esempio-pratico&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Configurare Borgmatic: Un Esempio Pratico&lt;&#x2F;h3&gt;
&lt;p&gt;Per iniziare con Borgmatic, installa il pacchetto:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;pip&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; install&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; --&lt;&#x2F;span&gt;user&lt;&#x2F;span&gt; borgmatic&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Poi crea la directory di configurazione:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;p&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-group z-expansion z-tilde&quot;&gt;&lt;span class=&quot;z-variable z-language z-tilde z-shell&quot;&gt;~&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&#x2F;.config&#x2F;borgmatic&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;E un file di configurazione di base:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;yaml&quot; class=&quot;language-yaml z-code&quot;&gt;&lt;code class=&quot;language-yaml&quot; data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-yaml&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-line z-number-sign z-yaml&quot;&gt;#&lt;&#x2F;span&gt; Configurazione di Borgmatic - salva come ~&#x2F;.config&#x2F;borgmatic&#x2F;config.yaml
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;&lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;source_directories&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-punctuation z-definition z-block z-sequence z-item z-yaml&quot;&gt;-&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&#x2F;home&#x2F;utente&#x2F;documenti&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-punctuation z-definition z-block z-sequence z-item z-yaml&quot;&gt;-&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&#x2F;home&#x2F;utente&#x2F;progetti&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-punctuation z-definition z-block z-sequence z-item z-yaml&quot;&gt;-&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&#x2F;etc&#x2F;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;&lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;repositories&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-punctuation z-definition z-block z-sequence z-item z-yaml&quot;&gt;-&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;label&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;backup_principale&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;    &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;path&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&#x2F;mnt&#x2F;discoesterno&#x2F;backup&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;    &lt;span class=&quot;z-comment z-line z-number-sign z-yaml&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-line z-number-sign z-yaml&quot;&gt;#&lt;&#x2F;span&gt; Se vuoi un backup remoto SSH, usa questo:
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;    &lt;span class=&quot;z-comment z-line z-number-sign z-yaml&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-line z-number-sign z-yaml&quot;&gt;#&lt;&#x2F;span&gt; path: ssh:&#x2F;&#x2F;utente@backup.example.com:22&#x2F;backups&#x2F;mio_server
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;&lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;retention&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;keep_daily&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt; &lt;span class=&quot;z-constant z-numeric z-integer z-decimal z-yaml&quot;&gt;7&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;keep_weekly&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt; &lt;span class=&quot;z-constant z-numeric z-integer z-decimal z-yaml&quot;&gt;4&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;keep_monthly&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt; &lt;span class=&quot;z-constant z-numeric z-integer z-decimal z-yaml&quot;&gt;12&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;keep_yearly&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt; &lt;span class=&quot;z-constant z-numeric z-integer z-decimal z-yaml&quot;&gt;2&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;&lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;checks&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-punctuation z-definition z-block z-sequence z-item z-yaml&quot;&gt;-&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;name&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;repository&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;    &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;frequency&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;2 weeks&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-punctuation z-definition z-block z-sequence z-item z-yaml&quot;&gt;-&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;name&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;archives&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;    &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;frequency&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;4 weeks&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;&lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;hooks&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;before_backup&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;    &lt;span class=&quot;z-punctuation z-definition z-block z-sequence z-item z-yaml&quot;&gt;-&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;echo &amp;quot;Inizio backup a $(date)&amp;quot;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;after_backup&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;    &lt;span class=&quot;z-punctuation z-definition z-block z-sequence z-item z-yaml&quot;&gt;-&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;echo &amp;quot;Backup completato con successo&amp;quot;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;on_error&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;    &lt;span class=&quot;z-punctuation z-definition z-block z-sequence z-item z-yaml&quot;&gt;-&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;echo &amp;quot;ERRORE durante il backup!&amp;quot;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Ora, per fare un backup completo, basta eseguire:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;borgmatic&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Questo comando:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Effettua il backup di tutti i directory elencati&lt;&#x2F;li&gt;
&lt;li&gt;Applica la deduplica e la compressione&lt;&#x2F;li&gt;
&lt;li&gt;Cifra tutto con la tua passphrase&lt;&#x2F;li&gt;
&lt;li&gt;Applica le politiche di retention (mantiene 7 backup giornalieri, 4 settimanali, etc.)&lt;&#x2F;li&gt;
&lt;li&gt;Verifica l&#x27;integrità del repository secondo il calendario definito&lt;&#x2F;li&gt;
&lt;li&gt;Esegue gli hook (comando prima e dopo il backup)&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;automazione-con-cron&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#automazione-con-cron&quot; aria-label=&quot;Anchor link for: automazione-con-cron&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Automazione con Cron&lt;&#x2F;h3&gt;
&lt;p&gt;Ora che hai configurato Borgmatic, il passo logico è automatizzare il backup. Aggiungi una voce al crontab:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;crontab&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;e&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;E aggiungi questa riga per eseguire il backup ogni giorno alle 02:00 di notte:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; 2 &lt;span class=&quot;z-keyword z-operator z-regexp z-quantifier z-shell&quot;&gt;*&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-regexp z-quantifier z-shell&quot;&gt;*&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-regexp z-quantifier z-shell&quot;&gt;*&lt;&#x2F;span&gt; &#x2F;home&#x2F;utente&#x2F;.local&#x2F;bin&#x2F;borgmatic&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;c&lt;&#x2F;span&gt; &#x2F;home&#x2F;utente&#x2F;.config&#x2F;borgmatic&#x2F;config.yaml&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Se vuoi eseguire il backup ogni 6 ore:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &lt;span class=&quot;z-keyword z-operator z-regexp z-quantifier z-shell&quot;&gt;*&lt;&#x2F;span&gt;&#x2F;6 &lt;span class=&quot;z-keyword z-operator z-regexp z-quantifier z-shell&quot;&gt;*&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-regexp z-quantifier z-shell&quot;&gt;*&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-regexp z-quantifier z-shell&quot;&gt;*&lt;&#x2F;span&gt; &#x2F;home&#x2F;utente&#x2F;.local&#x2F;bin&#x2F;borgmatic&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;c&lt;&#x2F;span&gt; &#x2F;home&#x2F;utente&#x2F;.config&#x2F;borgmatic&#x2F;config.yaml&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;il-superpotere-di-borgmatic-i-database&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#il-superpotere-di-borgmatic-i-database&quot; aria-label=&quot;Anchor link for: il-superpotere-di-borgmatic-i-database&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Il Superpotere di Borgmatic: I Database&lt;&#x2F;h2&gt;
&lt;p&gt;Se gestisci servizi come Nextcloud, Ghost o un qualsiasi stack LAMP&#x2F;LEMP, sai che salvare i file non basta: devi mettere al sicuro il &lt;strong&gt;database&lt;&#x2F;strong&gt;. Di solito questo significa scrivere uno script che fa il dump, lo salva in una cartella e poi Borg lo carica.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Borgmatic fa tutto da solo&lt;&#x2F;strong&gt;. Può collegarsi ai tuoi database, farne il &lt;em&gt;dump&lt;&#x2F;em&gt; &quot;al volo&quot; e inviarlo direttamente nel repository di backup senza sporcare il disco con file temporanei.&lt;&#x2F;p&gt;
&lt;p&gt;Ecco come aggiungere il supporto per i database nel tuo config.yaml:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;YAML&quot; class=&quot;language-YAML z-code&quot;&gt;&lt;code class=&quot;language-YAML&quot; data-lang=&quot;YAML&quot;&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-yaml&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-line z-number-sign z-yaml&quot;&gt;#&lt;&#x2F;span&gt; Aggiungi questo al tuo file di configurazione
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;&lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;databases&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-punctuation z-definition z-block z-sequence z-item z-yaml&quot;&gt;-&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;name&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;nextcloud_db&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;    &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;type&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;postgresql&lt;&#x2F;span&gt; &lt;span class=&quot;z-comment z-line z-number-sign z-yaml&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-line z-number-sign z-yaml&quot;&gt;#&lt;&#x2F;span&gt; o mysql &#x2F; mariadb &#x2F; sqlite
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;    &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;username&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;nextcloud_user&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;    &lt;span class=&quot;z-comment z-line z-number-sign z-yaml&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-line z-number-sign z-yaml&quot;&gt;#&lt;&#x2F;span&gt; Se il DB gira in un container, puoi specificarlo qui:
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;    &lt;span class=&quot;z-comment z-line z-number-sign z-yaml&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-line z-number-sign z-yaml&quot;&gt;#&lt;&#x2F;span&gt; hostname: localhost 
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;perche-e-fondamentale-per-nextcloud&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#perche-e-fondamentale-per-nextcloud&quot; aria-label=&quot;Anchor link for: perche-e-fondamentale-per-nextcloud&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Perché è fondamentale per Nextcloud?&lt;&#x2F;h3&gt;
&lt;p&gt;Nextcloud salva i metadati dei file, i contatti, i calendari e le configurazioni nel database. Se ripristini solo la cartella data ma non il database, ti ritroverai con un&#x27;istanza &quot;rotta&quot;. Con questa configurazione, Borgmatic:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Blocca (se necessario) e interroga il DB.&lt;&#x2F;li&gt;
&lt;li&gt;Trasmette il contenuto crittografato al volo.&lt;&#x2F;li&gt;
&lt;li&gt;Lo include nello stesso &quot;snapshot&quot; dei file.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;In caso di disastro, avrai la certezza matematica che i file e il database siano sincronizzati allo stesso identico istante, evitando &lt;em&gt;inconsistenze&lt;&#x2F;em&gt; che sono l&#x27;incubo di ogni sysadmin.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;notifiche-e-monitoraggio&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#notifiche-e-monitoraggio&quot; aria-label=&quot;Anchor link for: notifiche-e-monitoraggio&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Notifiche e Monitoraggio&lt;&#x2F;h3&gt;
&lt;p&gt;Una delle feature migliori di Borgmatic è la capacità di avvisarti istantaneamente se un backup fallisce o se è andato a buon fine. Invece di controllare i log ogni mattina, io uso &lt;strong&gt;ntfy&lt;&#x2F;strong&gt;, un servizio di messaggistica pub-sub semplicissimo (e ovviamente self-hostabile).&lt;&#x2F;p&gt;
&lt;p&gt;Puoi configurare le notifiche direttamente nel tuo config.yaml. Ecco come inviare un messaggio al tuo telefono ogni volta che Borgmatic finisce il suo lavoro:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;YAML&quot; class=&quot;language-YAML z-code&quot;&gt;&lt;code class=&quot;language-YAML&quot; data-lang=&quot;YAML&quot;&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;&lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;ntfy&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-comment z-line z-number-sign z-yaml&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-line z-number-sign z-yaml&quot;&gt;#&lt;&#x2F;span&gt; L&amp;#39;URL del tuo server ntfy (o quello ufficiale)
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;topic&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;il_tuo_topic_segreto&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;server&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;https:&#x2F;&#x2F;ntfy.sh&lt;&#x2F;span&gt; 
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-comment z-line z-number-sign z-yaml&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-line z-number-sign z-yaml&quot;&gt;#&lt;&#x2F;span&gt; Invia notifiche solo in caso di errore o sempre?
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;states&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-flow-sequence z-yaml&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-sequence z-begin z-yaml&quot;&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-plain z-in z-yaml&quot;&gt;failed&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-sequence z-yaml&quot;&gt;,&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-in z-yaml&quot;&gt;finished&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-sequence z-end z-yaml&quot;&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-comment z-line z-number-sign z-yaml&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-line z-number-sign z-yaml&quot;&gt;#&lt;&#x2F;span&gt; Puoi anche aggiungere una priorità diversa in base allo stato
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;priority&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt; &lt;span class=&quot;z-constant z-numeric z-integer z-decimal z-yaml&quot;&gt;5&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Se invece preferisci usare i classici hooks per personalizzare il messaggio (magari includendo il nome dell&#x27;host), puoi fare così:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;YAML&quot; class=&quot;language-YAML z-code&quot;&gt;&lt;code class=&quot;language-YAML&quot; data-lang=&quot;YAML&quot;&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;&lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;hooks&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;on_error&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;    &lt;span class=&quot;z-punctuation z-definition z-block z-sequence z-item z-yaml&quot;&gt;-&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;curl -d &amp;quot;❌ Backup fallito su $(hostname)&amp;quot; https:&#x2F;&#x2F;ntfy.sh&#x2F;il_tuo_topic_segreto&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;  &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-yaml&quot;&gt;after_backup&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml&quot;&gt;:&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-yaml&quot;&gt;    &lt;span class=&quot;z-punctuation z-definition z-block z-sequence z-item z-yaml&quot;&gt;-&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-unquoted z-plain z-out z-yaml&quot;&gt;curl -d &amp;quot;✅ Backup completato con successo su $(hostname)&amp;quot; https:&#x2F;&#x2F;ntfy.sh&#x2F;il_tuo_topic_segreto&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Con l&#x27;app di ntfy installata sullo smartphone, riceverai una notifica push in tempo reale. Se non vedi arrivare nulla, allora sai che c&#x27;è qualcosa da controllare.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;recuperare-i-dati-quando-il-backup-diventa-importante&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#recuperare-i-dati-quando-il-backup-diventa-importante&quot; aria-label=&quot;Anchor link for: recuperare-i-dati-quando-il-backup-diventa-importante&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Recuperare i Dati: Quando il Backup Diventa Importante&lt;&#x2F;h2&gt;
&lt;p&gt;Tutto questo lavoro di backup è inutile se non puoi effettivamente recuperare i tuoi dati. Con Borg è sorprendentemente semplice.&lt;&#x2F;p&gt;
&lt;p&gt;Per elencare tutti i backup disponibili:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;borg&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; list &#x2F;mnt&#x2F;discoesterno&#x2F;backup&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Per elencare i file all&#x27;interno di un backup specifico:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;borg&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; list &#x2F;mnt&#x2F;discoesterno&#x2F;backup::backup_2025_01_15&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Per estrarre un singolo file:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;borg&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; extract &#x2F;mnt&#x2F;discoesterno&#x2F;backup::backup_2025_01_15 &#x2F;home&#x2F;utente&#x2F;documenti&#x2F;importante.txt&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Per ripristinare l&#x27;intero backup in una directory temporanea:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &#x2F;tmp&#x2F;ripristino&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-support z-function z-cd z-shell&quot;&gt;cd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &#x2F;tmp&#x2F;ripristino&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;borg&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; extract &#x2F;mnt&#x2F;discoesterno&#x2F;backup::backup_2025_01_15&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;La bellezza di Borg è che il ripristino è altrettanto semplice della creazione del backup. Non c&#x27;è magia incomprensibile, solo comandi diretti e intuitivi.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;le-limitazioni-che-non-sono-molte&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#le-limitazioni-che-non-sono-molte&quot; aria-label=&quot;Anchor link for: le-limitazioni-che-non-sono-molte&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Le Limitazioni (Che Non Sono Molte)&lt;&#x2F;h2&gt;
&lt;p&gt;Borg è meraviglioso, ma non è perfetto. Vale la pena menzionare un paio di limitazioni:&lt;&#x2F;p&gt;
&lt;p&gt;Innanzitutto, per i database, Borg avrebbe bisogno di un dump preventivo su disco. Fortunatamente, come abbiamo visto, Borgmatic risolve il problema gestendo i dump al volo, ma è sempre bene verificare di avere abbastanza spazio temporaneo per queste operazioni se i database sono mastodontici.&lt;&#x2F;p&gt;
&lt;p&gt;In secondo luogo, la prima esecuzione di un backup remoto è lenta. Se hai 500 GB da inviare al tuo server di backup via SSH, i tempi saranno significativi. Ma i backup successivi saranno enormemente più veloci grazie alla deduplica. La &lt;em&gt;deduplica cross-archive&lt;&#x2F;em&gt; (tra diversi backup) significa che i cambiamenti incrementali sono davvero incrementali.&lt;&#x2F;p&gt;
&lt;p&gt;Infine, il ripristino di backup molto grandi con molti file può essere un po&#x27; lento, soprattutto se il repository è su un disco lento. Ma una volta che hai i dati localmente, sei a posto.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;conclusione-perche-ho-scelto-borg&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#conclusione-perche-ho-scelto-borg&quot; aria-label=&quot;Anchor link for: conclusione-perche-ho-scelto-borg&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Conclusione: Perché Ho Scelto Borg&lt;&#x2F;h2&gt;
&lt;p&gt;Negli ultimi anni ho usato Borg su ogni server che amministro. A volte ho dovuto recuperare i dati, e ogni singola volta Borg c&#x27;è stato, puntuale e affidabile. Ha sempre ripristinato esattamente quello che mi serviva, senza cerimoniali inutili.&lt;&#x2F;p&gt;
&lt;p&gt;Borg è ciò che mi piace in un software: semplice nei concetti, potente nell&#x27;esecuzione, straordinariamente efficiente, e completamente open source. Borgmatic lo rende ancora più accessibile, anche per chi non vuole passare ore a studiare manuali complessi.&lt;&#x2F;p&gt;
&lt;p&gt;Se gestisci un server self-hosted, uno o più personal computer, o semplicemente dati che non puoi permetterti di perdere, Borg e Borgmatic meritano seriamente di essere nella tua cassetta degli attrezzi. Il tempo che dedicherai alla loro configurazione sarà tempo ben speso, e il giorno in cui avrai bisogno di recuperare un file eliminato accidentalmente, ringrazierai te stesso di averlo fatto.&lt;&#x2F;p&gt;
&lt;p&gt;Buon backup!&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Forgejo con Docker: Git self-hosted senza fronzoli</title>
          <pubDate>Fri, 11 Jul 2025 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://www.agostinelli.eu/blog/forgejo-con-docker-git-self-hosted-senza-fronzoli/</link>
          <guid>https://www.agostinelli.eu/blog/forgejo-con-docker-git-self-hosted-senza-fronzoli/</guid>
          <description xml:base="https://www.agostinelli.eu/blog/forgejo-con-docker-git-self-hosted-senza-fronzoli/">&lt;p&gt;Da tempo utilizzo Git per gestire i miei progetti personali, sia software che di configurazione. Per anni mi sono affidato al pc di qualcunaltro (es: Gitlab o GitHub), ma la dipendenza da un servizio centralizzato, per quanto comodo, inizia a starmi stretta. Così ho cercato una soluzione più allineata alla mia filosofia: &lt;strong&gt;Forgejo&lt;&#x2F;strong&gt;, un fork comunitario di Gitea, leggero e facilmente self-hostabile.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;img.agostinelli.eu&#x2F;2025&#x2F;forgejo-logo.png&quot; alt=&quot;Forgejo&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;perche-forgejo&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#perche-forgejo&quot; aria-label=&quot;Anchor link for: perche-forgejo&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Perché Forgejo&lt;&#x2F;h2&gt;
&lt;p&gt;Forgejo nasce da una comunità che punta alla trasparenza e all’autonomia, senza il rischio che un progetto venga assorbito o piegato a logiche commerciali. La compatibilità con Gitea è totale, e i requisiti minimi lo rendono perfetto per VPS o server casalinghi.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;veniamo-subito-al-dunque-e-facciamolo-partire-cosi-potremo-provarlo-con-mano&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#veniamo-subito-al-dunque-e-facciamolo-partire-cosi-potremo-provarlo-con-mano&quot; aria-label=&quot;Anchor link for: veniamo-subito-al-dunque-e-facciamolo-partire-cosi-potremo-provarlo-con-mano&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Veniamo subito al dunque e facciamolo partire, cosi potremo provarlo con mano!&lt;&#x2F;h2&gt;
&lt;h2 id=&quot;setup-con-docker&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#setup-con-docker&quot; aria-label=&quot;Anchor link for: setup-con-docker&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Setup con Docker&lt;&#x2F;h2&gt;
&lt;p&gt;Ci affidiamo a Docker Compose, cosi con un solo file di configurazione abbiamo tutto il necessario.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;docker-compose-yaml&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#docker-compose-yaml&quot; aria-label=&quot;Anchor link for: docker-compose-yaml&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
docker-compose.yaml&lt;&#x2F;h3&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;services:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;  &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;forgejo:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;    &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;image:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; codeberg.org&#x2F;forgejo&#x2F;forgejo:latest&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;    &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;container_name:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; forgejo&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;    &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;restart:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; always&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;    &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;environment:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;      &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;-&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; USER_UID=1000&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;      &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;-&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; USER_GID=1000&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;    &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;volumes:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;      &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;-&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; .&#x2F;data:&#x2F;data&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;      &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;-&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &#x2F;etc&#x2F;timezone:&#x2F;etc&#x2F;timezone:ro&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;      &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;-&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &#x2F;etc&#x2F;localtime:&#x2F;etc&#x2F;localtime:ro&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;      &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;-&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; .&#x2F;robots.txt:&#x2F;data&#x2F;gitea&#x2F;public&#x2F;robots.txt:ro&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;    &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;expose:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;      &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;-&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;3000&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;    &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;networks:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;      &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;-&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; forgejo_net&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;networks:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;  &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;forgejo_net:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;    &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;driver:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; bridge&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;h3 id=&quot;reverse-proxy&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#reverse-proxy&quot; aria-label=&quot;Anchor link for: reverse-proxy&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Reverse Proxy&lt;&#x2F;h3&gt;
&lt;p&gt;E&#x27; possibile usare il web server che preferiamo, come ad esempio traefik, caddy, apache o nginx, in questo articolo vedremo un esempio con quest&#x27;ultimo.&lt;&#x2F;p&gt;
&lt;p&gt;Qui una configurazione base con https (via Let&#x27;s Encrypt, gestito esternamente):&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;&#x2F;etc&#x2F;nginx&#x2F;sites-available&#x2F;forgejo.conf
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;server {
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    listen 80;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    server_name git.miodominio.it;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    return 301 https:&#x2F;&#x2F;$host$request_uri;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;}
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;server {
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    listen 443 ssl;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    server_name git.miodominio.it;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    ssl_certificate &#x2F;etc&#x2F;letsencrypt&#x2F;live&#x2F;git.miodominio.it&#x2F;fullchain.pem;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    ssl_certificate_key &#x2F;etc&#x2F;letsencrypt&#x2F;live&#x2F;git.miodominio.it&#x2F;privkey.pem;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    location &#x2F; {
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        proxy_pass http:&#x2F;&#x2F;localhost:3000;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        proxy_set_header Host $host;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        proxy_set_header X-Real-IP $remote_addr;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        proxy_set_header X-Forwarded-Proto $scheme;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    }
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;}
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Dopo aver creato il file, attivare con:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;ln&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;s&lt;&#x2F;span&gt; &#x2F;etc&#x2F;nginx&#x2F;sites-available&#x2F;forgejo.conf &#x2F;etc&#x2F;nginx&#x2F;sites-enabled&#x2F;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;nginx&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;t&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-logical z-and z-shell&quot;&gt;&amp;amp;&amp;amp;&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;systemctl&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; reload nginx&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;backup-automatico&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#backup-automatico&quot; aria-label=&quot;Anchor link for: backup-automatico&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Backup automatico&lt;&#x2F;h2&gt;
&lt;p&gt;Il backup rappresenta un step fondamentale del nostro setup, conviene implementarne subito uno all&#x27;avvio del servizio, cosi non ce ne dimenticvheremo e terremo i nostri dati al sicuro. Ricordiamoci che qui salveremo il risultato di diverse ore di programmazione, studio e prove!&lt;&#x2F;p&gt;
&lt;p&gt;I nostri dati si trovano nel volume data di cui sopra, quindi sarà sufficiente salvare il docker file e la directory data.
Io consiglio di usare #borg ma potete usare il softwsre che preferite, trovo particolarmente utile aggiungere questa nuova directory alle procedure di salvataggio che sicuremante avrete già per tutto il resto.
(se non le avete potete anche smettere di leggere questo blog, tornate quando ne avrete implementata una).&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;configurazioni-iniziali&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#configurazioni-iniziali&quot; aria-label=&quot;Anchor link for: configurazioni-iniziali&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Configurazioni iniziali&lt;&#x2F;h2&gt;
&lt;p&gt;A questo punto, dopo l&#x27;installazione, non ci resta che accedere via web al nostro software e fare le prime configurazioni.
È possibile creare utenti, organizzazioni, concedere permessi e creare tutti i repository che si desiderano.&lt;&#x2F;p&gt;
&lt;p&gt;Ciascun progetto può essere impostato ad accesso &lt;em&gt;privatp&lt;&#x2F;em&gt; o &lt;em&gt;pubblico&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;In questo modo sarà semplicissimo collaborare in più persone allo stesso progetto, tenendo traccia delle varie modifiche.&lt;&#x2F;p&gt;
&lt;p&gt;Infine è anche possibile importare direttamente altri repository git.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;runner-e-action&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#runner-e-action&quot; aria-label=&quot;Anchor link for: runner-e-action&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Runner e Action&lt;&#x2F;h2&gt;
&lt;p&gt;Forgejo, essendo un fork di Gitea, supporta un sistema di &lt;em&gt;CI&#x2F;CD&lt;&#x2F;em&gt; integrato chiamato Actions, simile a GitHub Actions, e permette di eseguire job di build o deploy tramite runner personalizzati.&lt;&#x2F;p&gt;
&lt;p&gt;Io stesso ne faccio uso, è uno dei motivi per cui mi sto trovando benissimo con forgejo! Ho varie configurazione a seconda del progetto ospitato, ma essenzialmente queste si occupano di effettuare il &quot;deploy&quot; del codice, cioé copiano a destinazione (server di sviluppo o di produzione a seconda dei casi), il codice modificato, cosi che sia pronto all&#x27;uso.
In questo modo, grazie alla history di git, sarà sempre possibile tornare indietro, nonché tenere traccia delle modifiche nel tempo.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;come-funziona&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#come-funziona&quot; aria-label=&quot;Anchor link for: come-funziona&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Come funziona&lt;&#x2F;h3&gt;
&lt;p&gt;Le Actions sono definite da file YAML nei repository (.forgejo&#x2F;workflows&#x2F;), e possono contenere job con step eseguiti su runner registrati.&lt;&#x2F;p&gt;
&lt;p&gt;I runner sono agent installati su macchine (stessa VPS o remote), che si collegano al server Forgejo e attendono job da eseguire.&lt;&#x2F;p&gt;
&lt;p&gt;Una volta definita la condizione scatenante (es: commit su ramo main, rilascio di una nuova versione, ecc) partirà il worksflow che abbiamo definito, con la possibilità di verificarne lo stato di esecuzione in tempo reale. Infine è anche possibile andare a vedere i log delle esecuzione precedenti.&lt;&#x2F;p&gt;
&lt;p&gt;All&#x27;interno di una action si possono usare #secret e #variabili, in modo da poter riusare il codice della action e allo stesso tempo mantenere al sicuro le credenziali.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;setup-runner-base&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#setup-runner-base&quot; aria-label=&quot;Anchor link for: setup-runner-base&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Setup runner base&lt;&#x2F;h3&gt;
&lt;p&gt;Vediamo come creare un nuovo runner, passo passo:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-storage z-modifier z-shell&quot;&gt;export&lt;&#x2F;span&gt; &lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;RUNNER_VERSION&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-meta z-group z-expansion z-command z-parens z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-parens z-begin z-shell&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;curl&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;X&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-single z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;GET&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; https:&#x2F;&#x2F;data.forgejo.org&#x2F;api&#x2F;v1&#x2F;repos&#x2F;forgejo&#x2F;runner&#x2F;releases&#x2F;latest&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-logical z-pipe z-shell&quot;&gt;|&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;jq&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; .name&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;r&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-logical z-pipe z-shell&quot;&gt;|&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;cut&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;c&lt;&#x2F;span&gt; 2-&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-parens z-end z-shell&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;wget&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;O&lt;&#x2F;span&gt; forgejo-runner https:&#x2F;&#x2F;code.forgejo.org&#x2F;forgejo&#x2F;runner&#x2F;releases&#x2F;download&#x2F;v&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-expansion z-parameter z-begin z-shell&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;RUNNER_VERSION&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-section z-expansion z-parameter z-end z-shell&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&#x2F;forgejo-runner-&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-expansion z-parameter z-begin z-shell&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;RUNNER_VERSION&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-section z-expansion z-parameter z-end z-shell&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;-linux-amd64&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;chmod&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; +x forgejo-runner&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; mv forgejo-runner &#x2F;usr&#x2F;local&#x2F;bin&#x2F;forgejo-runner&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; useradd&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;m&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;s&lt;&#x2F;span&gt; &#x2F;bin&#x2F;bash forgejo-runner&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; usermod&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;aG&lt;&#x2F;span&gt; docker forgejo-runner&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Rechiamoci sull&#x27;interfaccia web di Forgejo:
&lt;em&gt;Forgejo &amp;gt; Repository &amp;gt; Settings &amp;gt; Actions &amp;gt; Runners &amp;gt; &quot;Generate new token&quot;&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;i&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;u&lt;&#x2F;span&gt; forgejo-runner&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;forgejo-runner&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; register&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h4 id=&quot;avvio-automatico-del-runner&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#avvio-automatico-del-runner&quot; aria-label=&quot;Anchor link for: avvio-automatico-del-runner&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Avvio automatico del runner&lt;&#x2F;h4&gt;
&lt;p&gt;Io ho usato uno script systemd per l&#x27;avvio automatico, ve lo riporto di seguito&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; echo &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;[Unit]
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;Description=Forgejo Act Runner
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;After=network.target docker.service
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;Requires=docker.service
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;[Service]
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;User=forgejo-runner
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;Group=forgejo-runner
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;ExecStart=&#x2F;usr&#x2F;local&#x2F;bin&#x2F;forgejo-runner daemon
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;Restart=always
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;WorkingDirectory=&#x2F;home&#x2F;forgejo-runner
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;[Install]
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;WantedBy=multi-user.target&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-assignment z-redirection z-shell&quot;&gt;&amp;gt;&lt;&#x2F;span&gt; &#x2F;etc&#x2F;systemd&#x2F;system&#x2F;forgejo-runner.service&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; systemctl daemon-reload&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; systemctl enable forgejo-runner&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; systemctl start forgejo-runner&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;systemctl&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; status forgejo-runner&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;vantaggi-in-breve&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#vantaggi-in-breve&quot; aria-label=&quot;Anchor link for: vantaggi-in-breve&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Vantaggi in breve&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Repository del proprio codice, diviso come si preferisce: singoli progetti, organizzazioni, ecc.&lt;&#x2F;li&gt;
&lt;li&gt;Possibilità di creare utenti per collaboratori&#x2F;amici con controllo sugli accessi&#x2F;permessi.&lt;&#x2F;li&gt;
&lt;li&gt;Automatizzo test, build, deploy senza dipendere da servizi esterni.&lt;&#x2F;li&gt;
&lt;li&gt;Nessuna dipendenza da fornitori terzi e nessun limite di spazio, esecuzioni, personalizzazioni.&lt;&#x2F;li&gt;
&lt;li&gt;Versionamento del codice, e nel caso di ci&#x2F;cd garanzia di riproducibilità&lt;&#x2F;li&gt;
&lt;li&gt;Pocchissime risorse necessarie lato server&lt;&#x2F;li&gt;
&lt;li&gt;Vuoi mettere quanto è figo avere il proprio servizio di versionamento?&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;uso-quotidiano&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#uso-quotidiano&quot; aria-label=&quot;Anchor link for: uso-quotidiano&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Uso quotidiano&lt;&#x2F;h2&gt;
&lt;p&gt;Forgejo supporta #git via #ssh, Web UI e #webhooks. Ho configurato alcuni repository con CI locale usando le Actions e i runner integrati. L’interfaccia è leggera e pulita, senza funzionalità inutili.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;conclusioni&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#conclusioni&quot; aria-label=&quot;Anchor link for: conclusioni&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Conclusioni&lt;&#x2F;h2&gt;
&lt;p&gt;Forgejo è una soluzione Git solida, coerente con un approccio decentralizzato. Semplice da gestire, veloce da installare, e adatta anche per chi – come me – preferisce sapere dove stanno i propri dati. Per ora lo utilizzo solo per progetti personali, ma potrei iniziare a usarlo anche per collaborazioni future.&lt;&#x2F;p&gt;
&lt;p&gt;Non vi resta che provarlo, fatemi sapere le vostre impressioni con un commento nel #fediverso su questo articolo.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Nextcloud</title>
          <pubDate>Fri, 23 Feb 2024 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://www.agostinelli.eu/blog/nextcloud/</link>
          <guid>https://www.agostinelli.eu/blog/nextcloud/</guid>
          <description xml:base="https://www.agostinelli.eu/blog/nextcloud/">&lt;p&gt;&lt;em&gt;Nota Introduttiva: questo articolo sarà solo un&#x27;introduzione, seguiranno approfondimenti sui singoli componenti.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;cos-e-nextcloud&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#cos-e-nextcloud&quot; aria-label=&quot;Anchor link for: cos-e-nextcloud&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Cos&#x27;è nextcloud&lt;&#x2F;h2&gt;
&lt;p&gt;Software open source che permette di realizzare  un servizio Cloud personale per i propri dati.  Ambiente collaborativo e può anche essere federato con altre installazioni.
È possibile installarlo su un proprio dispositivo o usare quello messo a disposizione da alcune aziende o associazioni.
L&#x27;architettura è modulare, questo ci permette di attivare solo le funzionalità che ci servono e se ne possono aggiungere di nuove (via via che gli sviluppatori le rilasciano). C&#x27;è un plugin per ogni esigenza!&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;img.agostinelli.eu&#x2F;2024&#x2F;Nextcloud_Logo.svg.png&quot; alt=&quot;Nextcloud Logo&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;caratteristiche&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#caratteristiche&quot; aria-label=&quot;Anchor link for: caratteristiche&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Caratteristiche&lt;&#x2F;h2&gt;
&lt;p&gt;Il suo punto di forza è la &lt;strong&gt;condivisione&lt;&#x2F;strong&gt; e la &lt;strong&gt;sincronizzazione&lt;&#x2F;strong&gt; dei file, che può avvenire tramite semplice browser web o utilizzando l&#x27;applicazione disponibile per tutti i sistemi operativi. Possiamo considerarlo un&#x27;alternativa a Dropbox, Google drive o onedrive.
Ci sono anche numerosi &lt;strong&gt;servizi aggiuntivi&lt;&#x2F;strong&gt;, che coprono diverse esigenze, come ad esenpio:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;calendario&lt;&#x2F;li&gt;
&lt;li&gt;contatti&lt;&#x2F;li&gt;
&lt;li&gt;webmail&lt;&#x2F;li&gt;
&lt;li&gt;attività (task)&lt;&#x2F;li&gt;
&lt;li&gt;note (markup language)&lt;&#x2F;li&gt;
&lt;li&gt;chat interna&lt;&#x2F;li&gt;
&lt;li&gt;suite per l&#x27;ufficio (via web, basata su libreoffice)&lt;&#x2F;li&gt;
&lt;li&gt;galleria immagini&lt;&#x2F;li&gt;
&lt;li&gt;ebook reader&lt;&#x2F;li&gt;
&lt;li&gt;password manager&lt;&#x2F;li&gt;
&lt;li&gt;gestione bookmark (con possibilità di sync con plugin per il browser)&lt;&#x2F;li&gt;
&lt;li&gt;podcast&lt;&#x2F;li&gt;
&lt;li&gt;libro di ricette&lt;&#x2F;li&gt;
&lt;li&gt;ricerca&lt;&#x2F;li&gt;
&lt;li&gt;forms&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Questi servizi possono essere usati via web, o con i vari client, con il vantaggio di avere tutto &lt;strong&gt;sincronizzato tra più dispositivi&lt;&#x2F;strong&gt;.
Nextcloud diventa così il proprio hub personale dove ci sono tutti i propri dati e le proprie attività.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;img.agostinelli.eu&#x2F;2024&#x2F;nextcloud_dashboard.png&quot; alt=&quot;Nextcloud Dashboard&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;vantaggi&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#vantaggi&quot; aria-label=&quot;Anchor link for: vantaggi&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Vantaggi&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;self hosting: possiamo installarlo su un nostro pc o su una #vps in modo che i &lt;strong&gt;nostri dati&lt;&#x2F;strong&gt; siano sempre sotto il nostro controllo.&lt;&#x2F;li&gt;
&lt;li&gt;nel caso si voglia affidarsi al lavoro di altri, possiamo scegliere il provider che vogliamo e cambiarlo in qualsiasi momento (esportando i dati)&lt;&#x2F;li&gt;
&lt;li&gt;tra utenti dello stesso server (o federati) è possibile collaborare&lt;&#x2F;li&gt;
&lt;li&gt;condivisione di file (e immagini) avendo sempre tutto sotto controllo, vedi paragrafo dedicato sotto.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;ricerca globale&lt;&#x2F;strong&gt;: usando la casella di ricerca, questa verrà effettuata ovunque: file, note, contatti, calendario, ecc. ecc.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;img.agostinelli.eu&#x2F;2024&#x2F;nextcloud_passwordmanager.webp&quot; alt=&quot;Nextcloud Dashboard&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;backup&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#backup&quot; aria-label=&quot;Anchor link for: backup&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Backup&lt;&#x2F;h2&gt;
&lt;p&gt;Come abbiamo visto nextcloud è la nostra casa personale di tutti i dati e attività, diventa quindi fondentale prevedere un sistema di backup affidabile, a cui far ricorso in caso di problemi.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;cosa-salvare&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#cosa-salvare&quot; aria-label=&quot;Anchor link for: cosa-salvare&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Cosa salvare&lt;&#x2F;h3&gt;
&lt;ol&gt;
&lt;li&gt;Database: dipende da quello che avete scelto, ma solitamente si tratta di &lt;em&gt;Mysql&lt;&#x2F;em&gt; (o &lt;em&gt;MariaDB&lt;&#x2F;em&gt;). Le procedure di salvataggio sono quelle consuete (&lt;em&gt;mysqldump&lt;&#x2F;em&gt;), che potete trovare in rete o in questo blog (in futuro).&lt;&#x2F;li&gt;
&lt;li&gt;File: salvataggio della directory nextcloud ospitata dal webserver, che contiene sia il software che i nostri dati&lt;&#x2F;li&gt;
&lt;li&gt;Se non siamo gli unici utilizzatori dell&#x27;istanza, è consigliabile impostare l&#x27;istanza in &lt;strong&gt;modalità manutenzione&lt;&#x2F;strong&gt; durante le operazioni di salvataggio, in modo da avere la consistenza dei dati.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Vi consiglio di usare un sistema come #borg, il quale può essere usato in modalità &lt;strong&gt;incrementale&lt;&#x2F;strong&gt; così vi garantisce di poter recuperare sempre una certa versione dei vostri documenti e ha il vantaggio che, dopo la prima esecuzione, i backup successivi trasferiranno solo le nuove modifiche sul backup, saranno così molto veloci e occuperanno solo lo spazio strettamente necessario!&lt;&#x2F;p&gt;
&lt;h2 id=&quot;condivisione-di-file&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#condivisione-di-file&quot; aria-label=&quot;Anchor link for: condivisione-di-file&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Condivisione di file&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;cartelle (e file) in sola lettura per utenti anonimi anche protetti da password&lt;&#x2F;li&gt;
&lt;li&gt;possibilità di poter ricevere file da altri (upload)&lt;&#x2F;li&gt;
&lt;li&gt;galleria foto&lt;&#x2F;li&gt;
&lt;li&gt;cartelle collaborative con altri utenti del server (o istanze federate)&lt;&#x2F;li&gt;
&lt;li&gt;supporto nativo a #webdav&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;applicazione desktop&lt;&#x2F;strong&gt; per sincronizzazione automatica dei file.&lt;&#x2F;li&gt;
&lt;li&gt;supporto al versionamento&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;calendario-e-contatti&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#calendario-e-contatti&quot; aria-label=&quot;Anchor link for: calendario-e-contatti&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Calendario e contatti&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;configurando un app come #davx5 vi permette di sincronizzare contatti e calendario del vostro smartphone&lt;&#x2F;li&gt;
&lt;li&gt;È possibile sincronizzare anche i client desktop, sfruttando i protocolli standard #caldav e #carddav&lt;&#x2F;li&gt;
&lt;li&gt;import e export da e verso altri sistemi&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;app-mobile&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#app-mobile&quot; aria-label=&quot;Anchor link for: app-mobile&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
App mobile&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;accesso a tutti i propri file in mobilità&lt;&#x2F;li&gt;
&lt;li&gt;auto upload delle foto scattate&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;task&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#task&quot; aria-label=&quot;Anchor link for: task&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Task&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;gestione categorie&lt;&#x2F;li&gt;
&lt;li&gt;sotto task&lt;&#x2F;li&gt;
&lt;li&gt;date di inizio e scadenza&lt;&#x2F;li&gt;
&lt;li&gt;percentuale avanzamento&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;note&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#note&quot; aria-label=&quot;Anchor link for: note&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Note&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;accesso web&lt;&#x2F;li&gt;
&lt;li&gt;markup language&lt;&#x2F;li&gt;
&lt;li&gt;categorie&lt;&#x2F;li&gt;
&lt;li&gt;app mobile&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;nota-personale&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#nota-personale&quot; aria-label=&quot;Anchor link for: nota-personale&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Nota personale&lt;&#x2F;h3&gt;
&lt;p&gt;Io sto usando tantissimo le note, per segnarmi di tutto: appunti, comandi, persino le bozze che scrivo per il blog. Trovo che sia la vera killer application, ritrovo sempre tutto e l&#x27;impaginazione è semplice e funzionale.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;img.agostinelli.eu&#x2F;2024&#x2F;nextcloud_notes.png&quot; alt=&quot;Nextcloud Note&quot; &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;img.agostinelli.eu&#x2F;2024&#x2F;nextcloud_postit.jpeg&quot; alt=&quot;Nextcloud PostIt&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;suite-ufficio&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#suite-ufficio&quot; aria-label=&quot;Anchor link for: suite-ufficio&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Suite ufficio&lt;&#x2F;h2&gt;
&lt;p&gt;E&#x27; possibile &lt;strong&gt;editare i documenti&lt;&#x2F;strong&gt; office anche via interfaccia web:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Software basato sul diffuso libreoffice&lt;&#x2F;li&gt;
&lt;li&gt;Editing collaborativo real time (è necessario installare &lt;strong&gt;Collabora office&lt;&#x2F;strong&gt;)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;utenti-di-mastodon-uno&quot;&gt;&lt;a class=&quot;header-anchor no-hover-padding&quot; href=&quot;#utenti-di-mastodon-uno&quot; aria-label=&quot;Anchor link for: utenti-di-mastodon-uno&quot;&gt;&lt;span class=&quot;link-icon&quot; aria-hidden=&quot;true&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
Utenti di mastodon.uno&lt;&#x2F;h2&gt;
&lt;p&gt;Se vi ho incuriosito e volete provare ad usarlo, vi segnalo che gli utenti di mastodon.uno posso richiedere un account da qui:
https:&#x2F;&#x2F;cloud.mastodon.uno&#x2F;apps&#x2F;forms&#x2F;s&#x2F;YSCoCC37D9omTN8iXSKkQqz9
(sul server sono già preinstallati diversi software aggiuntivi)&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;img.agostinelli.eu&#x2F;2024&#x2F;nextcloud_photos.webp&quot; alt=&quot;Nextcloud Photos&quot; &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;img.agostinelli.eu&#x2F;2024&#x2F;nextcloud_cookbook.jpg&quot; alt=&quot;Nextcloud Cookbook&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
</description>
      </item>
    </channel>
</rss>
