<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: Backup Raspberry PI (computer) Data with Rsync to Remote NAS	</title>
	<atom:link href="https://peppe8o.com/backup-raspberry-pi-rsync/feed/" rel="self" type="application/rss+xml" />
	<link>https://peppe8o.com/backup-raspberry-pi-rsync/</link>
	<description>Raspberry PI, Arduino and Electronics made simple</description>
	<lastBuildDate>Sat, 20 Dec 2025 09:04:51 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>
	<item>
		<title>
		By: peppe8o		</title>
		<link>https://peppe8o.com/backup-raspberry-pi-rsync/#comment-74699</link>

		<dc:creator><![CDATA[peppe8o]]></dc:creator>
		<pubDate>Sat, 20 Dec 2025 09:04:51 +0000</pubDate>
		<guid isPermaLink="false">https://peppe8o.com/?p=11771#comment-74699</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://peppe8o.com/backup-raspberry-pi-rsync/#comment-74651&quot;&gt;Pete Warby&lt;/a&gt;.

Hi Pete,
thank you for your feedback. You can improve the bash script by adding a check if the initial mount commands fails and executing a fallback action.

For example, you can define 2 custom functions:
&lt;code&gt;mount_ok() {
    rsync *****
    rsync *****
    *********** 
    umount /mnt/my_nas
}

mount_fail() {
    echo &quot;Mount failed&quot; &gt;&amp;2
    # you can add notifications here
}&lt;/code&gt;

and then execute the following IF statement where the mount_ok() actions are performed when the mount task succeeds, the mount_fail() actions when it fails:
&lt;code&gt;if mount -t cifs //192.168.1.50/backup \
    -o username=backup_user,password=backup_password,vers=2.0 \
    /mnt/my_nas/
then
    mount_ok
else
    mount_fail
fi&lt;/code&gt;

Finally, this command already copies directly to a remote drive (with CIFS). I suspect that it filled your disk when it doesn&#039;t mounted the remote drive and, in this scenario, the OS considered the /mnt/my_nas/ folder as a local folder. With the above check you should avoid this problem.

Hope this can help you.
Best regards,
Giuseppe]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://peppe8o.com/backup-raspberry-pi-rsync/#comment-74651">Pete Warby</a>.</p>
<p>Hi Pete,<br />
thank you for your feedback. You can improve the bash script by adding a check if the initial mount commands fails and executing a fallback action.</p>
<p>For example, you can define 2 custom functions:<br />
<code>mount_ok() {<br />
    rsync *****<br />
    rsync *****<br />
    ***********<br />
    umount /mnt/my_nas<br />
}</p>
<p>mount_fail() {<br />
    echo "Mount failed" >&#038;2<br />
    # you can add notifications here<br />
}</code></p>
<p>and then execute the following IF statement where the mount_ok() actions are performed when the mount task succeeds, the mount_fail() actions when it fails:<br />
<code>if mount -t cifs //192.168.1.50/backup \<br />
    -o username=backup_user,password=backup_password,vers=2.0 \<br />
    /mnt/my_nas/<br />
then<br />
    mount_ok<br />
else<br />
    mount_fail<br />
fi</code></p>
<p>Finally, this command already copies directly to a remote drive (with CIFS). I suspect that it filled your disk when it doesn&#8217;t mounted the remote drive and, in this scenario, the OS considered the /mnt/my_nas/ folder as a local folder. With the above check you should avoid this problem.</p>
<p>Hope this can help you.<br />
Best regards,<br />
Giuseppe</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Pete Warby		</title>
		<link>https://peppe8o.com/backup-raspberry-pi-rsync/#comment-74651</link>

		<dc:creator><![CDATA[Pete Warby]]></dc:creator>
		<pubDate>Fri, 19 Dec 2025 23:57:46 +0000</pubDate>
		<guid isPermaLink="false">https://peppe8o.com/?p=11771#comment-74651</guid>

					<description><![CDATA[Hiya, I&#039;ve tried this before and it worked really well until the NAS wasn&#039;t available. At that point when rsync ran it copied the contents of my 4tb drive to my 120gb OS drive, as that&#039;s where I&#039;d mounted the NAS. That caused obvious issues when the Operating System directory had no free storage left.
Is there a way to do this, but to check if the NAS is mounted before files are copied?

Brilliant tutorial though, I wish I&#039;d used this when I set mine up a few years ago! Would have saved me a lot of bother. 

Uhm. Rather than using rsync to cot to a local, mounted drive, is it possible to use rsync to copy to a remote server address &#038; share???

Hope to hear from you soon. 
Pete]]></description>
			<content:encoded><![CDATA[<p>Hiya, I&#8217;ve tried this before and it worked really well until the NAS wasn&#8217;t available. At that point when rsync ran it copied the contents of my 4tb drive to my 120gb OS drive, as that&#8217;s where I&#8217;d mounted the NAS. That caused obvious issues when the Operating System directory had no free storage left.<br />
Is there a way to do this, but to check if the NAS is mounted before files are copied?</p>
<p>Brilliant tutorial though, I wish I&#8217;d used this when I set mine up a few years ago! Would have saved me a lot of bother. </p>
<p>Uhm. Rather than using rsync to cot to a local, mounted drive, is it possible to use rsync to copy to a remote server address &amp; share???</p>
<p>Hope to hear from you soon.<br />
Pete</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
