<?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>Kevin Deldycke &#187; Script</title> <atom:link href="http://kevin.deldycke.com/tag/script/feed/" rel="self" type="application/rss+xml" /><link>http://kevin.deldycke.com</link> <description>Free software engineer &#38; wannabe videomaker</description> <lastBuildDate>Fri, 03 Feb 2012 19:08:27 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Convert Lotus Notes&#8217; nsf files to mbox with nlconverter</title><link>http://kevin.deldycke.com/2010/09/convert-lotus-notes-nsf-files-mbox-nlconverter/</link> <comments>http://kevin.deldycke.com/2010/09/convert-lotus-notes-nsf-files-mbox-nlconverter/#comments</comments> <pubDate>Thu, 02 Sep 2010 13:17:43 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[English]]></category> <category><![CDATA[CLI]]></category> <category><![CDATA[email]]></category> <category><![CDATA[GUI]]></category> <category><![CDATA[IBM Lotus Notes]]></category> <category><![CDATA[iCal]]></category> <category><![CDATA[mail]]></category> <category><![CDATA[mbox]]></category> <category><![CDATA[nlconverter]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[Script]]></category> <category><![CDATA[windows]]></category> <category><![CDATA[Windows 2000]]></category><guid isPermaLink="false">http://kevin.deldycke.com/?p=1848</guid> <description><![CDATA[There is a great piece of software called nlconverter. It&#8217;s a tool designed to convert Lotus Notes&#8217; .nsf files to mbox. It rely on win32&#8242;s COM/DDE API so it can only be used on Windows. If you want to extract &#8230; <a href="http://kevin.deldycke.com/2010/09/convert-lotus-notes-nsf-files-mbox-nlconverter/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>There is a great piece of software called <a href="http://code.google.com/p/nlconverter/">nlconverter</a>. It&#8217;s a tool designed to convert Lotus Notes&#8217; <code>.nsf</code> files to <code>mbox</code>. It rely on win32&#8242;s COM/DDE API so it can only be used on Windows.</p><p>If you want to extract mails out of your <code>.nsf</code> database, this might be the tool you&#8217;re looking for. Bonus point: it&#8217;s written in Python ! <img src='http://kevin.deldycke.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p><h2>Installing nlconverter and its dependencies</h2><p>Here is how I installed <code>nlconverter</code> on a <a href="http://www.amazon.com/gp/product/B0006HMWO4/ref=as_li_tf_tl?ie=UTF8&#038;tag=kevideld-20&#038;linkCode=as2&#038;camp=217145&#038;creative=399381&#038;creativeASIN=B0006HMWO4">Windows 2000</a> (SP4) machine:<img src="http://www.assoc-amazon.com/e/ir?t=kevideld-20&#038;l=as2&#038;o=1&#038;a=B0006HMWO4&#038;camp=217145&#038;creative=399381" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p><ol><li>First I downloaded and installed the <a href="http://www.python.org/download/releases/">official Python builds for Windows</a> (<a href="http://www.python.org/ftp/python/2.6.6/python-2.6.6.msi">2.6.6 precisely</a>):<br /> <a href="http://kevin.deldycke.com/wp-content/uploads/2010/08/001-python-266-install-on-windows-2000.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/08/001-python-266-install-on-windows-2000-300x255.png" alt="" title="001-python-266-install-on-windows-2000" width="300" height="255" class="aligncenter size-medium wp-image-1832" /></a><br /> <a href="http://kevin.deldycke.com/wp-content/uploads/2010/08/002-python-266-install-on-windows-2000.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/08/002-python-266-install-on-windows-2000-300x255.png" alt="" title="002-python-266-install-on-windows-2000" width="300" height="255" class="aligncenter size-medium wp-image-1833" /></a><br /> <a href="http://kevin.deldycke.com/wp-content/uploads/2010/08/003-python-266-install-on-windows-2000.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/08/003-python-266-install-on-windows-2000-300x255.png" alt="" title="003-python-266-install-on-windows-2000" width="300" height="255" class="aligncenter size-medium wp-image-1834" /></a><br /> <a href="http://kevin.deldycke.com/wp-content/uploads/2010/08/004-python-266-install-on-windows-2000.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/08/004-python-266-install-on-windows-2000-300x255.png" alt="" title="004-python-266-install-on-windows-2000" width="300" height="255" class="aligncenter size-medium wp-image-1835" /></a><br /> <a href="http://kevin.deldycke.com/wp-content/uploads/2010/08/005-python-266-install-on-windows-2000.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/08/005-python-266-install-on-windows-2000-300x255.png" alt="" title="005-python-266-install-on-windows-2000" width="300" height="255" class="aligncenter size-medium wp-image-1836" /></a></li><li>Then <a href="http://sourceforge.net/projects/pywin32/">Python for Windows extensions</a> (<a href="http://sourceforge.net/projects/pywin32/files/pywin32/Build%20214/pywin32-214.win32-py2.6.exe/download">build 214 for Python 2.6 in my case</a>):<br /> <a href="http://kevin.deldycke.com/wp-content/uploads/2010/08/001-pywin32-214-install-on-windows-2000.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/08/001-pywin32-214-install-on-windows-2000-300x193.png" alt="" title="001-pywin32-214-install-on-windows-2000" width="300" height="193" class="aligncenter size-medium wp-image-1838" /></a><br /> <a href="http://kevin.deldycke.com/wp-content/uploads/2010/08/002-pywin32-214-install-on-windows-2000.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/08/002-pywin32-214-install-on-windows-2000-300x193.png" alt="" title="002-pywin32-214-install-on-windows-2000" width="300" height="193" class="aligncenter size-medium wp-image-1839" /></a><br /> <a href="http://kevin.deldycke.com/wp-content/uploads/2010/08/003-pywin32-214-install-on-windows-2000.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/08/003-pywin32-214-install-on-windows-2000-300x193.png" alt="" title="003-pywin32-214-install-on-windows-2000" width="300" height="193" class="aligncenter size-medium wp-image-1840" /></a><br /> <a href="http://kevin.deldycke.com/wp-content/uploads/2010/08/004-pywin32-214-install-on-windows-2000.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/08/004-pywin32-214-install-on-windows-2000-300x193.png" alt="" title="004-pywin32-214-install-on-windows-2000" width="300" height="193" class="aligncenter size-medium wp-image-1841" /></a></li><li>Finally I had to <a href="http://pypi.python.org/pypi/icalendar">download the latest <code>icalendar</code> archive</a>, then extract the <code>\iCalendar-1.2\src\icalendar</code> folder to <code>C:\Python26\Lib\site-packages\</code>:<br /> <a href="http://kevin.deldycke.com/wp-content/uploads/2010/08/extract-icalendar-python-package-on-windows.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/08/extract-icalendar-python-package-on-windows-300x217.png" alt="" title="extract-icalendar-python-package-on-windows" width="300" height="217" class="aligncenter size-medium wp-image-1843" /></a></li><li>Next step is to <a href="http://code.google.com/p/nlconverter/downloads">download nlconverter</a> itself and extract it:<br /> <a href="http://kevin.deldycke.com/wp-content/uploads/2010/08/nlconverter-install-on-windows.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/08/nlconverter-install-on-windows-300x214.png" alt="" title="nlconverter-install-on-windows" width="300" height="214" class="aligncenter size-medium wp-image-1846" /></a></li></ol><h2>nlconverter GUI</h2><p>First thing you have to do is to create an <a href="http://kevin.deldycke.com/2010/06/how-to-export-backup-lotus-notes-mails/">export of your mails as a <code>.nsf</code> database</a>. Follow the previous link to get the instructions.</li><p>Now let&#8217;s convert this <code>nsf</code> to a <code>mbox</code>. <a href="http://code.google.com/p/nlconverter/wiki/Faq">nlconverter&#8217;s FAQ</a> tells you to run the <code>gui.exe</code> program to perform the conversion.</p><p>Unfortunately it didn&#8217;t work for me:<br /> <a href="http://kevin.deldycke.com/wp-content/uploads/2010/08/nlconverter-gui-fail.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/08/nlconverter-gui-fail-300x91.png" alt="" title="nlconverter-gui-fail" width="300" height="91" class="aligncenter size-medium wp-image-1856" /></a></p><p>So I tried the alternative approach by using the command line.</p><h2>nlconverter command line</h2><p>Again, most of the things I&#8217;m writing here are based on <a href="http://code.google.com/p/nlconverter/wiki/Faq">nlconverter&#8217;s FAQ</a>:</p><ol><li>First, we have to <a href="http://nlconverter.googlecode.com/hg/notes2mbox.py">download the <code>notes2mbox.py</code> script</a> from <a href="http://code.google.com/p/nlconverter/source/browse/">nlconverter&#8217;s mercurial repository</a>, as this file is not distributed in the <code>winnlc-alpha-1.zip</code> archive I unzipped previously. Let&#8217;s put <code>notes2mbox.py</code> in <code>C:\winnlc-alpha-1\</code>:<br /> <a href="http://kevin.deldycke.com/wp-content/uploads/2010/09/download-notes2mbox-python-script.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/09/download-notes2mbox-python-script-300x167.png" alt="" title="download-notes2mbox-python-script" width="300" height="167" class="aligncenter size-medium wp-image-1881" /></a></li><li>Now we&#8217;ll modify the <code>notes2mbox.py</code> script to set the password (via the <code>notesPasswd</code> variable) and location (<code>notesNsfPath</code> variable) of the <code>.nsf</code> file. Here are the modifications I applied:<pre class="brush: diff; title: ; notranslate">
--- notes2mbox.py.orig	2010-09-02 13:49:58.000000000 +0200
+++ notes2mbox.py	2010-09-02 13:51:24.000000000 +0200
@@ -14,8 +14,8 @@
 import NlconverterLib

 #Constantes
