<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[LBDG - Infrastructure]]></title><description><![CDATA[Infrastructures, histoires]]></description><link>https://blog.lbdg.me/</link><image><url>https://blog.lbdg.me/favicon.png</url><title>LBDG - Infrastructure</title><link>https://blog.lbdg.me/</link></image><generator>Ghost 5.79</generator><lastBuildDate>Sun, 05 Apr 2026 22:20:06 GMT</lastBuildDate><atom:link href="https://blog.lbdg.me/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Home Assistant Device Hierarchy]]></title><description><![CDATA[<p>How to use the new device hierarchy introduced by <a href="https://github.com/karwosts?ref=blog.lbdg.me">https://github.com/karwosts</a> in the 2025.4 release of home assistant.</p><p>Go to your energy dashboard. Then edit one of your individual devices</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2025/04/firefox_cTlaUgK6v0.png" class="kg-image" alt loading="lazy" width="401" height="287"></figure><p>Then you can select an upstream device. You can only select a device that is present on</p>]]></description><link>https://blog.lbdg.me/home-assistant-device-hierarchy/</link><guid isPermaLink="false">67ee2e9c0493c40e2b5e2e04</guid><dc:creator><![CDATA[Vincent C.]]></dc:creator><pubDate>Thu, 03 Apr 2025 06:57:43 GMT</pubDate><media:content url="https://blog.lbdg.me/content/images/2025/04/firefox_sjqEBE31rA.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.lbdg.me/content/images/2025/04/firefox_sjqEBE31rA.png" alt="Home Assistant Device Hierarchy"><p>How to use the new device hierarchy introduced by <a href="https://github.com/karwosts?ref=blog.lbdg.me">https://github.com/karwosts</a> in the 2025.4 release of home assistant.</p><p>Go to your energy dashboard. Then edit one of your individual devices</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2025/04/firefox_cTlaUgK6v0.png" class="kg-image" alt="Home Assistant Device Hierarchy" loading="lazy" width="401" height="287"></figure><p>Then you can select an upstream device. You can only select a device that is present on the Individual devices list</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2025/04/firefox_gSLEbXlJsq.png" class="kg-image" alt="Home Assistant Device Hierarchy" loading="lazy" width="670" height="497" srcset="https://blog.lbdg.me/content/images/size/w600/2025/04/firefox_gSLEbXlJsq.png 600w, https://blog.lbdg.me/content/images/2025/04/firefox_gSLEbXlJsq.png 670w"></figure><p>On the dashboard, the selected device is subtracted from the device it come from (untracked)</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2025/04/firefox_GUxme6rbhU.png" class="kg-image" alt="Home Assistant Device Hierarchy" loading="lazy" width="712" height="454" srcset="https://blog.lbdg.me/content/images/size/w600/2025/04/firefox_GUxme6rbhU.png 600w, https://blog.lbdg.me/content/images/2025/04/firefox_GUxme6rbhU.png 712w"></figure><p>The upstream device must obviously have a greater value than the downstream devices, as they derive from it.</p>]]></content:encoded></item><item><title><![CDATA[Proxmox - Convert VHDX to QCOW2]]></title><description><![CDATA[Convert a Hyper-V VHDX to qcow2 proxmox. qemu-img convert -f vhd system_bdd.vhdx -O qcow2 system_bdd.qcow2

]]></description><link>https://blog.lbdg.me/proxmox-convert-vhdx-to-qcow2/</link><guid isPermaLink="false">67e2c50f0493c40e2b5e2de5</guid><category><![CDATA[proxmox]]></category><dc:creator><![CDATA[Vincent C.]]></dc:creator><pubDate>Tue, 25 Mar 2025 15:01:57 GMT</pubDate><content:encoded><![CDATA[<p>Convert a Hyper-V VHDX to qcow2 proxmox.</p>
<pre><code>qemu-img convert -f vhd system_bdd.vhdx -O qcow2 system_bdd.qcow2
</code></pre>
<p>The <strong>qemu-img</strong> command is pre-installed on Proxmox, and can be used to convert (with the convert option) the &quot;disk image filename&quot; to another disk image format.</p>
<p><img src="https://blog.lbdg.me/content/images/2019/01/putty_2019-01-08_18-13-29.png" alt="putty_2019-01-08_18-13-29" loading="lazy"></p>
<p>And here&apos;s most used format supported by the convert arg</p>
<table>
<thead>
<tr>
<th>Image format</th>
<th>Argument</th>
</tr>
</thead>
<tbody>
<tr>
<td>QCOW2 (KVM, Xen)</td>
<td>qcow2</td>
</tr>
<tr>
<td>VMDK (VMware)</td>
<td>vmdk</td>
</tr>
<tr>
<td>VHD (Hyper-V)</td>
<td>vhd</td>
</tr>
<tr>
<td>raw</td>
<td>raw</td>
</tr>
<tr>
<td>VDI (VirtualBox)</td>
<td>vdi</td>
</tr>
<tr>
<td>QED (KVM)</td>
<td>qed</td>
</tr>
</tbody>
</table>
<p>We have a Hyper-V disk as source and we can convert it to qcow2</p>
<pre><code>qemu-img convert -f vhd system_bdd.vhdx -O qcow2 system_bdd.qcow2
</code></pre>
<p>Result of the command<br>
<img src="https://blog.lbdg.me/content/images/2019/01/putty_2019-01-08_18-10-47.png" alt="putty_2019-01-08_18-10-47" loading="lazy"></p>
]]></content:encoded></item><item><title><![CDATA[QNAP - Vulnerability march 2025]]></title><description><![CDATA[<p>QNAP vulnerability list of march 2025. Multiple vulnerabilities have been discovered in Qnap products. Some of these allow an attacker to trigger remote arbitrary code execution, data confidentiality breaches, and data integrity violations.</p><p>Instructions to update (from QNAP)</p><h3 id="updating-qts-or-quts-hero">Updating QTS or QuTS hero</h3><ol><li>Log in to QTS or QuTS hero</li></ol>]]></description><link>https://blog.lbdg.me/qnap-vulnerability-march-2025/</link><guid isPermaLink="false">67d2adba0493c40e2b5e2dc7</guid><dc:creator><![CDATA[Vincent C.]]></dc:creator><pubDate>Thu, 13 Mar 2025 10:23:29 GMT</pubDate><media:content url="https://blog.lbdg.me/content/images/2025/03/qnap-systems-vulnerability-march-2025.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://blog.lbdg.me/content/images/2025/03/qnap-systems-vulnerability-march-2025.jpg" alt="QNAP - Vulnerability march 2025"><p>QNAP vulnerability list of march 2025. Multiple vulnerabilities have been discovered in Qnap products. Some of these allow an attacker to trigger remote arbitrary code execution, data confidentiality breaches, and data integrity violations.</p><p>Instructions to update (from QNAP)</p><h3 id="updating-qts-or-quts-hero">Updating QTS or QuTS hero</h3><ol><li>Log in to QTS or QuTS hero as an administrator.</li><li>Go to&#xA0;<strong>Control Panel</strong>&#xA0;&gt;&#xA0;<strong>System</strong>&#xA0;&gt;<strong>&#xA0;Firmware Update</strong>.</li><li>Under&#xA0;<strong>Live Update</strong>, click&#xA0;<strong>Check for Update</strong>.<br>The system downloads and installs the latest available update.</li></ol><p><strong>Tip:&#xA0;</strong>You can also download the update from the QNAP website. Go to&#xA0;<strong>Support</strong>&#xA0;&gt;<strong>&#xA0;Download Center</strong>&#xA0;and then perform a manual update for your specific device.</p><p>All versions bellow are vulnerable. Please update to last version available : </p><ul><li>File Station versions 5.5.x prior to 5.5.6.4741</li><li>HBS 3 Hybrid Backup Sync versions 25.1.x prior to 25.1.4.952</li><li>Helpdesk versions 3.3.x prior to 3.3.3</li><li>Qfinder Pro Mac versions 7.11.x prior to 7.11.1</li><li>Qsync Client versions 5.1.x prior to 5.1.3 for Mac</li><li>QTS versions 4.5.x prior to 4.5.4.2957 build 20241119</li><li>QTS versions 5.1.x prior to 5.1.9.2954 build 20241120</li><li>QTS versions 5.2.x prior to 5.2.3.3006 build 20250108</li><li>QuLog Center versions 1.7.x prior to 1.7.0.829</li><li>QuLog Center versions 1.8.x prior to 1.8.0.888</li><li>QuRouter versions 2.4.x prior to 2.4.6.028</li><li>QuTS hero versions h4.5.x prior to h4.5.4.2956 build 20241119</li><li>QuTS hero versions h5.1.x prior to h5.1.9.2954 build 20241120</li><li>QuTS hero versions h5.2.x prior to h5.2.3.3006 build 20250108</li><li>QVPN Device Client versions 2.2.x prior to 2.2.5 for Mac</li></ul>]]></content:encoded></item><item><title><![CDATA[InfluxDB reset admin password]]></title><description><![CDATA[InfluxDB change password user
Influxdb reset admin password]]></description><link>https://blog.lbdg.me/influxdb-reset-admin-password/</link><guid isPermaLink="false">67d2abe30493c40e2b5e2daf</guid><category><![CDATA[influxdb]]></category><dc:creator><![CDATA[Vincent C.]]></dc:creator><pubDate>Thu, 13 Mar 2025 10:01:29 GMT</pubDate><content:encoded><![CDATA[<p>Influxdb reset admin password</p><p>If you don&apos;t remember a password, you can change it. To change the password of one user, use <strong>SET PASSWORD FOR user = &apos;newpassword&apos;.</strong></p><h2 id="you-dont-have-the-administrator-password">You don&apos;t have the administrator password</h2><p>Firest, you need to stop the influxdb service</p><pre><code>service influxdb stop</code></pre><p>Edit <strong>/etc/influxdb/influxdb.conf</strong></p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/08/image-4.png" class="kg-image" alt loading="lazy" width="594" height="159"></figure><p>Change auth-enabled = true by <strong>auth-enabled = false</strong></p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/08/image-5.png" class="kg-image" alt loading="lazy" width="569" height="157"></figure><p>Then, restart the InfluxDB service</p><pre><code>service influxdb start</code></pre><p>Then connect and change the password</p><pre><code>influx --ssl  -unsafeSsl
SET PASSWORD FOR admin = &apos;iambatman&apos;</code></pre>]]></content:encoded></item><item><title><![CDATA[InfluxDB change password user]]></title><description><![CDATA[InfluxDB change password user
Influxdb reset admin password]]></description><link>https://blog.lbdg.me/change-influxdb-password-user/</link><guid isPermaLink="false">65d45a3f4312873a60d57402</guid><category><![CDATA[influxdb]]></category><dc:creator><![CDATA[Vincent C.]]></dc:creator><pubDate>Wed, 12 Mar 2025 23:26:00 GMT</pubDate><content:encoded><![CDATA[<p>Influxdb reset admin password</p><p>If you don&apos;t remember a password, you can change it. To change the password of one user, use <strong>SET PASSWORD FOR user = &apos;newpassword&apos;.</strong></p><h2 id="you-are-the-influxdb-administrator">You are the InfluxDB administrator</h2><p>Here&apos;s an exemple :</p><p>You created a new user :  bruce, but you did a typo mistake on the password :</p><pre><code>CREATE USER bruce WITH PASSWORD &apos;iambatmon&apos;</code></pre><p>You can change the password by doing</p><pre><code>SET PASSWORD FOR bruce = &apos;iambatman&apos;</code></pre><h2 id="if-you-have-lose-the-admin-password">If you have lose the admin password</h2><p>Go to <a href="https://blog.lbdg.me/influxdb-reset-admin-password/">https://blog.lbdg.me/influxdb-reset-admin-password/</a></p>]]></content:encoded></item><item><title><![CDATA[Proxmox - Convert VMDK to QCOW2]]></title><description><![CDATA[Convert vmware vmdk to proxmox qcow2 - Convert VMware format file to Proxmox format file]]></description><link>https://blog.lbdg.me/proxmox-convert-vmdk-to-qcow2/</link><guid isPermaLink="false">65d45a3f4312873a60d573f8</guid><category><![CDATA[proxmox]]></category><dc:creator><![CDATA[Vincent C.]]></dc:creator><pubDate>Wed, 12 Mar 2025 23:00:00 GMT</pubDate><content:encoded><![CDATA[<p>Convert a vmware vmdk to qcow2 proxmox.</p>
<p>The <strong>qemu-img</strong> command is pre-installed on Proxmox, and can be used to convert (with the convert option) the &quot;disk image filename&quot; to another disk image format.</p>
<p><img src="https://blog.lbdg.me/content/images/2019/01/putty_2019-01-08_18-13-29.png" alt="putty_2019-01-08_18-13-29" loading="lazy"></p>
<p>And here&apos;s most used format supported by the convert arg</p>
<table>
<thead>
<tr>
<th>Image format</th>
<th>Argument</th>
</tr>
</thead>
<tbody>
<tr>
<td>QCOW2 (KVM, Xen)</td>
<td>qcow2</td>
</tr>
<tr>
<td>VMDK (VMware)</td>
<td>vmdk</td>
</tr>
<tr>
<td>VHD (Hyper-V)</td>
<td>vhd</td>
</tr>
<tr>
<td>raw</td>
<td>raw</td>
</tr>
<tr>
<td>VDI (VirtualBox)</td>
<td>vdi</td>
</tr>
<tr>
<td>QED (KVM)</td>
<td>qed</td>
</tr>
</tbody>
</table>
<p>We have a VMDK used in VMware product (ESXI for exemple), we can convert it to qcow2</p>
<pre><code>qemu-img convert -f vmdk openmanage_enterprise.x86_64-0.0.1-disk1.vmdk -O qcow2 OpenManageEntreprise-3-1.qcow2
</code></pre>
<p>Result of the command<br>
<img src="https://blog.lbdg.me/content/images/2019/01/putty_2019-01-08_18-10-47.png" alt="putty_2019-01-08_18-10-47" loading="lazy"></p>
]]></content:encoded></item><item><title><![CDATA[Proxmox - Disable swappiness - Best performance]]></title><description><![CDATA[Disable proxmox swapiness, best performance]]></description><link>https://blog.lbdg.me/proxmox-best-performance-disable-swappiness/</link><guid isPermaLink="false">65d45a3f4312873a60d573f6</guid><category><![CDATA[proxmox]]></category><category><![CDATA[homelab]]></category><category><![CDATA[dell]]></category><dc:creator><![CDATA[Vincent C.]]></dc:creator><pubDate>Mon, 10 Mar 2025 23:00:00 GMT</pubDate><media:content url="https://blog.lbdg.me/content/images/2018/08/proxmox-logo-1.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.lbdg.me/content/images/2018/08/proxmox-logo-1.png" alt="Proxmox - Disable swappiness - Best performance"><p>How to disable swapp for best performance in proxmox.</p>
<p>So I read about swappiness and find this very usefull commands :</p>
<p><strong>sysctl vm.swappiness=0</strong><br>
<em>This will allow your system to swap when your physical memory is near to zero.</em><br>
<strong>sysctl vm.swappiness=10</strong><br>
<em>This will allow your system to swap when your physical is about 10 % memory remaining</em></p>
<p>So, you need to check your swappiness : cat /proc/sys/vm/swappiness and define a new limit. In my case, I don&apos;t want the SWAP to be used, so, I fix the value to 0.</p>
<pre><code># Check the current value
cat /proc/sys/vm/swappiness

