<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Archiwa Bash - soban</title>
	<atom:link href="https://soban.pl/tag/bash-en/feed/" rel="self" type="application/rss+xml" />
	<link>https://soban.pl/tag/bash-en/</link>
	<description>IT, Linux, Servers, Security</description>
	<lastBuildDate>Mon, 16 Feb 2026 11:19:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>Automatic upgrade Debian 12 → Debian 13 with optional PHP and nginx update</title>
		<link>https://soban.pl/upgrade-debian-12-to-13-2/</link>
		
		<dc:creator><![CDATA[soban]]></dc:creator>
		<pubDate>Mon, 16 Feb 2026 11:15:42 +0000</pubDate>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">https://soban.pl/?p=709</guid>

					<description><![CDATA[<p>Upgrading Debian from version 12 (bookworm) to 13 (trixie) is an operation that should be performed in a repeatable and predictable way, especially on servers and containers (for example Proxmox LXC or virtual machines). Below you will find a simple guide and ready-to-use commands to download and run the upgrade script. Before running the upgrade: [&#8230;]</p>
<p>Artykuł <a href="https://soban.pl/upgrade-debian-12-to-13-2/">Automatic upgrade Debian 12 → Debian 13 with optional PHP and nginx update</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-large is-resized">
<img fetchpriority="high" decoding="async" width="1024" height="682" src="https://soban.pl/wp-content/uploads/2026/02/image-1024x682.png" alt="Debian 12 to Debian 13 upgrade" class="wp-image-707" style="width:551px;height:auto" srcset="https://soban.pl/wp-content/uploads/2026/02/image-1024x682.png 1024w, https://soban.pl/wp-content/uploads/2026/02/image-300x200.png 300w, https://soban.pl/wp-content/uploads/2026/02/image-768x511.png 768w, https://soban.pl/wp-content/uploads/2026/02/image.png 1119w" sizes="(max-width: 1024px) 100vw, 1024px" />
</figure>



<p>Upgrading Debian from version 12 (<strong>bookworm</strong>) to 13 (<strong>trixie</strong>) is an operation that should be performed in a repeatable and predictable way, especially on servers and containers (for example Proxmox LXC or virtual machines). Below you will find a simple guide and ready-to-use commands to download and run the upgrade script.</p>



<p><strong>Before running the upgrade:</strong> create a backup or snapshot. In Proxmox, the best option is <code>vzdump</code> or a snapshot. On bare metal, at minimum back up <code>/etc</code>, applications, and databases.</p>



<ul class="wp-block-list">
<li><strong>Proxmox LXC / VM</strong>: backup using vzdump or create a snapshot.</li>
<li><strong>Server</strong>: backup /etc, /var/www, databases (MySQL/PostgreSQL), and SSL certificates.</li>
</ul>



<p>Script download:</p>



<p><a href="https://soban.pl/bash/upgrade_to_debian13.sh" target="_blank" rel="noopener noreferrer">https://soban.pl/bash/upgrade_to_debian13.sh</a></p>



<h2 class="wp-block-heading">1) Backup before upgrade (examples)</h2>



<p>Example backup in Proxmox (run on Proxmox host, replace CTID/VMID):</p>



<pre class="urvanov-syntax-highlighter-plain-tag">vzdump 101 --mode snapshot --compress zstd --storage local</pre>



<p>Example simple filesystem backup on a server (this does not replace a full snapshot, but it&#8217;s better than nothing):</p>



<pre class="urvanov-syntax-highlighter-plain-tag">tar czf /root/backup_before_upgrade.tar.gz /etc /var/www /root</pre>



<h2 class="wp-block-heading">2) Download the script (wget / curl)</h2>



<p>The easiest way is to use <strong>wget</strong>. If the <code>wget</code> command does not work even though the package is installed, use the full path <code>/usr/bin/wget</code>.</p>



<p><strong>Variant A (standard wget):</strong></p>



<pre class="urvanov-syntax-highlighter-plain-tag">apt update
apt install -y wget
cd /root
wget -O upgrade_to_debian13.sh https://soban.pl/bash/upgrade_to_debian13.sh
chmod +x upgrade_to_debian13.sh</pre>



<p><strong>Variant B (wget with full path – useful if PATH is broken):</strong></p>



<pre class="urvanov-syntax-highlighter-plain-tag">apt update
apt install -y wget
cd /root
/usr/bin/wget -O upgrade_to_debian13.sh https://soban.pl/bash/upgrade_to_debian13.sh
chmod +x upgrade_to_debian13.sh</pre>



<p><strong>Variant C (curl):</strong></p>



<pre class="urvanov-syntax-highlighter-plain-tag">apt update
apt install -y curl
cd /root
curl -fsSL -o upgrade_to_debian13.sh https://soban.pl/bash/upgrade_to_debian13.sh
chmod +x upgrade_to_debian13.sh</pre>



<h2 class="wp-block-heading">3) Script help (parameters)</h2>



<p>Before running the upgrade, display available parameters and usage examples:</p>



<pre class="urvanov-syntax-highlighter-plain-tag">cd /root
./upgrade_to_debian13.sh --help</pre>



<h2 class="wp-block-heading">4) Upgrade Debian 12 → Debian 13 (system only)</h2>