-notesPasswd = &quot;foobar&quot;
-notesNsfPath = &quot;C:\\archive.nsf&quot;
+notesPasswd = &quot;XXXXXXXXXXXXX&quot;
+notesNsfPath = &quot;C:\\winnlc-alpha-1\\kevin-notes-big-backup-part-1.nsf&quot;

 #Connection à Notes
 db = NlconverterLib.getNotesDb(notesNsfPath, notesPasswd)
</pre></li><li>Before running the script, we have to register a Notes DLL used by nlconverter:<pre class="brush: bash; title: ; notranslate">
regsvr32 &quot;C:\Program Files\Notes\nlsxbe.dll&quot;
</pre><p><a href="http://kevin.deldycke.com/wp-content/uploads/2010/08/notes-nlsxbe-dll-registered1.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/08/notes-nlsxbe-dll-registered1-300x96.png" alt="" title="notes-nlsxbe-dll-registered" width="300" height="96" class="aligncenter size-medium wp-image-1868" /></a><br /> And make the Python interpreter available system-wide:</p><pre class="brush: bash; title: ; notranslate">
C:\winnlc-alpha-1&gt;SET Path=%Path%;C:\Python26
</pre></li><li>Now we can run the <code>notes2mbox.py</code> script:<pre class="brush: bash; title: ; notranslate">
C:\winnlc-alpha-1&gt;C:\Python26\python.exe notes2mbox.py
</pre></li></ol><p>If you&#8217;re lucky, you&#8217;ll get a nice mbox at the end of the process.</p><p>But I was not and the <code>notes2mbox.py</code> ended up with the following error:</p><pre class="brush: python; title: ; notranslate">
Traceback (most recent call last):
  File &quot;notes2mbox.py&quot;, line 21, in &lt;module&gt;
    db = NlconverterLib.getNotesDb(notesNsfPath, notesPasswd)
  File &quot;C:\winnlc-alpha-1\NlconverterLib.py&quot;, line 43, in getNotesDb
    session = win32com.client.Dispatch(r'Lotus.NotesSession')
  File &quot;C:\Python26\lib\site-packages\win32com\client\__init__.py&quot;, line 95, in Dispatch
    dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
  File &quot;C:\Python26\lib\site-packages\win32com\client\dynamic.py&quot;, line 104, in _GetGoodDispatchAndUserName
    return (_GetGoodDispatch(IDispatch, clsctx), userName)
  File &quot;C:\Python26\lib\site-packages\win32com\client\dynamic.py&quot;, line 84, in _GetGoodDispatch
    IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