# Define the new one
sysctl vm.swappiness=0

# Disable SWAP, it&apos;ll take some times to clean the SWAP area
swapoff -a
</code></pre>
<p>It take 15 minutes to clean the SWAP...<br>
<img src="https://blog.lbdg.me/content/images/2018/08/DELAY.GIF" alt="Proxmox - Disable swappiness - Best performance" loading="lazy"></p>
<pre><code># Enable the SWAP with the new value
swapon -a

# Check if well applied
cat /proc/sys/vm/swappiness
</code></pre>
<p>The execution is Shell JS from Proxmox !<br>
<img src="https://blog.lbdg.me/content/images/2018/08/firefox_2018-08-16_22-29-30-1.png" alt="Proxmox - Disable swappiness - Best performance" loading="lazy"></p>
]]></content:encoded></item><item><title><![CDATA[[Solution] - Error: LOGIN authentication failure [SMTP: STARTTLS failed (code: 220, response: ready for tls)]]]></title><description><![CDATA[<p>I was remodeling my e-mail infrastructure and I ran into an issue about my PfSense TLS emailing.I had this error :</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2021/01/firefox_31svkQYtd3-1.png" class="kg-image" alt loading="lazy" width="1514" height="100" srcset="https://blog.lbdg.me/content/images/size/w600/2021/01/firefox_31svkQYtd3-1.png 600w, https://blog.lbdg.me/content/images/size/w1000/2021/01/firefox_31svkQYtd3-1.png 1000w, https://blog.lbdg.me/content/images/2021/01/firefox_31svkQYtd3-1.png 1514w" sizes="(min-width: 720px) 720px"></figure><p>My configuration looks nice </p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.lbdg.me/content/images/2021/01/firefox_Bp5nIerKjq.png" class="kg-image" alt loading="lazy" width="956" height="906" srcset="https://blog.lbdg.me/content/images/size/w600/2021/01/firefox_Bp5nIerKjq.png 600w, https://blog.lbdg.me/content/images/2021/01/firefox_Bp5nIerKjq.png 956w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Uncheck &quot;Secure SMTP&quot; for STARTLS</span></figcaption></figure><p>PfSense isn&apos;t that good for providing email logs, so I decided to go deeper with a</p>]]></description><link>https://blog.lbdg.me/error-login-authentication-failure-smtp-starttls-failed-code-220-response-ready-for-tls/</link><guid isPermaLink="false">65d45a3f4312873a60d57408</guid><dc:creator><![CDATA[Vincent C.]]></dc:creator><pubDate>Wed, 20 Jan 2021 20:45:31 GMT</pubDate><content:encoded><![CDATA[<p>I was remodeling my e-mail infrastructure and I ran into an issue about my PfSense TLS emailing.I had this error :</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2021/01/firefox_31svkQYtd3-1.png" class="kg-image" alt loading="lazy" width="1514" height="100" srcset="https://blog.lbdg.me/content/images/size/w600/2021/01/firefox_31svkQYtd3-1.png 600w, https://blog.lbdg.me/content/images/size/w1000/2021/01/firefox_31svkQYtd3-1.png 1000w, https://blog.lbdg.me/content/images/2021/01/firefox_31svkQYtd3-1.png 1514w" sizes="(min-width: 720px) 720px"></figure><p>My configuration looks nice </p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.lbdg.me/content/images/2021/01/firefox_Bp5nIerKjq.png" class="kg-image" alt loading="lazy" width="956" height="906" srcset="https://blog.lbdg.me/content/images/size/w600/2021/01/firefox_Bp5nIerKjq.png 600w, https://blog.lbdg.me/content/images/2021/01/firefox_Bp5nIerKjq.png 956w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Uncheck &quot;Secure SMTP&quot; for STARTLS</span></figcaption></figure><p>PfSense isn&apos;t that good for providing email logs, so I decided to go deeper with a packet analysis. In Diagnotics =&gt; Packet Capture</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2021/01/image.png" class="kg-image" alt loading="lazy" width="262" height="449"></figure><p>Focusing on LAN interface and HOST 10.0.0.43 (my internal email server)</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2021/01/firefox_K4KdlGQACU.png" class="kg-image" alt loading="lazy" width="861" height="223" srcset="https://blog.lbdg.me/content/images/size/w600/2021/01/firefox_K4KdlGQACU.png 600w, https://blog.lbdg.me/content/images/2021/01/firefox_K4KdlGQACU.png 861w" sizes="(min-width: 720px) 720px"></figure><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2021/01/image-1.png" class="kg-image" alt loading="lazy" width="978" height="202" srcset="https://blog.lbdg.me/content/images/size/w600/2021/01/image-1.png 600w, https://blog.lbdg.me/content/images/2021/01/image-1.png 978w" sizes="(min-width: 720px) 720px"></figure><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2021/01/firefox_RtrtHdwlOQ.png" class="kg-image" alt loading="lazy" width="929" height="343" srcset="https://blog.lbdg.me/content/images/size/w600/2021/01/firefox_RtrtHdwlOQ.png 600w, https://blog.lbdg.me/content/images/2021/01/firefox_RtrtHdwlOQ.png 929w" sizes="(min-width: 720px) 720px"></figure><p>I pressed start, tested the email notification and stopped, then opened the downloaded .cap with wireshard.</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2021/01/Wireshark_5oL4h8gWqM.png" class="kg-image" alt loading="lazy" width="1336" height="668" srcset="https://blog.lbdg.me/content/images/size/w600/2021/01/Wireshark_5oL4h8gWqM.png 600w, https://blog.lbdg.me/content/images/size/w1000/2021/01/Wireshark_5oL4h8gWqM.png 1000w, https://blog.lbdg.me/content/images/2021/01/Wireshark_5oL4h8gWqM.png 1336w" sizes="(min-width: 720px) 720px"></figure><p>&quot;Unknow CA&quot;, PfSense was rejecting my certificate because the CA is unknow, first I was like : how is it possible, I imported it in the Cert manager and then I remembered that it doesn&apos;t help for OS checking.</p><p>I added the CA this way : </p><p><a href="https://blog.lbdg.me/freebsd-adding-self-signed-certificate-authority/">https://blog.lbdg.me/freebsd-adding-self-signed-certificate-authority/</a></p><p>And :)</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2021/01/image-2.png" class="kg-image" alt loading="lazy" width="695" height="92" srcset="https://blog.lbdg.me/content/images/size/w600/2021/01/image-2.png 600w, https://blog.lbdg.me/content/images/2021/01/image-2.png 695w"></figure>]]></content:encoded></item><item><title><![CDATA[Nextcloud - Grafana]]></title><description><![CDATA[Nextcloud telegraf.
How to, in a very simple way, send your Nextcloud data to InfluxDB and see them with Grafana.
]]></description><link>https://blog.lbdg.me/nextcloud-influxdb-telegraf-grafana/</link><guid isPermaLink="false">65d45a3f4312873a60d57407</guid><category><![CDATA[grafana]]></category><category><![CDATA[homelab]]></category><category><![CDATA[influxdb]]></category><category><![CDATA[nextcloud]]></category><dc:creator><![CDATA[Vincent C.]]></dc:creator><pubDate>Fri, 04 Sep 2020 16:37:33 GMT</pubDate><media:content url="https://blog.lbdg.me/content/images/2020/09/GRAFANA-INTOFLUX_NEXTCLOUD.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.lbdg.me/content/images/2020/09/GRAFANA-INTOFLUX_NEXTCLOUD.png" alt="Nextcloud - Grafana"><p>Nextcloud to influxDB (Grafana for display) with telegraf.</p><p>Nextcloud allows you to see some of your instance statistics by accessing a simple URL : <a href="https://instance_dns_name/ocs/v2.php/apps/serverinfo/api/v1/info?ref=blog.lbdg.me" rel="noreferrer">https://instance_dns_name/ocs/v2.php/apps/serverinfo/api/v1/info</a></p><p>To find which one you can use, go on Settings =&gt; Administration =&gt; System and a section called External monitoring tool</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/09/image.png" class="kg-image" alt="Nextcloud - Grafana" loading="lazy" width="1207" height="713" srcset="https://blog.lbdg.me/content/images/size/w600/2020/09/image.png 600w, https://blog.lbdg.me/content/images/size/w1000/2020/09/image.png 1000w, https://blog.lbdg.me/content/images/2020/09/image.png 1207w" sizes="(min-width: 720px) 720px"></figure><p>If you append ?format=json to the end of the url, you&apos;ll see the data on JSON format. Logged as an admin, that&apos;s how datas looks : </p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/09/msedge_76XfweJQKO.png" class="kg-image" alt="Nextcloud - Grafana" loading="lazy" width="1917" height="296" srcset="https://blog.lbdg.me/content/images/size/w600/2020/09/msedge_76XfweJQKO.png 600w, https://blog.lbdg.me/content/images/size/w1000/2020/09/msedge_76XfweJQKO.png 1000w, https://blog.lbdg.me/content/images/size/w1600/2020/09/msedge_76XfweJQKO.png 1600w, https://blog.lbdg.me/content/images/2020/09/msedge_76XfweJQKO.png 1917w" sizes="(min-width: 720px) 720px"></figure><h2 id="telegraf">Telegraf</h2><p>At this point, I was wondering : how to get and parse datas. After a little bit of research, I found the input plugin HTTP from telegraf</p><p><a href="https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md?ref=blog.lbdg.me">https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md</a></p><p>The documentation looks promissing : </p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/09/image-1.png" class="kg-image" alt="Nextcloud - Grafana" loading="lazy" width="1195" height="194" srcset="https://blog.lbdg.me/content/images/size/w600/2020/09/image-1.png 600w, https://blog.lbdg.me/content/images/size/w1000/2020/09/image-1.png 1000w, https://blog.lbdg.me/content/images/2020/09/image-1.png 1195w" sizes="(min-width: 720px) 720px"></figure><p>And the JSON format is supported. Successful candidate.</p><p>Because we need an admin account, I created one for telegraf, named telegraf-http</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/09/firefox_pQRV25LXSX.png" class="kg-image" alt="Nextcloud - Grafana" loading="lazy" width="1324" height="178" srcset="https://blog.lbdg.me/content/images/size/w600/2020/09/firefox_pQRV25LXSX.png 600w, https://blog.lbdg.me/content/images/size/w1000/2020/09/firefox_pQRV25LXSX.png 1000w, https://blog.lbdg.me/content/images/2020/09/firefox_pQRV25LXSX.png 1324w" sizes="(min-width: 720px) 720px"></figure><p>Based on the documentation I add a new section on /etc/telegraf/telegraf.conf for http input (all passwords have been re-generated before the publication ;))</p><pre><code class="language-Telegraf">[[inputs.http]]