<p>If you are currently running Debian 12 (bookworm) and want to perform a system upgrade:</p>



<pre class="urvanov-syntax-highlighter-plain-tag">cd /root
./upgrade_to_debian13.sh</pre>



<p>The script will create a backup of <code>/etc/apt/sources.list</code>, switch repositories to trixie, run <code>apt update</code> and <code>apt full-upgrade</code>, and finally execute <code>autoremove</code> and <code>autoclean</code>.</p>



<h2 class="wp-block-heading">5) Auto-detect PHP/nginx and update if needed</h2>



<p>If the container or VM is running a web stack and you want the script to automatically detect PHP usage (nginx + <code>fastcgi_pass</code>) and upgrade PHP and nginx if necessary:</p>



<pre class="urvanov-syntax-highlighter-plain-tag">cd /root
./upgrade_to_debian13.sh --auto</pre>



<h2 class="wp-block-heading">6) Force PHP and nginx upgrade (PHP-FPM socket fix)</h2>



<p>If you want to force installation or upgrade of PHP and automatically fix nginx configuration to use the correct PHP-FPM socket:</p>



<pre class="urvanov-syntax-highlighter-plain-tag">cd /root
./upgrade_to_debian13.sh --with-php --with-nginx --php-version 8.2</pre>



<p>This command installs PHP 8.2 (php-fpm and common modules) and replaces old PHP-FPM socket paths in nginx configuration with <code>/run/php/php8.2-fpm.sock</code>. Then it runs <code>nginx -t</code> and reloads or restarts services.</p>



<h2 class="wp-block-heading">7) Already running Debian 13? PHP/nginx only mode</h2>



<p>If the system is already running Debian 13 (trixie) and you only want to upgrade PHP and nginx without modifying system repositories:</p>



<pre class="urvanov-syntax-highlighter-plain-tag">cd /root
./upgrade_to_debian13.sh --php-nginx-only --with-php --with-nginx --php-version 8.2</pre>



<h2 class="wp-block-heading">8) Dry-run mode (test mode)</h2>



<p>If you want to see what the script will do without making any changes:</p>



<pre class="urvanov-syntax-highlighter-plain-tag">cd /root
./upgrade_to_debian13.sh --auto --dry-run</pre>



<h2 class="wp-block-heading">9) Troubleshooting: wget installed but not working</h2>



<p>If <code>apt</code> reports wget is installed but the shell shows <code>command not found</code>, it is usually a PATH issue. The easiest workaround is to use the full path: <code>/usr/bin/wget</code>.</p>



<pre class="urvanov-syntax-highlighter-plain-tag">echo "$PATH"
command -v wget || true
ls -l /usr/bin/wget || true
/usr/bin/wget --version || true</pre>



<h2 class="wp-block-heading">Summary</h2>



<p>This solution provides a convenient way to upgrade Debian 12 → Debian 13 and optionally fix common PHP/nginx issues after upgrade (PHP-FPM socket paths, nginx config testing, and service restart). Always create a backup before upgrading and start by running <code>--help</code> to review available options.</p>



<p>Script: <a href="https://soban.pl/bash/upgrade_to_debian13.sh" target="_blank" rel="noopener noreferrer">https://soban.pl/bash/upgrade_to_debian13.sh</a></p>
<p>Artykuł <a href="https://soban.pl/upgrade-debian-12-to-13-2/">Automatic upgrade Debian 12 → Debian 13 with optional PHP and nginx update</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
