<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.dxcluster.org/w/index.php?action=history&amp;feed=atom&amp;title=Node_Backup_and_Update_with_check_build</id>
	<title>Node Backup and Update with check build - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dxcluster.org/w/index.php?action=history&amp;feed=atom&amp;title=Node_Backup_and_Update_with_check_build"/>
	<link rel="alternate" type="text/html" href="https://wiki.dxcluster.org/w/index.php?title=Node_Backup_and_Update_with_check_build&amp;action=history"/>
	<updated>2026-04-05T20:11:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.dxcluster.org/w/index.php?title=Node_Backup_and_Update_with_check_build&amp;diff=470&amp;oldid=prev</id>
		<title>Dxcadmin: /* 📲 Telegram integration (optional) */</title>
		<link rel="alternate" type="text/html" href="https://wiki.dxcluster.org/w/index.php?title=Node_Backup_and_Update_with_check_build&amp;diff=470&amp;oldid=prev"/>
		<updated>2025-11-22T16:40:41Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;📲 Telegram integration (optional)&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:40, 22 November 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l97&quot;&gt;Line 97:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 97:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* A backup completes&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* A backup completes&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For full setup instructions, see:  [&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;https://wiki.dxcluster.org/wiki/&lt;/del&gt;Sending_messages_to_the_sysop_via_Telegram Sending messages to the sysop via Telegram]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For full setup instructions, see:  [&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[&lt;/ins&gt;Sending_messages_to_the_sysop_via_Telegram&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|&lt;/ins&gt;Sending messages to the sysop via Telegram&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]&lt;/ins&gt;]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 🧠 Notes ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 🧠 Notes ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key dxcwiki-dxcw_:diff:1.41:old-384:rev-470:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Dxcadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.dxcluster.org/w/index.php?title=Node_Backup_and_Update_with_check_build&amp;diff=384&amp;oldid=prev</id>
		<title>EA3CV: Created page with &quot; = 🛠️ Node Backup and Update with check_build =  == 📋 Description == The `check_build` command is a DXSpider utility script that checks for new builds (updates) in the MOJO branch. If a new build is available, it can:  * Perform a full backup of the current node installation * Retain previous backup archives * Automatically update the node (Git hard reset + pull)  This tool does not aim to replace the standard `git` update method, but is especially useful for sys...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.dxcluster.org/w/index.php?title=Node_Backup_and_Update_with_check_build&amp;diff=384&amp;oldid=prev"/>
		<updated>2025-04-09T16:55:40Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; = 🛠️ Node Backup and Update with check_build =  == 📋 Description == The `check_build` command is a DXSpider utility script that checks for new builds (updates) in the MOJO branch. If a new build is available, it can:  * Perform a full backup of the current node installation * Retain previous backup archives * Automatically update the node (Git hard reset + pull)  This tool does not aim to replace the standard `git` update method, but is especially useful for sys...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
= 🛠️ Node Backup and Update with check_build =&lt;br /&gt;
&lt;br /&gt;
== 📋 Description ==&lt;br /&gt;
The `check_build` command is a DXSpider utility script that checks for new builds (updates) in the MOJO branch. If a new build is available, it can:&lt;br /&gt;
&lt;br /&gt;
* Perform a full backup of the current node installation&lt;br /&gt;
* Retain previous backup archives&lt;br /&gt;
* Automatically update the node (Git hard reset + pull)&lt;br /&gt;
&lt;br /&gt;
This tool does not aim to replace the standard `git` update method, but is especially useful for sysops who are cautious about updates potentially breaking their nodes. In case of failure, a full backup ensures the service can be restored quickly.&lt;br /&gt;
&lt;br /&gt;
The script can be run manually from the DXSpider shell or scheduled via `crontab`.&lt;br /&gt;
&lt;br /&gt;
== ⚙️ Features ==&lt;br /&gt;
&lt;br /&gt;
* Verifies if a newer build is available on the remote repository.&lt;br /&gt;
* If backup is enabled:&lt;br /&gt;
** Creates a full backup using `rsync`&lt;br /&gt;
** Compresses it as `spider.YYYYMMDD.HHMMSS.tar.gz`&lt;br /&gt;
** Retains up to a configurable number of backup files&lt;br /&gt;
* Performs a full Git reset and update&lt;br /&gt;
* Optionally notifies via Telegram if configured&lt;br /&gt;
&lt;br /&gt;
== ▶️ Usage ==&lt;br /&gt;
From the DXSpider shell:&amp;lt;pre&amp;gt;&lt;br /&gt;
check_build &amp;lt;Y/N&amp;gt; &amp;lt;num_backups&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;Where:&lt;br /&gt;
&lt;br /&gt;
* `Y` = Enable backup before updating&lt;br /&gt;
* `N` = Update without backup&lt;br /&gt;
* `num_backups` = Number of backups to retain (default: 10)&lt;br /&gt;
&lt;br /&gt;
== 🕒 Example crontab configuration ==&lt;br /&gt;
Run the command Monday to Friday at 04:00 with backup enabled, keeping 7 backups:&amp;lt;pre&amp;gt;&lt;br /&gt;
0 4 * * 1,2,3,4,5 run_cmd(&amp;quot;check_build Y 7&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;Update the script daily (thanks to G6NHU) with:&amp;lt;pre&amp;gt;&lt;br /&gt;
30 0 * * * spawn(&amp;#039;cd /spider/local_cmd; wget -qN https://raw.githubusercontent.com/EA3CV/dxspider_info/main/check_build.pl -O /spider/local_cmd/check_build.pl&amp;#039;)&lt;br /&gt;
32 0 * * * run_cmd(&amp;#039;load/cmd&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 💾 Installation ==&lt;br /&gt;
Download the script from the official repository:&lt;br /&gt;
&lt;br /&gt;
[https://github.com/EA3CV/dxspider_info/blob/main/check_build.pl View on GitHub - check_build.pl]&lt;br /&gt;
&lt;br /&gt;
Save it as:&amp;lt;pre&amp;gt;&lt;br /&gt;
/spider/local_cmd/check_build.pl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 🔄 Restoring a backup ==&lt;br /&gt;
If something goes wrong during the update:&lt;br /&gt;
&lt;br /&gt;
1. Locate the latest backup archive in `/home/sysop/spider.backup` &lt;br /&gt;
&lt;br /&gt;
2. Decompress it:&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /home/sysop&lt;br /&gt;
tar -xzvf spider.backup/spider.YYYYMMDD.HHMMSS.tar.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;3. Replace the current `/spider` directory with the extracted backup&lt;br /&gt;
&lt;br /&gt;
4. Restart DXSpider&lt;br /&gt;
&lt;br /&gt;
== ⏪ Alternative: Using undo_newbuild.pl ==&lt;br /&gt;
If installed, the `undo_newbuild.pl` script allows you to quickly restore the most recent backup made by `check_build`.&lt;br /&gt;
&lt;br /&gt;
Simply run:&amp;lt;pre&amp;gt;&lt;br /&gt;
set/undo_newbuild&lt;br /&gt;
&amp;lt;/pre&amp;gt;This command will:&lt;br /&gt;
&lt;br /&gt;
* Locate the latest backup archive in `/home/sysop/spider.backup`&lt;br /&gt;
* Decompress and restore it&lt;br /&gt;
* Restart the node automatically&lt;br /&gt;
&lt;br /&gt;
=== 📥 Download ===&lt;br /&gt;
You can download the script from the repository:&lt;br /&gt;
&lt;br /&gt;
[https://github.com/EA3CV/dxspider_info/blob/main/undo_newbuild.pl View on GitHub - undo_newbuild.pl]&lt;br /&gt;
&lt;br /&gt;
Save it as:&amp;lt;pre&amp;gt;&lt;br /&gt;
/spider/local_cmd/undo_newbuild.pl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 📦 Dependencies ==&lt;br /&gt;
This script requires:&lt;br /&gt;
&lt;br /&gt;
* Git&lt;br /&gt;
* rsync&lt;br /&gt;
&lt;br /&gt;
To install `rsync` on Debian-based systems:&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install rsync&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 📲 Telegram integration (optional) ==&lt;br /&gt;
If the `telegram()` function is defined in `Local.pm` and Telegram bot variables (`$id`, `$token`) are set in `DXVars.pm`, the script will send notifications when:&lt;br /&gt;
&lt;br /&gt;
* A backup starts&lt;br /&gt;
* A backup completes&lt;br /&gt;
&lt;br /&gt;
For full setup instructions, see:  [https://wiki.dxcluster.org/wiki/Sending_messages_to_the_sysop_via_Telegram Sending messages to the sysop via Telegram]&lt;br /&gt;
&lt;br /&gt;
== 🧠 Notes ==&lt;br /&gt;
&lt;br /&gt;
* Only supports the **MOJO branch** of DXSpider.&lt;br /&gt;
* Backup directory: `/home/sysop/spider.backup`&lt;br /&gt;
* Automatically excludes heavy folders: debug logs, spots, wwv, wcy, etc.&lt;br /&gt;
* Recommended for sysops who want to automate update and backup tasks with minimal risk.&lt;br /&gt;
&lt;br /&gt;
== 👨‍💻 Author ==&lt;br /&gt;
&lt;br /&gt;
* Kin EA3CV* — [mailto:ea3cv@cronux.net](mailto:ea3cv@cronux.net)&lt;/div&gt;</summary>
		<author><name>EA3CV</name></author>
	</entry>
</feed>