urls = [
    &quot;https://instance_dns_name/ocs/v2.php/apps/serverinfo/api/v1/info?format=json&quot;
  ]

method = &quot;GET&quot;

username = &quot;telegraf-http&quot;
password = &quot;%@R$GVCMRzBJsr#VR4Hm7ngrU$&quot;

data_format = &quot;json&quot;

success_status_codes = [200]
timeout = &quot;30s&quot;
interval= &quot;60s&quot;

name_prefix = &quot;nextcloud_&quot;
</code></pre><p>And I run a simple test, before reloading, with the command</p><pre><code class="language-shell">telegraf --input-filter http --test</code></pre><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/09/putty_ssJ5IE3Mky-1.png" class="kg-image" alt="Nextcloud - Grafana" loading="lazy" width="1019" height="153" srcset="https://blog.lbdg.me/content/images/size/w600/2020/09/putty_ssJ5IE3Mky-1.png 600w, https://blog.lbdg.me/content/images/size/w1000/2020/09/putty_ssJ5IE3Mky-1.png 1000w, https://blog.lbdg.me/content/images/2020/09/putty_ssJ5IE3Mky-1.png 1019w" sizes="(min-width: 720px) 720px"></figure><p>And ... I got an 401 (Unauthorized). It&apos;s because I&apos;ve removed my user telegraf-http from the admin group to test something else before. After re-adding the user, the test looks much better</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/09/putty_p5BZITHp0v.png" class="kg-image" alt="Nextcloud - Grafana" loading="lazy" width="1015" height="306" srcset="https://blog.lbdg.me/content/images/size/w600/2020/09/putty_p5BZITHp0v.png 600w, https://blog.lbdg.me/content/images/size/w1000/2020/09/putty_p5BZITHp0v.png 1000w, https://blog.lbdg.me/content/images/2020/09/putty_p5BZITHp0v.png 1015w" sizes="(min-width: 720px) 720px"></figure><p>After this I restart the telegraf service to refresh the configuration</p><pre><code class="language-shell">/sbin/service telegraf restart</code></pre><h2 id="grafana">Grafana</h2><p>On grafana, I see my new dataset : nextcloud_http</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/09/firefox_JYsWCPTilK.png" class="kg-image" alt="Nextcloud - Grafana" loading="lazy" width="432" height="303"></figure><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/09/Grafana.png" class="kg-image" alt="Nextcloud - Grafana" loading="lazy" width="913" height="270" srcset="https://blog.lbdg.me/content/images/size/w600/2020/09/Grafana.png 600w, https://blog.lbdg.me/content/images/2020/09/Grafana.png 913w" sizes="(min-width: 720px) 720px"></figure><p>Now, I can create a nice dashboard to follow my Nextcloud activities.</p><p>Exemple, ocs_data_nextcloud_storage_num_files with difference transformation. AKA : how many files are added per minutes : </p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/09/Grafana-2.png" class="kg-image" alt="Nextcloud - Grafana" loading="lazy" width="740" height="759" srcset="https://blog.lbdg.me/content/images/size/w600/2020/09/Grafana-2.png 600w, https://blog.lbdg.me/content/images/2020/09/Grafana-2.png 740w" sizes="(min-width: 720px) 720px"></figure>]]></content:encoded></item><item><title><![CDATA[Letsencrypt - unicodeencodeerror: 'ascii' codec can't encode character u'\xe9']]></title><description><![CDATA[<p></p><p>Vous ne pouvez pas renouveler vos certificats Letsencrypt avec l&apos;erreur unicodeencodeerror: &apos;ascii&apos; codec can&apos;t encode character u&apos;\xe9&apos;</p><p>Pour r&#xE9;soudre cela, il faut v&#xE9;rifier que dans aucun de vos fichiers de configuration nginx / apache se trouve des caract&</p>]]></description><link>https://blog.lbdg.me/letsencrypt-unicodeencodeerror-ascii-codec-cant-encode-character-u-xe9/</link><guid isPermaLink="false">65d45a3f4312873a60d57406</guid><dc:creator><![CDATA[Vincent C.]]></dc:creator><pubDate>Wed, 22 Jul 2020 09:00:17 GMT</pubDate><content:encoded><![CDATA[<p></p><p>Vous ne pouvez pas renouveler vos certificats Letsencrypt avec l&apos;erreur unicodeencodeerror: &apos;ascii&apos; codec can&apos;t encode character u&apos;\xe9&apos;</p><p>Pour r&#xE9;soudre cela, il faut v&#xE9;rifier que dans aucun de vos fichiers de configuration nginx / apache se trouve des caract&#xE8;res particuliers il faut se limiter &#xE0; l&apos;alphanum&#xE9;rique</p><p>You cannot renew your Letsencrypt certificate with the error : unicodeencodeerror: &apos;ascii&apos; codec can&apos;t encode character u&apos;\xe9&apos;</p><p>To resolve this, you have to check if you have any special character and convert them to alphanumeric in your nginx / apache configueation</p>]]></content:encoded></item><item><title><![CDATA[Dell ECS - Restic]]></title><description><![CDATA[<p>Dell ECS est une solution de stockage object propos&#xE9;e par Dell. Comme la plupart des stockages object, cette solution supporte l&apos;API S3, &#xE9;tant d&#xE9;j&#xE0; utilisateur de S3 via restic, j&apos;ai d&#xE9;cid&#xE9; d&apos;&#xE9;crire un article</p>]]></description><link>https://blog.lbdg.me/dell-ecs-restic/</link><guid isPermaLink="false">65d45a3f4312873a60d57405</guid><category><![CDATA[dell]]></category><category><![CDATA[restic]]></category><dc:creator><![CDATA[Vincent C.]]></dc:creator><pubDate>Thu, 09 Jul 2020 19:29:46 GMT</pubDate><media:content url="https://blog.lbdg.me/content/images/2020/07/ECS-RESTIC.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.lbdg.me/content/images/2020/07/ECS-RESTIC.png" alt="Dell ECS - Restic"><p>Dell ECS est une solution de stockage object propos&#xE9;e par Dell. Comme la plupart des stockages object, cette solution supporte l&apos;API S3, &#xE9;tant d&#xE9;j&#xE0; utilisateur de S3 via restic, j&apos;ai d&#xE9;cid&#xE9; d&apos;&#xE9;crire un article parlant des deux technologies.</p><p>Le choix d&apos;ECS est int&#xE9;ressant pour avoir des fonctionnalit&#xE9;s et des espaces cloud mais en on premise.</p><h1 id="installation">Installation</h1><p>La premi&#xE8;re chose &#xE0; faire est d&apos;installer le binaire restic. L&apos;installation est plut&#xF4;t simplissime car restic est un simple binaire qui ex&#xE9;cute l&apos;ensemble du travail de sauvegarde.</p><p>On se rend sur le d&#xE9;p&#xF4;t des release restic : <a href="https://github.com/restic/restic/releases?ref=blog.lbdg.me">https://github.com/restic/restic/releases</a> et on cherche la version souhait&#xE9;e </p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/06/image.png" class="kg-image" alt="Dell ECS - Restic" loading="lazy" width="1083" height="343" srcset="https://blog.lbdg.me/content/images/size/w600/2020/06/image.png 600w, https://blog.lbdg.me/content/images/size/w1000/2020/06/image.png 1000w, https://blog.lbdg.me/content/images/2020/06/image.png 1083w" sizes="(min-width: 720px) 720px"></figure><p>Les release sont l&#xE0; pour faire gagner un peu de temps lorsque vous avez des OS assez standard.</p><p>En l&apos;occurence faisant un test sur Debian, je vais prendre la version : restic_0.9.6_linux_amd64.bz2</p><p>On &quot;installe&quot; donc cela :</p><pre><code>wget https://github.com/restic/restic/releases/download/v0.9.6/restic_0.9.6_linux_amd64.bz2
bunzip2 restic_0.9.6_linux_amd64.bz2
# Si commande inconnue, installer de cette mani&#xE8;re : apt-get install bzip2
mv restic_0.9.6_linux_amd64 /usr/local/bin/restic
chmod 510 /usr/local/bin/restic