pywintypes.com_error: (-2147221231, 'ClassFactory ne peut pas fournir la classe demand\xe9e', None, None)
</pre><p>As you can see, I tried hard to make nlconverter working, without any success. But this should not stop you to try. In fact I suspect the Lotus Notes installed on my machine to be crippled or corrupted (can&#8217;t really tell). So you may be more lucky than me. In any case, feel free to report any success or failure in the comment section below !</p> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2010/09/convert-lotus-notes-nsf-files-mbox-nlconverter/feed/</wfw:commentRss> <slash:comments>19</slash:comments> </item> <item><title>Maildir deduplication script in Python</title><link>http://kevin.deldycke.com/2010/08/maildir-deduplication-script-python/</link> <comments>http://kevin.deldycke.com/2010/08/maildir-deduplication-script-python/#comments</comments> <pubDate>Thu, 19 Aug 2010 18:56:03 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[English]]></category> <category><![CDATA[E-mail]]></category> <category><![CDATA[GitHub]]></category> <category><![CDATA[Lotus Notes]]></category> <category><![CDATA[Mac OS X]]></category> <category><![CDATA[maildir]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[Script]]></category><guid isPermaLink="false">http://kevin.deldycke.com/?p=1712</guid> <description><![CDATA[Some months ago I wrote a tiny Python script which scan all folders and sub-folders of a Maildir, then remove duplicate mails. You can give the script a list of email headers to ignore while it compares mails between each &#8230; <a href="http://kevin.deldycke.com/2010/08/maildir-deduplication-script-python/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Some months ago I wrote a tiny Python script which scan all folders and sub-folders of a Maildir, then remove duplicate mails.</p><p>You can give the script a list of email headers to ignore while it compares mails between each others. This is particularly helpful to find duplicate mails having the exact same content but different headers/metadatas.</p><p>I created this script to clean up a Maildir folder I messed up after moving repeatedly tons of mails from a Lotus Notes database. As you can see below, the same mail imported twice contain a variable header based on the date and time the import was performed:<br /> <a href="http://kevin.deldycke.com/wp-content/uploads/2010/08/lotus-notes-x-mimetrack-mail-header.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/08/lotus-notes-x-mimetrack-mail-header-300x45.png" alt="" title="lotus-notes-x-mimetrack-mail-header" width="300" height="45" class="aligncenter size-medium wp-image-1716" /></a></p><p>This variable header make mails looks different from the point of view of the script. That&#8217;s explain why I implemented the <code>HEADERS_TO_IGNORE</code> parameter with the default set to <code>X-MIMETrack</code>.</p><p>The <a href="http://github.com/kdeldycke/scripts/blob/master/maildir-deduplicate.py">script is available on my GitHub</a> repository. It was tested on MacOS X 10.6 with python 2.6.2 but should work on other systems and versions as the code is really simple (and stupid).</p> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2010/08/maildir-deduplication-script-python/feed/</wfw:commentRss> <slash:comments>16</slash:comments> </item> <item><title>QLC effects generator for LED panels</title><link>http://kevin.deldycke.com/2010/08/qlc-effects-generator-led-panels/</link> <comments>http://kevin.deldycke.com/2010/08/qlc-effects-generator-led-panels/#comments</comments> <pubDate>Tue, 10 Aug 2010 19:42:14 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[English]]></category> <category><![CDATA[Canon EOS 7D]]></category> <category><![CDATA[Cool Cavemen]]></category> <category><![CDATA[dmx]]></category> <category><![CDATA[light]]></category> <category><![CDATA[lighting]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[QLC]]></category> <category><![CDATA[Qt]]></category> <category><![CDATA[Script]]></category> <category><![CDATA[xml]]></category><guid isPermaLink="false">http://kevin.deldycke.com/?p=1562</guid> <description><![CDATA[Here is another script I wrote some months ago. It&#8217;s called qlc-effects-generator.py. It&#8217;s a quick and dirty hack that generate chasers, groups and scenes for QLC (a QT-based DMX lighting software). It just produce XML statements you copy&#8217;n'paste in your &#8230; <a href="http://kevin.deldycke.com/2010/08/qlc-effects-generator-led-panels/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Here is another script I wrote some months ago. It&#8217;s called <code><a href="http://github.com/kdeldycke/scripts/blob/master/qlc-effects-generator.py">qlc-effects-generator.py</a></code>. It&#8217;s a quick and dirty hack that generate chasers, groups and scenes for <a href="http://sourceforge.net/projects/qlc/">QLC (a QT-based DMX lighting software)</a>. It just produce XML statements you copy&#8217;n'paste in your <code>.qxw</code> QLC workspace file.</p><p>I used it to create some effects for my 4 el-cheapo <a href="http://fr.audiofanzine.com/projecteur-traditionnel-divers/mac-mah/WIDER-PANEL-RGB-648-LEDS-DMX/">Mac-Mah LED wider panels</a>. This script helped me generate column and row presets of my 4&#215;8 pixels LED matrix for some basic colors:<br /> <a href="http://kevin.deldycke.com/wp-content/uploads/2010/06/qlc-wider-panel-presets.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/06/qlc-wider-panel-presets-300x187.png" alt="" title="qlc-wider-panel-presets" width="300" height="187" class="aligncenter size-medium wp-image-1565" /></a></p><p>Here are some photos of my preliminary tests at home:</p><p><a href="http://kevin.deldycke.com/wp-content/uploads/2010/08/4-mac-mah-wider-led-panel-fushia.jpg"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/08/4-mac-mah-wider-led-panel-fushia-150x150.jpg" alt="" title="4-mac-mah-wider-led-panel-fushia" width="150" height="150" class="alignleft size-thumbnail wp-image-1665" /></a></p><p><a href="http://kevin.deldycke.com/wp-content/uploads/2010/08/4-mac-mah-wider-led-panel-blue.jpg"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/08/4-mac-mah-wider-led-panel-blue-150x150.jpg" alt="" title="4-mac-mah-wider-led-panel-blue" width="150" height="150" class="alignleft size-thumbnail wp-image-1666" /></a></p><p><a href="http://kevin.deldycke.com/wp-content/uploads/2010/08/4-mac-mah-wider-led-panel-red.jpg"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/08/4-mac-mah-wider-led-panel-red-150x150.jpg" alt="" title="4-mac-mah-wider-led-panel-red" width="150" height="150" class="alignleft size-thumbnail wp-image-1667" /></a></p><p><a href="http://kevin.deldycke.com/wp-content/uploads/2010/08/4-mac-mah-wider-led-panel-white.jpg"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/08/4-mac-mah-wider-led-panel-white-150x150.jpg" alt="" title="4-mac-mah-wider-led-panel-white" width="150" height="150" class="alignleft size-thumbnail wp-image-1668" /></a></p><div style="clear:both"></div><p>And finally photos of the panels on stage (<a href="http://www.heroow.fr/2009/11/18/cool-cavemen/">taken by Toma Heroow</a> during <a href="http://coolcavemen.com/2009/mametzik-mad-fest-chez-march/">Cool Cavemen&#8217;s concert in last november</a>):</p><p><a href="http://kevin.deldycke.com/wp-content/uploads/2010/08/img_0516-scaled.jpg"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/08/img_0516-scaled-150x150.jpg" alt="" title="img_0516-scaled" width="150" height="150" class="alignleft size-thumbnail wp-image-1677" /></a></p><p><a href="http://kevin.deldycke.com/wp-content/uploads/2010/08/img_0583-scaled.jpg"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/08/img_0583-scaled-150x150.jpg" alt="" title="img_0583-scaled" width="150" height="150" class="alignleft size-thumbnail wp-image-1686" /></a></p><p><a href="http://kevin.deldycke.com/wp-content/uploads/2010/08/img_0519-scaled.jpg"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/08/img_0519-scaled-150x150.jpg" alt="" title="img_0519-scaled" width="150" height="150" class="alignleft size-thumbnail wp-image-1685" /></a></p><div style="clear:both"></div><p>As usual, use and hack this script at you own risks, and feel free to send me bug reports and contributions ! <img src='http://kevin.deldycke.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2010/08/qlc-effects-generator-led-panels/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Subversion commits and mail activity stream in iCalendar</title><link>http://kevin.deldycke.com/2010/06/subversion-commits-mail-activity-stream-icalendar/</link> <comments>http://kevin.deldycke.com/2010/06/subversion-commits-mail-activity-stream-icalendar/#comments</comments> <pubDate>Wed, 16 Jun 2010 19:53:46 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[English]]></category> <category><![CDATA[code]]></category> <category><![CDATA[commit]]></category> <category><![CDATA[Git]]></category> <category><![CDATA[GitHub]]></category> <category><![CDATA[iCal]]></category> <category><![CDATA[mail]]></category> <category><![CDATA[maildir]]></category> <category><![CDATA[Ohloh]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[Repository]]></category> <category><![CDATA[Script]]></category> <category><![CDATA[Subversion]]></category><guid isPermaLink="false">http://kevin.deldycke.com/?p=1546</guid> <description><![CDATA[Last week I consolidated all my code in my GitHub repository. I stumble upon an old script I haven&#8217;t publicized yet: svn2ical.py. This is a simple hack which get commit metadata out of a Subversion repository and generate an iCalendar &#8230; <a href="http://kevin.deldycke.com/2010/06/subversion-commits-mail-activity-stream-icalendar/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Last week I <a href="http://kevin.deldycke.com/2010/06/git-commit-history-reconstruction/">consolidated all my code</a> in <a href="http://github.com/kdeldycke/scripts">my GitHub repository</a>. I stumble upon an old script I haven&#8217;t publicized yet: <code><a href="http://github.com/kdeldycke/scripts/blob/master/svn2ical.py">svn2ical.py</a></code>.</p><p><a href="http://kevin.deldycke.com/wp-content/uploads/2010/06/icalendar-subversion-commits.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2010/06/icalendar-subversion-commits-150x150.png" alt="" title="icalendar-subversion-commits" width="150" height="150" class="alignleft size-thumbnail wp-image-1551" /></a> This is a simple hack which get commit metadata out of a Subversion repository and generate an iCalendar file containing all commits of a given author. I used it back then to visualize in a calendar my commit activity. Nowadays this script is quite useless as services like <a href="http://www.ohloh.net/accounts/kevin">Ohloh</a> and <a href="http://github.com/kdeldycke">GitHub</a> provides great timeline and activity streams. But this script can still be useful for private repositories.</p><p>And in the same spirit of this script, I uncovered <code><a href="http://github.com/kdeldycke/scripts/blob/master/maildir2ical.py">maildir2ical.py</a></code>, a script that look in a maildir folder for mails sent by a particular author, then generate an iCal file based on mail dates.</p> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2010/06/subversion-commits-mail-activity-stream-icalendar/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How-to: e107 autogallery to Zenphoto migration</title><link>http://kevin.deldycke.com/2008/08/how-to-e107-autogallery-to-zenphoto-migration/</link> <comments>http://kevin.deldycke.com/2008/08/how-to-e107-autogallery-to-zenphoto-migration/#comments</comments> <pubDate>Thu, 21 Aug 2008 22:42:05 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[English]]></category> <category><![CDATA[autogallery]]></category> <category><![CDATA[e107]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[migration]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[Script]]></category> <category><![CDATA[Snippet]]></category> <category><![CDATA[SQL]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[Zenphoto]]></category><guid isPermaLink="false">http://kevin.deldycke.com/?p=310</guid> <description><![CDATA[These past few days I was working on the Cool Cavemen&#8217;s photo gallery to move it to a shiny new one, powered by Zenphoto. In this post I will roughly describe how I&#8217;ve done it, code and commands included. The &#8230; <a href="http://kevin.deldycke.com/2008/08/how-to-e107-autogallery-to-zenphoto-migration/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>These past few days I was working on the <a href="http://coolcavemen.com/photos">Cool Cavemen&#8217;s photo gallery</a> to move it to a shiny new one, powered by <a href="http://zenphoto.org">Zenphoto</a>. In this post I will roughly describe how I&#8217;ve done it, code and commands included.</p><p>The old gallery was based on <a href="http://sourceforge.net/projects/e107autogallery">autogallery</a>, a <a href="http://e107.org">e107</a> plugin. We assume here that both e107 and Zenphoto are well configured and installed at the root of you web hosting space (<code>/www</code> in this case).</p><p>The first step is to copy the autogallery album structure, with all its content, to Zenphoto:</p><pre class="brush: bash; title: ; notranslate">
cd /www
cp -ax ./e107_plugins/autogallery/Gallery/* ./zenphoto/albums/
</pre><p>Then we delete all previews, thumbnails and XML metadatas, to keep in Zenphoto original assets only:</p><pre class="brush: bash; title: ; notranslate">
find ./zenphoto/albums/ -iname &quot;*.xml&quot; | xargs rm -f
find ./zenphoto/albums/ -iname &quot;pv_*&quot; | xargs rm -f
find ./zenphoto/albums/ -iname &quot;th_*&quot; | xargs rm -f
</pre><p>By now, you should be able to play with your medias using Zenphoto&#8217;s admin interface.</p><p>But if you&#8217;re unlucky as I was, you will find a strange bug which break down drag&#8217;n'drop album sorting. The fix I found was to remove, in photo filenames, the numerical prefix (and the following dot) set by autogallery to define the sort order. This operation should be performed, <em>before</em> the copy from autogallery to Zenphoto (= the first command in this post). By the way, if you know a one-liner to do this, please, please&#8230; share ! <img src='http://kevin.deldycke.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p>To migrate comments, I have no automatic solution. I choose to do this manually, editing the database by hand. In my case it was the quickest way as I only had a dozen of comments to migrate.</p><p>And last but not least, if you care about measuring the popularity of your photos, you should consider migrating the view counter associated with each of your media. Don&#8217;t worry, this time I wrote a script to take care of it automagically. It will generate a bunch of SQL statements you&#8217;ll have to execute on your Zenphoto MySQL database. Here is my <a href='http://kevin.deldycke.com/wp-content/uploads/2008/08/e107-autogallery-to-zenphoto-hit-counter-migration.py'>&#8220;e107 autogallery to Zenphoto hit counter migration script&#8221;</a> (nice name isn&#8217;t it ? <img src='http://kevin.deldycke.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) that do the job:</p><pre class="brush: python; title: ; notranslate">
#!/usr/bin/python

##############################################################################
#
# Copyright (C) 2008 Kevin Deldycke &lt;kevin@deldycke.com&gt;
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
##############################################################################

&quot;&quot;&quot;
  Last update: 2008 aug 21
&quot;&quot;&quot;

########### User config ###########

AUTOGALLERY_ALBUM_PATH = &quot;/www/e107_plugins/autogallery/Gallery&quot;
ZENPHOTO_ALBUM_PATH    = &quot;/www/zenphoto/albums&quot;
ZENPHOTO_TABLE_PREFIX  = &quot;zenphoto_&quot;

######## End of user config #######

import os, hashlib
import xml.etree.ElementTree as ET

# Calculate hash of a given file
def getHash(path):
  # Calculate the hash from file raw data
  if not os.path.isfile(path):
    return None
  try:
    file_object = open(path, 'r')
    data = file_object.read()
  except:
    return None
  if not len(data):
    return None
  return hashlib.sha224(data).hexdigest()

# Associate each autogallery photo having a hitcounter greater than 0 with its MD5 hash
def populateHashTable(arg, dirname, names):
  global hash_table
  for name in names:
    file_path = os.path.join(dirname, name)
    # print &quot;Get hit count for %s&quot; % file_path
    # Check that the file as a positive hit counter associated with
    xml_file_path = &quot;%s.xml&quot; % file_path
    if not os.path.isfile(xml_file_path):
      continue
    try:
      tree = ET.parse(xml_file_path)
    except:
      continue
    node = tree.find(&quot;viewhits&quot;)
    if node is None:
      continue
    try:
      hits = int(node.text)
    except:
      continue
    if not hits &gt; 0:
      continue
    # Update hash table with data we care about
    file_hash = getHash(file_path)
    if file_hash is None:
      continue
    hash_table[file_hash] = hits + hash_table.get(file_hash, 0)

# Generate hitcount SQL request for each matching file
def generateSQL(arg, dirname, names):
  global sql
  for name in names:
    file_path = os.path.join(dirname, name)
    # print &quot;Search hitcounter matching file %s&quot; % file_path
    file_hash = getHash(file_path)
    if file_hash is None:
      continue
    if file_hash in hash_table:
      sql += &quot;UPDATE `%simages` SET `hitcounter`=`hitcounter`+%d WHERE `filename`=%r;\n&quot; % (ZENPHOTO_TABLE_PREFIX, hash_table[file_hash], name)

# Core of the script
hash_table = {}
sql        = &quot;&quot;
# Normalize path
source_path = os.path.abspath(AUTOGALLERY_ALBUM_PATH)
dest_path   = os.path.abspath(ZENPHOTO_ALBUM_PATH)

os.path.walk(source_path, populateHashTable, None)
# print repr(hash_table)
os.path.walk(dest_path, generateSQL, None)
print sql
</pre><p>I think code and comments are self-explainatory. And do not forget to update constants at the top of the script to match your installation paths and database&#8217;s tables prefix.</p><p>And finally, for your information, I tested all of this on following versions:</p><ul><li>e107 0.7.11</li><li>autogallery 2.61</li><li>Zenphoto 1.2</li><li>Python 2.5.2</li><li>Linux server</li></ul> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2008/08/how-to-e107-autogallery-to-zenphoto-migration/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Website Backup Script: bug fix release</title><link>http://kevin.deldycke.com/2008/05/website-backup-script-bug-fix-release/</link> <comments>http://kevin.deldycke.com/2008/05/website-backup-script-bug-fix-release/#comments</comments> <pubDate>Sun, 25 May 2008 23:38:44 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[English]]></category> <category><![CDATA[Backup]]></category> <category><![CDATA[CLI]]></category> <category><![CDATA[FTP]]></category> <category><![CDATA[lftp]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[mysqldump]]></category> <category><![CDATA[Network]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[rdiff-backup]]></category> <category><![CDATA[rsync]]></category> <category><![CDATA[Script]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[SSH]]></category> <category><![CDATA[Web]]></category><guid isPermaLink="false">http://kevin.deldycke.com/?p=222</guid> <description><![CDATA[14 months after the last release, here is a new version of my website backup script. As you can see in the changelog, this version is essentially released to fix some bugs. Changelog: Check version of Python (at least v2.4 &#8230; <a href="http://kevin.deldycke.com/2008/05/website-backup-script-bug-fix-release/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><a href="http://kevin.deldycke.com/2007/03/website-backup-script-mysql-dumps-and-ssh-supported/">14 months after the last release</a>, here is a <a href="http://kevin.deldycke.com/static/scripts/website-backup-2008_05_25.py">new version of my website backup script</a>. As you can see in the changelog, this version is essentially released to fix some bugs.</p><p>Changelog:</p><ul><li>Check version of Python (at least v2.4 is required)</li><li>Rename <code>--debug</code> option to <code>--verbose</code></li><li>Add a <code>--dry-run</code> option for testing</li><li>Remove use of deprecated <code>pexpect</code> methods</li><li>Add and update some error messages</li></ul> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2008/05/website-backup-script-bug-fix-release/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>How-to import a Maildir++ folder to Kmail</title><link>http://kevin.deldycke.com/2007/11/how-to-import-a-maildir-folder-to-kmail/</link> <comments>http://kevin.deldycke.com/2007/11/how-to-import-a-maildir-folder-to-kmail/#comments</comments> <pubDate>Mon, 26 Nov 2007 22:21:18 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[English]]></category> <category><![CDATA[Backup]]></category> <category><![CDATA[KDE]]></category> <category><![CDATA[kmail]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[mail]]></category> <category><![CDATA[mailbox]]></category> <category><![CDATA[maildir]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[Script]]></category><guid isPermaLink="false">http://kevin.deldycke.com/2007/11/how-to-import-a-maildir-folder-to-kmail/</guid> <description><![CDATA[Let&#8217;s say you have a local copy of a mail folder you want to browse with Kmail. This folder is normally found on a dedicated mail server and you access it through the IMAP protocol. I was in this situation &#8230; <a href="http://kevin.deldycke.com/2007/11/how-to-import-a-maildir-folder-to-kmail/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Let&#8217;s say you have a local copy of a mail folder you want to browse with <a href="http://kontact.kde.org/kmail">Kmail</a>. This folder is normally found on a dedicated mail server and you access it through the IMAP protocol. I was in this situation some days ago and I will tell you how I&#8217;ve done it.</p><p>Instinctively, I assumed that my folder was of the <a href="http://en.wikipedia.org/wiki/Maildir">Maildir format</a>, and Kmail local mails too. So I tried to copy my <code>~/Maildir</code> folder from the mail server to my local machine (<code>~/.kde/share/apps/kmail/mail/</code>). And that was the result in Kmail:</p><p><img class="center" src='http://kevin.deldycke.com/wp-content/uploads/2007/11/kmail-no-sub-folders.png' alt='kmail-no-sub-folders.png' /></p><p>It looks good but it&#8217;s not: there is no sub-folders !</p><p>After some googling, I found what was wrong: my <code>~/Maildir</code> folder is not a Maildir, but a <a href="http://www.inter7.com/courierimap/README.maildirquota.html">Maildir++</a> folder. This kind of folder is handle by popular IMAP <a href="http://en.wikipedia.org/wiki/Mail_transfer_agent">MTA</a> like <a href="http://cr.yp.to/qmail.html">qmail</a>, <a href="http://www.dovecot.org">Dovecot</a> and <a href="http://www.courier-mta.org">courier-imap</a> (which was used on the mail server where my <code>~/Maildir</code> come from). There is some advantages of using the &#8220;<code>++</code>&#8221; flavor of Maildir over the classic one, like quotas and sub-folders. Unfortunately <a href="http://groups.google.com/group/comp.windows.x.kde/browse_thread/thread/1c74818b4175b3ec#487b5c78311a07c7">Kmail is not able to read the Maildir++ folder structure</a>.</p><p>To fix this, I&#8217;ve created a tiny python <a href="http://github.com/kdeldycke/scripts/blob/master/maildir%2B%2B2kmail.py">script to migrate a Maildir++ folder to Kmail</a>.</p><p>How-to use it ? Simply:</p><ol><li><a href="http://github.com/kdeldycke/scripts/blob/master/maildir%2B%2B2kmail.py">Download it</a> to your disk,</li><li>Edit it and change the <code>MAILDIR_SOURCE</code> and <code>KMAILDIR_DEST</code> variables to match your local configuration,</li><li>Give it execution privileges,</li><li>Run it !</li></ol><p>I advise you to try it first in a safe environment (like under a temporary user account). And don&#8217;t forget to backup everything before playing with it: because this script work for me doesn&#8217;t mean that it will work for you ! <img src='http://kevin.deldycke.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2007/11/how-to-import-a-maildir-folder-to-kmail/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>System backup script: no more endless lock</title><link>http://kevin.deldycke.com/2007/08/system-backup-script-no-more-endless-lock/</link> <comments>http://kevin.deldycke.com/2007/08/system-backup-script-no-more-endless-lock/#comments</comments> <pubDate>Sun, 12 Aug 2007 15:00:45 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[Backup]]></category> <category><![CDATA[CLI]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[rdiff-backup]]></category> <category><![CDATA[rsync]]></category> <category><![CDATA[Script]]></category> <category><![CDATA[SSH]]></category> <category><![CDATA[system]]></category><guid isPermaLink="false">http://kevin.deldycke.com/2007/08/system-backup-script-no-more-endless-lock/</guid> <description><![CDATA[I&#8217;ve just released a new version of my system-backup.py script. The main update is about the lock file, which I implemented in the last version to keep the script to run twice (or more) in parallel. This is a nice &#8230; <a href="http://kevin.deldycke.com/2007/08/system-backup-script-no-more-endless-lock/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>I&#8217;ve just released a <a href="http://kevin.deldycke.com/static/scripts/system-backup-2007_08_12.py">new version of my <code>system-backup.py</code> script</a>.</p><p>The main update is about the lock file, which I implemented in the <a href="http://kevin.deldycke.com/2007/04/system-backup-auto-clean-and-lock-added/">last version</a> to keep the script to run twice (or more) in parallel. This is a nice feature to avoid overlapping processes that fight each other to use the same ressources. But in some extreme cases (reboot or power failure during backup, &#8230;), the lock file will remain and so will prevent the script to start (until you notice the problem and remove the lock file manually). This new version take care of this problem and is now able to remove the lock automatically if a timeout is reached. It also kill all remaining child processes.</p><p>Here is the detailed changelog:</p><ul><li>Auto-kill the script if the backup process take to much time. Timeout can be defined via a constant.</li><li>Clean kill: track all child processes to kill them safely before removing the lock file.</li><li>Require newer versions of python (>= v2.4), rsync (>= v2.6.7) and rdiff-backup (>= v1.1.0).</li><li>Use <code>--preserve-numerical-ids</code> option when adding rdiff-backup increment.</li><li>Keep 15 increments by default instead of 20. This value can be easily changed thanks to a defined constant.</li><li>Remove deleted file first during mirroring and delete outdated increments before adding a new one to gain space. This strategy is safer for target disk with low remaining free space.</li><li>Tell rsync to print human-readable values.</li></ul> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2007/08/system-backup-script-no-more-endless-lock/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>System Backup on Unreliable Link thanks to rdiff-backup and rsync</title><link>http://kevin.deldycke.com/2007/04/system-backup-on-unreliable-link-thanks-to-rdiff-backup-and-rsync/</link> <comments>http://kevin.deldycke.com/2007/04/system-backup-on-unreliable-link-thanks-to-rdiff-backup-and-rsync/#comments</comments> <pubDate>Mon, 09 Apr 2007 06:01:35 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[English]]></category> <category><![CDATA[Backup]]></category> <category><![CDATA[CLI]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[rdiff-backup]]></category> <category><![CDATA[rsync]]></category> <category><![CDATA[Script]]></category> <category><![CDATA[SSH]]></category><guid isPermaLink="false">http://kevin.deldycke.com/2007/04/system-backup-on-unreliable-link-thanks-to-rdiff-backup-and-rsync/</guid> <description><![CDATA[I&#8217;ve just write a brand new script called system-backup.py. It&#8217;s similar to my website-backup.py script but instead of website and MySQL databases, it is designed to backup systems of several machines. This script is based on an idea from the &#8230; <a href="http://kevin.deldycke.com/2007/04/system-backup-on-unreliable-link-thanks-to-rdiff-backup-and-rsync/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>I&#8217;ve just write a brand new script called <a href="http://kevin.deldycke.com/static/scripts/system-backup-2007_04_09.py"><code>system-backup.py</code></a>. It&#8217;s <a href="http://kevin.deldycke.com/2007/03/website-backup-script-mysql-dumps-and-ssh-supported/">similar to my <code>website-backup.py</code> script</a> but instead of website and MySQL databases, it is designed to backup systems of several machines. This script is based on an idea from the &#8220;<a href="http://wiki.rdiff-backup.org/wiki/index.php/BackupUpOnUnreliableLink">Backup up on unreliable link</a>&#8221; article from the <a href="http://wiki.rdiff-backup.org">official rdiff-backup wiki</a>. It use <code>rdiff-backup</code> to keep the last 20 backups and <code>rsync</code> to speed-up the backup process.</p><p>I run this script to backup all the local machines within my LAN. I start the backup process everyday thanks to a <code>cron</code> entry similar to this one:</p><pre class="brush: bash; title: ; notranslate">
0 20 * * * root /root/system-backup.py &gt;&gt; /mnt/backup-disk/backup.log
</pre><p>If you need more information about the <code>rsync</code> part the script, please have a look to my previous <a href="http://kevin.deldycke.com/2005/04/remote-backup-with-rsync/">Remote Backup with rsync</a> article, which detail how-to setup key authentification with <code>ssh</code>.</p> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2007/04/system-backup-on-unreliable-link-thanks-to-rdiff-backup-and-rsync/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Website Backup Script: MySQL dumps and SSH supported.</title><link>http://kevin.deldycke.com/2007/03/website-backup-script-mysql-dumps-and-ssh-supported/</link> <comments>http://kevin.deldycke.com/2007/03/website-backup-script-mysql-dumps-and-ssh-supported/#comments</comments> <pubDate>Sun, 25 Mar 2007 10:17:09 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[English]]></category> <category><![CDATA[Backup]]></category> <category><![CDATA[CLI]]></category> <category><![CDATA[FTP]]></category> <category><![CDATA[lftp]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[mysqldump]]></category> <category><![CDATA[Network]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[rdiff-backup]]></category> <category><![CDATA[rsync]]></category> <category><![CDATA[Script]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[SSH]]></category> <category><![CDATA[Web]]></category><guid isPermaLink="false">http://kevin.deldycke.com/2007/03/website-backup-script-mysql-dumps-and-ssh-supported/</guid> <description><![CDATA[Three months after the last version, here is a big update of my backup scripts for websites. The script was greatly improved and among new features, the most important is the support of backups over SSH and backups of MySQL &#8230; <a href="http://kevin.deldycke.com/2007/03/website-backup-script-mysql-dumps-and-ssh-supported/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><a href="http://kevin.deldycke.com/2006/12/website-backup-script-updated-take-care-of-hidden-files-now/">Three months after the last version</a>, here is a big update of <a href="http://kevin.deldycke.com/static/scripts/website-backup-2007_03_25.py">my backup scripts for websites</a>. The script was greatly improved and among new features, the most important is the support of backups over SSH and backups of MySQL databases.</p><p>Change log:</p><ul><li>Each item of the user&#8217;s <code>backup_list</code> must specify the <code>type</code> property (<code>FTP</code>, <code>FTPs</code>, <code>SSH</code>, <code>MySQLdump</code> or <code>MySQLdump+ssh</code>).</li><li>The property previously known as <code>site</code> is now <code>host</code>.</li><li>File system structure changed: <code>/ftp-mirror</code> folders renamed to <code>/mirror</code>.</li><li>Add SSH backups.</li><li>The script is able to detect if a SSH connexion can be initiated without a password. This was designed for people who don&#8217;t like the idea of storing clear password in the script. Thanks to this feature, you can benefit public key authentication from OpenSSH.</li><li>Use of <code>rsync</code> whenever it&#8217;s possible for bandwidth efficiency.</li><li>FTP and FTPs (aka FTP over SSL) are now handled separately: this suppress the default fall-back to FTP if FTPs is not supported by the remote server. This is safer as it doesn&#8217;t let <code>lftp</code> make the decision for you to send your clear password on the net.</li><li>All ports are optionnal, no need to specify it you use default ports.</li><li>Add MySQL backups thanks to <code>mysqldump</code>.</li><li>Two mode of MySQL backups: through SSH or direct connection to server.</li><li>A particular database to backup can be specified. Else, all databases are backed up.</li><li>Much more detailed logs that include external command&#8217;s output.</li><li>Auto-detect the existence of required external tools and commands at launch.</li><li>Use <code>pexpect</code> lib to simulate user password input.</li><li>Run all external commands in english for consistency.</li><li>Check that the script is running in a posix environnement.</li><li>Fix bug related to directory creation.</li></ul><p>If you were using a previous version of my backup script and want to use this updated version, take care of changes, especially the ones describes in the first 3 items of the change log above.</p> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2007/03/website-backup-script-mysql-dumps-and-ssh-supported/feed/</wfw:commentRss> <slash:comments>9</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 2/50 queries in 0.160 seconds using apc
Object Caching 1172/1295 objects using apc

Served from: kevin.deldycke.com @ 2012-02-08 10:26:37 -->
