<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://www.marcelpost.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Dirsync</id>
	<title>Dirsync - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.marcelpost.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Dirsync"/>
	<link rel="alternate" type="text/html" href="https://www.marcelpost.com/wiki/index.php?title=Dirsync&amp;action=history"/>
	<updated>2026-06-11T23:27:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://www.marcelpost.com/wiki/index.php?title=Dirsync&amp;diff=352&amp;oldid=prev</id>
		<title>Admin at 00:22, 29 September 2011</title>
		<link rel="alternate" type="text/html" href="https://www.marcelpost.com/wiki/index.php?title=Dirsync&amp;diff=352&amp;oldid=prev"/>
		<updated>2011-09-29T00:22:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Dirsync is a script I wrote to synchronise directories when a system boots up or shuts down. &lt;br /&gt;
&lt;br /&gt;
Background&lt;br /&gt;
&lt;br /&gt;
To provide some basic network functionality (DNS, logging stats, a webserver, etc..) I used to run Debian on a Linksys NSLU2 for many years. The NSLU2 is a small device, fanless with an internal Disk-on-chip (flash) for storing the original Operating System (with Debian it&amp;#039;s running off a 1GB USB flash drive). Around June 2010 I upgraded to a more powerful alternative, the Sheeva Plug. Small, fanless, internal flash and an SDCard slot (from which I&amp;#039;m running the O/S). I leave these machines running 24/7 and I want them to be quiet and consume as little power as possible. I therefore use an SDCard to place the O/S on. Since SDCards fail much faster than spinning HDD&amp;#039;s during normal operation I make sure the system is optimised to write as little to the disk as possible. Most logging is turned off, I make extensive use of RAM filesystems (ramfs) and for additional (non-O/S) data storage I use a 2.5&amp;quot; USB HDD (which spins down and powers off after so many minutes of inactivity).&lt;br /&gt;
&lt;br /&gt;
For logging some system statistics I use rrdtool and to prevent rrdtool from constantly writing to the SDCard flash I put the datbase file (.rrd) in a RAM filesystem.&lt;br /&gt;
&lt;br /&gt;
My main reason for writing this script is because I didn&amp;#039;t want to lose my .rrd files every time the system shuts down. &lt;br /&gt;
&lt;br /&gt;
This script will sync from one directory to another (saving the .rrd from /dev/shm/rrd to /var/lib/rrd) when the system shuts down and copies it back (restoring the database back to /dev/shm/rrd) upon system boot up.&lt;br /&gt;
&lt;br /&gt;
The script also has an &amp;#039;update&amp;#039; feature which updates to the backup directory (to /var/lib/rrd in this example) to make sure we don&amp;#039;t lose too much information in case the server shuts down without going through the normal shutdown procedure (e.g. in case of a power outage). I run the &amp;#039;update&amp;#039; feature only once a week, which is the trade off between losing database information and losing the SDCard due to extensive write cycles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Latest version: [[File:Dirsync-1.0.tar.gz]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www.globalscaletechnologies.com/p-22-sheevaplug-dev-kit-us.aspx&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/SheevaPlug&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/NSLU2&lt;br /&gt;
&lt;br /&gt;
http://www.nslu2-linux.org/&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>