# J&apos;ai choisi de limiter les droits pour contr&#xF4;ler qui a le droit d&apos;utiliser restic, de ce fait seul les membres du groupe restic-user ont les droits d&apos;ex&#xE9;cution

addgroup restic-user
chown root:restic-user /usr/local/bin/restic
addgroup vincent restic-user</code></pre><p>On v&#xE9;rifie </p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/06/image-1.png" class="kg-image" alt="Dell ECS - Restic" loading="lazy" width="428" height="107"></figure><h1 id="d%C3%A9p%C3%B4t-repository-destination-de-sauvegarde">D&#xE9;p&#xF4;t (repository) = destination de sauvegarde</h1><p>Restic fonctionne sur un syst&#xE8;me de d&#xE9;p&#xF4;t de fichier s&apos;apparentant &#xE0; git. L&apos;id&#xE9;e &#xE0; comprendre derri&#xE8;re ces d&#xE9;p&#xF4;ts (repository) est que ce sont nos cibles de destination, donc nos cibles de sauvegardes.</p><h2 id="plusieurs-backend">Plusieurs backend</h2><p>Il est possible de faire sauvegarder restic vers presque n&apos;importe quoi gr&#xE2;ce &#xE0; son utilisation de rClone, mais plusieurs sortent du lot pour des questions de co&#xFB;t, tel que BackBlaze avec leur stockage B2 ou encore Amazon S3 (ou S3 compatible) dont Dell ECS.</p><h1 id="cr%C3%A9ation-du-d%C3%A9p%C3%B4t">Cr&#xE9;ation du d&#xE9;p&#xF4;t</h1><p>Pour cr&#xE9;er le d&#xE9;p&#xF4;t, nous allons taper la commande <strong>restic init et ... Ce n&apos;est pas tout, c&apos;est l&#xE0; que tout diff&#xE8;re. </strong></p><pre><code>restic init -r /home/vincent
# pour du local ou m&#xEA;me 
restic -r sftp:utilisateur@h&#xF4;te:/sauvegarde init
# pour du SFTP ou encore 
restic -r s3:s3.amazonaws.com/nom_bucket init
# pour du S3 de chez Amazon</code></pre><p>-r ou --repo pour indiquer la destination</p><p>Voici un exemple pour une cible locale</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/06/image-2.png" class="kg-image" alt="Dell ECS - Restic" loading="lazy" width="569" height="199"></figure><p>Pas d&apos;acc&#xE8;s demand&#xE9; pour le stockage, car accessible localement. Le mot de passe de d&#xE9;p&#xF4;t (password for new repository) est utilis&#xE9; pour chiffrer les cl&#xE9;s pr&#xE9;sentes dans le d&#xE9;p&#xF4;t cr&#xE9;&#xE9; par init. Il impossible de ne pas chiffrer un d&#xE9;p&#xF4;t restic. (ce qui est un tr&#xE8;s bon point)</p><p>Voici l&apos;arborescence cr&#xE9;e : </p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.lbdg.me/content/images/2020/06/image-6.png" class="kg-image" alt="Dell ECS - Restic" loading="lazy" width="593" height="203"><figcaption><span style="white-space: pre-wrap;">Le grep permet d&apos;&#xE9;viter les 250 r&#xE9;pertoires de data</span></figcaption></figure><p>A partir de l&#xE0;, le d&#xE9;p&#xF4;t contenu dans /home/vincent/RESTIC-ECS/sauvegarde est utilisable comme r&#xE9;pertoire de sauvegarde.</p><h1 id="sauvegardes">Sauvegardes</h1><h2 id="sauvegarde-locale">Sauvegarde locale</h2><p>J&apos;ai par exemple ce magnifique ISO de debian que je souhaite sauvegarder.</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/06/image-7.png" class="kg-image" alt="Dell ECS - Restic" loading="lazy" width="469" height="123"></figure><p>Il me suffit de taper cela pour le sauvegarder dans le d&#xE9;p&#xF4;t pr&#xE9;c&#xE9;demment cr&#xE9;&#xE9;.</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://blog.lbdg.me/content/images/2020/06/RESTIC.png" class="kg-image" alt="Dell ECS - Restic" loading="lazy" width="1000" height="200" srcset="https://blog.lbdg.me/content/images/size/w600/2020/06/RESTIC.png 600w, https://blog.lbdg.me/content/images/2020/06/RESTIC.png 1000w"></figure><figure class="kg-card kg-image-card kg-width-wide"><img src="https://blog.lbdg.me/content/images/2020/06/image-9.png" class="kg-image" alt="Dell ECS - Restic" loading="lazy" width="827" height="203" srcset="https://blog.lbdg.me/content/images/size/w600/2020/06/image-9.png 600w, https://blog.lbdg.me/content/images/2020/06/image-9.png 827w"></figure><p>On remarque un ajout de 500 Ko au d&#xE9;p&#xF4;t car la d&#xE9;duplication fonctionne tr&#xE8;s bien et que j&apos;ai d&#xE9;j&#xE0; sauvegard&#xE9; ce fichier il y a quelques jours.</p><h2 id="sauvegarde-distante">Sauvegarde distante</h2><h4 id="cr%C3%A9ation-du-d%C3%A9p%C3%B4t-s3">Cr&#xE9;ation du d&#xE9;p&#xF4;t S3</h4><p>Mon stockage distant sera en environement Dell ECS compatiable object S3. </p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/07/firefox_EB9VoUKeOD.png" class="kg-image" alt="Dell ECS - Restic" loading="lazy" width="991" height="206" srcset="https://blog.lbdg.me/content/images/size/w600/2020/07/firefox_EB9VoUKeOD.png 600w, https://blog.lbdg.me/content/images/2020/07/firefox_EB9VoUKeOD.png 991w" sizes="(min-width: 720px) 720px"></figure><p>Comme pr&#xE9;c&#xE9;demment, l&apos;&#xE9;tape 1 est d&apos;initialiser notre d&#xE9;p&#xF4;t : restic -r s3:beta.cloudstart.fr/bucket-de-test init</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://blog.lbdg.me/content/images/2020/06/D-p-t-S3.png" class="kg-image" alt="Dell ECS - Restic" loading="lazy" width="1000" height="200" srcset="https://blog.lbdg.me/content/images/size/w600/2020/06/D-p-t-S3.png 600w, https://blog.lbdg.me/content/images/2020/06/D-p-t-S3.png 1000w"></figure><figure class="kg-card kg-image-card kg-width-wide"><img src="https://blog.lbdg.me/content/images/2020/06/image-11.png" class="kg-image" alt="Dell ECS - Restic" loading="lazy" width="1288" height="81" srcset="https://blog.lbdg.me/content/images/size/w600/2020/06/image-11.png 600w, https://blog.lbdg.me/content/images/size/w1000/2020/06/image-11.png 1000w, https://blog.lbdg.me/content/images/2020/06/image-11.png 1288w" sizes="(min-width: 1200px) 1200px"></figure><p>Cela ne pourra fonctionner sans authentification, car nous essayons de cr&#xE9;er une d&#xE9;p&#xF4;t sur un serveur distant.</p><p>Pour se faire, il faut faire un export son compte de connexion.</p><table>
<thead>
<tr>
<th>Export</th>
<th>correspondance</th>
</tr>
</thead>
<tbody>
<tr>
<td>AWS_ACCESS_KEY_ID=&lt;MY_ACCESS_KEY&gt;</td>
<td>ID de connexion pour S3 &amp; S3 compatible</td>
</tr>
<tr>
<td>AWS_SECRET_ACCESS_KEY=&lt;MY_SECRET_ACCESS_KEY&gt;</td>
<td>Cl&#xE9; de connexion pour S3 &amp; S3 compatible</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td>B2_ACCOUNT_ID=&lt;MY_APPLICATION_KEY_ID&gt;</td>
<td>Pour le stockage B2 de chez BackBlaze</td>
</tr>
<tr>
<td>B2_ACCOUNT_KEY=&lt;MY_APPLICATION_KEY&gt;</td>
<td>Pour le stockage B2 de chez BackBlaze</td>
</tr>
</tbody>
</table>
<p>En l&apos;occurence, ECS &#xE9;tant S3 compatible, nous ferons nos exports via AWS : </p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/06/image-13.png" class="kg-image" alt="Dell ECS - Restic" loading="lazy" width="877" height="253" srcset="https://blog.lbdg.me/content/images/size/w600/2020/06/image-13.png 600w, https://blog.lbdg.me/content/images/2020/06/image-13.png 877w" sizes="(min-width: 720px) 720px"></figure><h4 id="sauvegarde-de-test">Sauvegarde de test</h4><p>On lance une sauvegarde pour valider le fonctionnement du d&#xE9;p&#xF4;t </p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/06/image-15.png" class="kg-image" alt="Dell ECS - Restic" loading="lazy" width="996" height="343" srcset="https://blog.lbdg.me/content/images/size/w600/2020/06/image-15.png 600w, https://blog.lbdg.me/content/images/2020/06/image-15.png 996w" sizes="(min-width: 720px) 720px"></figure><h2 id="en-interactif">En interactif</h2><p>Pour utiliser restic de mani&#xE8;re ponctuelle : ce que nous avons vu pr&#xE9;c&#xE9;demment.</p><h2 id="en-script">En script</h2><p>Pour le script un simple export des m&#xEA;mes cl&#xE9;s AWS est n&#xE9;cessaire, mais &#xE9;galement du mot de passe de d&#xE9;p&#xF4;t, celui-ci &#xE9;tant tap&#xE9; de mani&#xE8;re interactive lors des ex&#xE9;cutions en direct.</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/07/ConEmu64_VyRueKxLtA.png" class="kg-image" alt="Dell ECS - Restic" loading="lazy" width="679" height="198" srcset="https://blog.lbdg.me/content/images/size/w600/2020/07/ConEmu64_VyRueKxLtA.png 600w, https://blog.lbdg.me/content/images/2020/07/ConEmu64_VyRueKxLtA.png 679w"></figure><p>Le script va donc lancer une sauvegarde de tout le r&#xE9;pertoire ECS</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/07/ConEmu64_5ukZwJKbtM.png" class="kg-image" alt="Dell ECS - Restic" loading="lazy" width="869" height="187" srcset="https://blog.lbdg.me/content/images/size/w600/2020/07/ConEmu64_5ukZwJKbtM.png 600w, https://blog.lbdg.me/content/images/2020/07/ConEmu64_5ukZwJKbtM.png 869w" sizes="(min-width: 720px) 720px"></figure><h4 id="statistiques-et-restauration">Statistiques et restauration</h4><p>Afin d&apos;en savoir plus sur la place occup&#xE9;e sur la destination, nous utilisons commande suivante </p><pre><code>restic -r s3:beta.cloudstart.fr/bucket-de-test stats</code></pre><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/07/ConEmu64_Oh0DIZwRUr.png" class="kg-image" alt="Dell ECS - Restic" loading="lazy" width="668" height="162" srcset="https://blog.lbdg.me/content/images/size/w600/2020/07/ConEmu64_Oh0DIZwRUr.png 600w, https://blog.lbdg.me/content/images/2020/07/ConEmu64_Oh0DIZwRUr.png 668w"></figure><p>Du c&#xF4;t&#xE9; ECS ont voit bien nos donn&#xE9;es. Avec la d&#xE9;duplcation, les donn&#xE9;es ne prennent qu&apos;une partie r&#xE9;duite de l&apos;espace :</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/07/firefox_2juqDT0v19.png" class="kg-image" alt="Dell ECS - Restic" loading="lazy" width="468" height="270"></figure><p>Et il est m&#xEA;me possible de suivre les performances sur une certaine p&#xE9;riode</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/07/firefox_HkoANiNUgO.png" class="kg-image" alt="Dell ECS - Restic" loading="lazy" width="609" height="255" srcset="https://blog.lbdg.me/content/images/size/w600/2020/07/firefox_HkoANiNUgO.png 600w, https://blog.lbdg.me/content/images/2020/07/firefox_HkoANiNUgO.png 609w"></figure><p>Restic fonctionne sous un principe de snapshot que nous pouvons consid&#xE9;rer comme des points de r&#xE9;tention, pour les lister </p><pre><code>restic -r s3:beta.cloudstart.fr/bucket-de-test snapshots</code></pre><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/07/ConEmu64_pIvQUXe6N4-1.png" class="kg-image" alt="Dell ECS - Restic" loading="lazy" width="980" height="160" srcset="https://blog.lbdg.me/content/images/size/w600/2020/07/ConEmu64_pIvQUXe6N4-1.png 600w, https://blog.lbdg.me/content/images/2020/07/ConEmu64_pIvQUXe6N4-1.png 980w" sizes="(min-width: 720px) 720px"></figure><p>Plusieurs options sont disponibles pour la restauration, par exemple restaurer l&apos;ensemble des donn&#xE9;es depuis un snapshot pr&#xE9;cis. Nous n&apos;indirons pas la date, ni le chemin d&#xE9;sir&#xE9; pour le snapshot, mais son ID, par exemple acd25382 qui est celui du 07-09-2020 &#xE0; 18h43</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/07/image.png" class="kg-image" alt="Dell ECS - Restic" loading="lazy" width="1394" height="78" srcset="https://blog.lbdg.me/content/images/size/w600/2020/07/image.png 600w, https://blog.lbdg.me/content/images/size/w1000/2020/07/image.png 1000w, https://blog.lbdg.me/content/images/2020/07/image.png 1394w" sizes="(min-width: 720px) 720px"></figure><p>Je v&#xE9;rifie simplement les donn&#xE9;es avec une commande sha et, pas de souci :</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/07/ConEmu64_emCF5Z1FCN.png" class="kg-image" alt="Dell ECS - Restic" loading="lazy" width="930" height="87" srcset="https://blog.lbdg.me/content/images/size/w600/2020/07/ConEmu64_emCF5Z1FCN.png 600w, https://blog.lbdg.me/content/images/2020/07/ConEmu64_emCF5Z1FCN.png 930w" sizes="(min-width: 720px) 720px"></figure><h2 id="la-suite">La suite</h2><p>Les sauvegardes et scripts pr&#xE9;sent&#xE9;s sont tr&#xE8;s somm&#xE8;res et on ne suit pas forc&#xE9;ment les dites sauvegarde. Avec quelques modifications des scripts, j&apos;arrive au monitoring suivant : </p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/07/image-1.png" class="kg-image" alt="Dell ECS - Restic" loading="lazy" width="1155" height="237" srcset="https://blog.lbdg.me/content/images/size/w600/2020/07/image-1.png 600w, https://blog.lbdg.me/content/images/size/w1000/2020/07/image-1.png 1000w, https://blog.lbdg.me/content/images/2020/07/image-1.png 1155w" sizes="(min-width: 720px) 720px"></figure><p>Ce sont des &#xE9;l&#xE9;ments que j&apos;aborderais dans d&apos;autres articles si cela vous int&#xE9;resse !</p>]]></content:encoded></item><item><title><![CDATA[Install HP SPP on Windows core]]></title><description><![CDATA[<p>HP SPP is very usefull to install all the drivers &amp; tools needed for HP integration, and the tool is designed a way that you can use it on Windows Core, here&apos;s how.</p><p>Use administrative share to send SPP to the Windows core machine</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/03/image.png" class="kg-image" alt loading="lazy"></figure><p>Use powershell to mount</p>]]></description><link>https://blog.lbdg.me/install-hp-spp-on-windows-core/</link><guid isPermaLink="false">65d45a3f4312873a60d57404</guid><dc:creator><![CDATA[Vincent C.]]></dc:creator><pubDate>Mon, 30 Mar 2020 10:39:51 GMT</pubDate><content:encoded><![CDATA[<p>HP SPP is very usefull to install all the drivers &amp; tools needed for HP integration, and the tool is designed a way that you can use it on Windows Core, here&apos;s how.</p><p>Use administrative share to send SPP to the Windows core machine</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/03/image.png" class="kg-image" alt loading="lazy"></figure><p>Use powershell to mount the image</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/03/image-1.png" class="kg-image" alt loading="lazy"></figure><pre><code>Mount-DiskImage -ImagePath &quot;C:\YourIsoName.iso&quot; -StorageType ISO -Passthough</code></pre><p>Then use <strong>get-volume </strong>to see the drive letter affected to the CD</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/03/image-3.png" class="kg-image" alt loading="lazy"></figure><p>Dive intoo the volume F:</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/03/image-4.png" class="kg-image" alt loading="lazy"></figure><p>Run</p><pre><code>launch_sum.bat</code></pre><p>It open a new Windows with the launching script in it</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/03/image-5.png" class="kg-image" alt loading="lazy"></figure><p>Use another machine with a browser installed and connect to port 63002 on the machine IP</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.lbdg.me/content/images/2020/03/image-6.png" class="kg-image" alt loading="lazy"><figcaption>Yeah, sorry I only have Internet Explorer on this gateway machine</figcaption></figure><p>Accept the certificate error</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/03/image-7.png" class="kg-image" alt loading="lazy"></figure><p>Then you can connect with an administrator account</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/03/image-8.png" class="kg-image" alt loading="lazy"></figure><p>And it&apos;s a normal SPP usage, when you install all the driver you need</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2020/03/image-10.png" class="kg-image" alt loading="lazy"></figure>]]></content:encoded></item><item><title><![CDATA[HUE motion sensor temperature to InfluxDB]]></title><description><![CDATA[HUE motion sensor temperature to InfluxDB]]></description><link>https://blog.lbdg.me/hue-motion-sensor-to-influxdb-grafana/</link><guid isPermaLink="false">65d45a3f4312873a60d57401</guid><category><![CDATA[hue]]></category><category><![CDATA[grafana]]></category><category><![CDATA[influxdb]]></category><dc:creator><![CDATA[Vincent C.]]></dc:creator><pubDate>Fri, 30 Aug 2019 21:06:50 GMT</pubDate><media:content url="https://blog.lbdg.me/content/images/2019/08/Banni-re.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.lbdg.me/content/images/2019/08/Banni-re.png" alt="HUE motion sensor temperature to InfluxDB"><p>Last night, I was broswing my HUE app, and I saw that my <strong>motion sensor did send temperature</strong> information.</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/08/20190829_145122.jpg" class="kg-image" alt="HUE motion sensor temperature to InfluxDB" loading="lazy"></figure><p>So, I instantly wanted to add this input temperature to my <strong>Grafana dashboard</strong>.</p><h1 id="hue-api">HUE API</h1><p>I&apos;ve read the introduction about<strong> token generation</strong> on the official philips hue documentation : <a href="https://developers.meethue.com/develop/get-started-2/?ref=blog.lbdg.me">https://developers.meethue.com/develop/get-started-2/</a></p><h3 id="discovery">Discovery</h3><p>To automate the process of token generation <strong>OR </strong>if you don&apos;t know the IP address of your bridge, you wan surf on this page : <a href="https://discovery.meethue.com/?ref=blog.lbdg.me">https://discovery.meethue.com/</a> but you need to be on the same network as your hue bridge (or with m-dns rules).</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.lbdg.me/content/images/2019/08/opera_2019-08-30_19-58-18.png" class="kg-image" alt="HUE motion sensor temperature to InfluxDB" loading="lazy"><figcaption>Exemple with Opera browser</figcaption></figure><p>As you can see, the answer is a <strong>JSON format </strong>(I&apos;ve hidden the bridge ID) and the <strong>internalipaddress </strong>is 192.168.100.50 (IOT VLAN in my case). It also works with curl / wget / others broswers :</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.lbdg.me/content/images/2019/08/putty_2019-08-30_10-45-22.png" class="kg-image" alt="HUE motion sensor temperature to InfluxDB" loading="lazy"><figcaption>Discovery process with curl</figcaption></figure><p>You can test it by browsing the IP address </p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.lbdg.me/content/images/2019/08/image-1.png" class="kg-image" alt="HUE motion sensor temperature to InfluxDB" loading="lazy"><figcaption>Browsing the bridge IP address</figcaption></figure><h3 id="token-generation">Token generation</h3><p>Before I read the documentation, in my mind : <em>the application needed to initiate the token generation before pressing the link button on the bridge</em>, but ... The application doesn&apos;t need to initiate anything before, <strong>you need to send a token generation request, after pressing the link button.</strong></p><p>The API URL is ... /api (&#x1F44D; philips) and, <strong>the second path in the URL must be the token</strong>. If you send a fake / wrong token you&apos;ll have the message</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.lbdg.me/content/images/2019/08/putty_2019-08-30_10-46-40.png" class="kg-image" alt="HUE motion sensor temperature to InfluxDB" loading="lazy"><figcaption>Wrong token error message</figcaption></figure><p>You need to send a <strong>JSON encoded POST request with the device type you &quot;need&quot; </strong>to process the <strong>token registration</strong>. It can be anything. <em>Philips hue documentation exemple </em>: </p><pre><code>{&quot;devicetype&quot;:&quot;my_hue_app#iphone peter&quot;}</code></pre><p>So, I prepared the JSON encoded POST request with CURL, then <strong>I pressed my bridge link, and immediatly AFTER I ran this CURL command</strong> </p><pre><code>curl -d &apos;{&quot;devicetype&quot;:&quot;test#monitor01&quot;}&apos; -H &quot;Content-Type: application/json&quot; -X POST http://192.168.100.50/api</code></pre><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.lbdg.me/content/images/2019/08/putty_2019-08-30_10-54-02.png" class="kg-image" alt="HUE motion sensor temperature to InfluxDB" loading="lazy"><figcaption>The curl result with a echo for better spacing</figcaption></figure><p>The request response is simple : the status (<strong>success</strong>), and our <strong>username </strong>(which is actually a <strong>token</strong>). <strong>Keep it securely. </strong>If you don&apos;t run the command fast enough, you&apos;ll have this error </p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/08/image-2.png" class="kg-image" alt="HUE motion sensor temperature to InfluxDB" loading="lazy"></figure><h3 id="list-all-sensors">List all sensors</h3><p>Now, we have the <strong>IP address of the hue bridge and a functionnal token</strong>, we could list all sensors by sending this request</p><pre><code>curl http://192.168.100.50/api/YOURTOKENHERE/sensors</code></pre><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.lbdg.me/content/images/2019/08/putty_2019-08-30_20-31-01.png" class="kg-image" alt="HUE motion sensor temperature to InfluxDB" loading="lazy"><figcaption>All the sensors linked to my bridge</figcaption></figure><p>It&apos;s JSON format and could easily by parsed by using <strong>jq </strong>command, a simple pipe to <strong>jq </strong>will display the informations in a JSON conventionnal reading format, this will help to understand the structure and will be used after to extract the datas.</p><pre><code>curl http://192.168.100.50/api/YOURTOKENHERE/sensors|jq</code></pre><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.lbdg.me/content/images/2019/08/putty_2019-08-30_20-35-33.png" class="kg-image" alt="HUE motion sensor temperature to InfluxDB" loading="lazy"><figcaption>Result with the |jq</figcaption></figure><p>As you can see, <strong>there is an ID and a name, you can scroll until you find the sensor</strong> you need.</p><p>Also, you can use this <strong>command to only extract the ID and the name</strong></p><pre><code>curl -s  http://192.168.100.50/api/YOURTOKENHERE/sensors|jq -r &apos;keys[] as $k| &quot;\($k) \(.[$k].name)&quot;&apos;</code></pre><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/08/putty_2019-08-30_20-52-45-1.png" class="kg-image" alt="HUE motion sensor temperature to InfluxDB" loading="lazy"></figure><p>As you can see I have a lot of &#xA0;<strong>sensors</strong>, but a <strong>sensor is not a full device</strong>, it&apos;s just a sensor. For exemple, the motion sensor create a least this sensors : </p><ul><li>The motion sensor (5 in my previous list)</li><li>The temperature sensor (4 in my previous list)</li><li>The ambiant light sensor (6 in in my previous list)</li></ul><h3 id="use-a-sensor">Use a sensor</h3><p>Now that we have spotted all the sensors we need (<strong>4 </strong>for <strong>temperature </strong>and <strong>6 </strong>for <strong>lux</strong>) we want to display all the informations contained by the sensor. The request is simple <em>(jq is only for human reading purpose) </em>: </p><pre><code>curl http://192.168.100.50/api/YOURTOKENHERE/sensors/4|jq</code></pre><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/08/putty_2019-08-30_11-10-05.png" class="kg-image" alt="HUE motion sensor temperature to InfluxDB" loading="lazy"></figure><p>We see</p><ul><li>The temperature (in celcius and that need to be divided by 100, I guess a int to float trick)</li><li>The battery level</li><li>The name</li></ul><p>We have all the informations we want, it&apos;s extraction time ! As mentionned earlier, I will be using JQ : </p><pre><code>curl http://192.168.100.50/api/YOURTOKENHERE/sensors/6|jq .state</code></pre><p>It&apos;s keeps all the state part</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/08/putty_2019-08-30_11-10-24.png" class="kg-image" alt="HUE motion sensor temperature to InfluxDB" loading="lazy"></figure><p>And finally </p><pre><code>curl http://192.168.100.50/api/YOURTOKENHERE/sensors/6|jq .state.temperature</code></pre><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/08/putty_2019-08-30_11-10-41.png" class="kg-image" alt="HUE motion sensor temperature to InfluxDB" loading="lazy"></figure><p>2454 (so 24.54 &#xB0;C).</p><h2 id="everything-in-a-script">Everything in a script</h2><p>The final script <strong>temp-hue.sh, </strong>I <strong>used the -s parameter </strong>to prevent curl to display the request status, and I do use bc to calculated the float value</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/08/putty_2019-08-30_11-59-21.png" class="kg-image" alt="HUE motion sensor temperature to InfluxDB" loading="lazy"></figure><pre><code>#!/bin/bash

token=&quot;YOURTOKENHERE&quot;
ip_bridge=&quot;192.168.100.50&quot;
temp=$(curl -s &quot;http://$ip_bridge/api/$token/sensors/4&quot;|jq .state.temperature)
temp=$(echo &quot;scale=2;$temp / 100&quot;|bc)

lux=$(curl -s &quot;http://$ip_bridge/api/$token/sensors/6&quot;|jq .state.lightlevel)

echo &quot;philips-hue,device=capteur-salon temperature=$temp,lux=$lux&quot;</code></pre><p>And ... The telegraf input exec</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/08/putty_2019-08-30_11-14-30.png" class="kg-image" alt="HUE motion sensor temperature to InfluxDB" loading="lazy"></figure><p>Then the owner and execution flag for the script file</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/08/putty_2019-08-30_11-15-43.png" class="kg-image" alt="HUE motion sensor temperature to InfluxDB" loading="lazy"></figure><p>And finally <strong>service telegraf restart</strong></p><p>Now I switched to my grafana dashboard and created a dashboard to visualize the new incoming data</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/08/image-3.png" class="kg-image" alt="HUE motion sensor temperature to InfluxDB" loading="lazy"></figure><p>If you have any question, please react on <a href="https://www.reddit.com/r/homelab/comments/cxmy9r/philips_hue_temperature_monitoring_grafana/?ref=blog.lbdg.me">https://www.reddit.com/r/homelab/comments/cxmy9r/philips_hue_temperature_monitoring_grafana/</a></p>]]></content:encoded></item><item><title><![CDATA[QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2]]></title><description><![CDATA[Backup your data from QNAP to BackBlaze B2 with Hybrid Backup Sync 3.0]]></description><link>https://blog.lbdg.me/qnap-hybrid-backup-sync-3-0-to-backblaze-b2/</link><guid isPermaLink="false">65d45a3f4312873a60d573ff</guid><category><![CDATA[qnap]]></category><category><![CDATA[backblaze]]></category><dc:creator><![CDATA[Vincent C.]]></dc:creator><pubDate>Thu, 13 Jun 2019 19:55:16 GMT</pubDate><media:content url="https://blog.lbdg.me/content/images/2019/06/Banniere-2.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.lbdg.me/content/images/2019/06/Banniere-2.png" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2"><p>In this article I&apos;ll show you how to backup your data from QNAP to BackBlaze B2 object storage, by using Hybrid Backup Sync 3</p><p>HBS 3 is in beta, you can tested it out here : <a href="https://www.qnap.com/solution/hbs3?ref=blog.lbdg.me">https://www.qnap.com/solution/hbs3</a><br>You can ask / comment on this reddit post : <a href="https://www.reddit.com/r/homelab/comments/c0am7v/qnap_hybrid_backup_sync_30_to_backblaze_b2/?ref=blog.lbdg.me">https://www.reddit.com/r/homelab/comments/c0am7v/qnap_hybrid_backup_sync_30_to_backblaze_b2/</a></p><p>Here&apos;s the backup plan</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/Sauvegarde-important.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><p></p><!--kg-card-begin: markdown--><ol>
<li>My PROXMOX node backup all very important VM on a QNAP volume with only one backup retain</li>
<li>Hybrid Backup Sync backup all the data to B2 object storage with a 30 days retain on all data</li>
</ol>
<!--kg-card-end: markdown--><h2 id="create-the-bucket-on-backblaze">Create the bucket on BackBlaze</h2><p>Before going on QNAP, we need to define the bucket, in my example, the bucket name would be <strong>qnap-tuto-lbdg</strong></p><p>In the object storage world, the bucket is the &quot;data deposit&quot;</p><p>First logon your BackBlaze account, and browse on <strong>Buckets</strong></p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-27-09-1.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><p>Then, create a new bucket<br>Choose a name for the bucket, and set it as <strong>Private</strong></p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-27-29.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><p>The bucket is created, now, I don&apos;t recommand to use your master key to connect from QNAP, so we create a new application key</p><p>Click on the App Keys menu </p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-27-42.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><p>Then <strong>Add a New Application Key</strong></p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-28-01-1.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><!--kg-card-begin: markdown--><ul>
<li>Chose a name for the key, it could be everything, it&apos;s more like a description</li>
<li>Select to allow access on qnap-tuto-lbdg (previously created bucket)</li>
<li>Chose Write-Read</li>
</ul>
<!--kg-card-end: markdown--><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-28-21.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-28-33.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><p>And create new key. <strong>At this point, don&apos;t leave the page.</strong><br>BackBlaze will display a <strong>keyID </strong>&amp; an <strong>applicationKey</strong>, the applicationKey only shows at this point and never could be displayed after.</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-29-04.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><h2 id="configuration-the-storage-space-on-hbs-3">Configuration the Storage Space on HBS 3</h2><p>The new HBS 3 have more &quot;split configuration&quot; for the backup / sync jobs</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-29-22.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><h3 id="create-the-backblaze-profile-on-storage-spaces">Create the BackBlaze profile on Storage Spaces</h3><p>We browse to Storage Spaces to define the BackBlaze profil that will be used for the backup job.</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-29-44-2.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><p>We create a new profil for Storage Spaces</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-30-00.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><p>Select the service you want to connect, in our case, BackBlaze B2</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-30-17.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><p>The login informations are</p><!--kg-card-begin: markdown--><table>
<thead>
<tr>
<th>QNAP term</th>
<th>BackBlaze term</th>
</tr>
</thead>
<tbody>
<tr>
<td>Account ID</td>
<td>==&gt; keyID</td>
</tr>
<tr>
<td>Application Key</td>
<td>==&gt; applicationKey</td>
</tr>
</tbody>
</table>
<!--kg-card-end: markdown--><p>Fill the forms with the previous generated app keys on the BackBlaze website</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-30-44.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><p>And then press create.<br>Now, the BackBlaze profile is created and can be used for the backup / restore configuration</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-31-01.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><h3 id="create-the-backup-job">Create the backup job</h3><p>We create a backup job, that we can scheduled after the proxmox backup</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-31-21.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><p>We select the concerned folder to backup &quot;pve01-important&quot; </p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-42-30.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><p>Then the destination, BackBlaze B2 :</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-42-48.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><p>We see the previously BackBlaze profile, this contain all the connexion datas</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-43-12.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><p>And we scroll down to the BackBlaze B2 bucket name which we give access to ; and choose a multipart size, which is the size a single request on backblaze</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-43-38.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><p>We also need to create a folder on the bucket, we cannot upload on the root folder</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-44-14.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-44-36.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><p>A short summary of the source and destination</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-44-57.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><p>It could be enought for a simple backup job, but we want retention.</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-45-17.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><p>We go on the Policies tag, and check Remove deleted data from the destination, and define a retention of 30 days</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-45-53.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><p>The last summary before creating the job</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-46-31.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><p>Then the job will process</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-50-10.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><p>After ~15 minutes for 5.5 GB, the job is finished</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_14-11-37.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><p>In the BackBlaze website, we saw our files.</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/06/firefox_2019-06-12_13-58-48.png" class="kg-image" alt="QNAP - Hybrid Backup Sync 3.0 to BackBlaze B2" loading="lazy"></figure><h3 id="resume">Resume</h3><p>My average upload rate on BackBlaze B2 is 4.5 MB/sec. But my internet connexion is 500 Mbps. BackBlaze told me that is the performance for their service, it could be better with more parallel tasks.</p><p>Here&apos;s some results :</p><!--kg-card-begin: markdown--><table>
<thead>
<tr>
<th>Size</th>
<th>Duration</th>
</tr>
</thead>
<tbody>
<tr>
<td>5 GB</td>
<td>20 minutes</td>
</tr>
<tr>
<td>51.6 GB</td>
<td>4 hours and 15 minutes</td>
</tr>
</tbody>
</table>
<!--kg-card-end: markdown--><p>BackBlaze is affordable and less than 1$ (for 100 GB) a month is worth it to have peace of mind over critical data</p>]]></content:encoded></item><item><title><![CDATA[Proxmox BACKUP - Cannot allocate memory]]></title><description><![CDATA[Solution
INFO: starting kvm to execute backup task
ioctl(KVM_CREATE_VM) failed: 12 Cannot allocate memory]]></description><link>https://blog.lbdg.me/proxmox-backup/</link><guid isPermaLink="false">65d45a3f4312873a60d573fe</guid><category><![CDATA[proxmox]]></category><dc:creator><![CDATA[Vincent C.]]></dc:creator><pubDate>Sun, 19 May 2019 15:14:23 GMT</pubDate><content:encoded><![CDATA[<p>If you have this message <strong>KVM : cannot allocate memory</strong> when you run a backup on Proxmox VE, this is probably because all your remain memory is in buff / cache of your system.</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/05/firefox_2019-05-19_16-15-50.png" class="kg-image" alt loading="lazy"></figure><p>I checked mine and </p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/05/image-11.png" class="kg-image" alt loading="lazy"></figure><p>7.2 Go in buff/cache</p><p>The solution could be a crontab that drop cache every 15 minutes, but ... This is not so great for I/O performance.</p><p>Si I add in <strong>/etc/vzdump.conf </strong>a hook script, with <strong>script: </strong>definition </p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/05/putty_2019-05-19_16-15-37-1.png" class="kg-image" alt loading="lazy"></figure><p>This is what the script looks like</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/05/putty_2019-05-19_16-15-21-1.png" class="kg-image" alt loading="lazy"></figure><p>When the backup start, it will drop the caches and the backup will be successfull.</p><figure class="kg-card kg-image-card"><img src="https://blog.lbdg.me/content/images/2019/05/firefox_2019-05-19_17-13-41.png" class="kg-image" alt loading="lazy"></figure>]]></content:encoded></item></channel></rss>