<?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>PatchLog</title>
	<atom:link href="https://patchlog.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://patchlog.com</link>
	<description>Patches &#039;n Hacks</description>
	<lastBuildDate>Thu, 01 Apr 2021 20:17:43 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>
<site xmlns="com-wordpress:feed-additions:1">5780711</site><div id='fb-root'></div>
					<script type='text/javascript'>
						window.fbAsyncInit = function()
						{
							FB.init({appId: null, status: true, cookie: true, xfbml: true});
						};
						(function()
						{
							var e = document.createElement('script'); e.async = true;
							e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
							document.getElementById('fb-root').appendChild(e);
						}());
					</script>	
						<item>
		<title>Dovecot with vpopmail and lua authentication</title>
		<link>https://patchlog.com/general/dovecot-with-vpopmail-and-lua-authentication/</link>
					<comments>https://patchlog.com/general/dovecot-with-vpopmail-and-lua-authentication/#comments</comments>
		
		<dc:creator><![CDATA[Mihai]]></dc:creator>
		<pubDate>Fri, 12 Mar 2021 21:20:17 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[dovecot]]></category>
		<category><![CDATA[lua]]></category>
		<category><![CDATA[vpopmail]]></category>
		<guid isPermaLink="false">https://patchlog.com/?p=897</guid>

					<description><![CDATA[I'm running the Dovecot imap server with users and mailboxes managed by vpopmail and for various reasons I want to gradually move away from vpopmail but without losing the maildir++ storage structure for messages. The first issue is that vpopmail authentication in dovecot is not compiled in by default on the Debian packages so every &#8230; <a href="https://patchlog.com/general/dovecot-with-vpopmail-and-lua-authentication/" class="more-link">Continue reading <span class="screen-reader-text">Dovecot with vpopmail and lua authentication</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p>I'm running the Dovecot imap server with users and mailboxes managed by vpopmail and for various reasons I want to gradually move away from vpopmail but without losing the maildir++ storage structure for messages. </p>



<p>The first issue is that vpopmail authentication in dovecot is not compiled in by default on the Debian packages so every time I upgrade I have to recompile the packages to support the vpopmail driver. </p>



<p>This post explains how to use the lua authentication with the vpopmail vpasswd files so we continue to use the same users and passwords without relying on the special dovecot vpopmail driver.  If assumes your vpopmail installation is in /home/vpopmail , if it's somewhere else just change the location in the auth.lua file.</p>



<p>Disable the vpopmail authentication module in conf.d/10-auth.conf </p>



<p>Add /etc/dovecot/conf.d/auth-lua.conf.ext with this content: </p>



<pre class="wp-block-code"><code>passdb {
 driver = lua
 args = file=/etc/dovecot/auth.lua blocking=yes # default is yes
}
userdb {
 driver = lua
 args = file=/etc/dovecot/auth.lua blocking=yes # default is yes
}</code></pre>



<p>Create /etc/dovecot/auth.lua with the following content:</p>



<pre class="wp-block-code"><code>local function isempty(s)
  return s == nil or s == ''
end

function auth_password_verify(req, pass)
 local str=req.user
 local lastAt = str:find("&#91;^%@]+$")
 local localPart = str:sub(1, (lastAt - 2)) 
 local domainPart = str:sub(lastAt, #str)
 local file = "/home/vpopmail/domains/"..domainPart.."/vpasswd"

 for line in io.lines(file) do
  local u,epass=string.match(line,"(&#91;^%:]+):(&#91;^%:]+)");
  if not isempty(epass) and localPart==u and req:password_verify("{MD5-CRYPT}"..epass,pass)>0 then
   return dovecot.auth.PASSDB_RESULT_OK, {}
  end
 end
end

function auth_userdb_lookup(req)
 local str=req.user
 local lastAt = str:find("&#91;^%@]+$")
 local localPart = str:sub(1, (lastAt - 2)) 
 local domainPart = str:sub(lastAt, #str)
 local file = "/home/vpopmail/domains/"..domainPart.."/vpasswd"
 for line in io.lines(file) do
  local u,epass=string.match(line,"(&#91;^%:]+):(&#91;^%:]*):");
  if localPart==u then
   return dovecot.auth.USERDB_RESULT_OK, "uid=vpopmail gid=vchkpw"
  end
 end
 return dovecot.auth.USERDB_RESULT_USER_UNKNOWN, "no such user"
end</code></pre>
<div class='wpfblike' style='height: 40px;'><fb:like href='https://patchlog.com/general/dovecot-with-vpopmail-and-lua-authentication/' layout='standard' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>]]></content:encoded>
					
					<wfw:commentRss>https://patchlog.com/general/dovecot-with-vpopmail-and-lua-authentication/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">897</post-id>	</item>
		<item>
		<title>Create Windows 10 install USB from macOS Mojave</title>
		<link>https://patchlog.com/general/create-windows-10-install-usb-from-macos-mojave/</link>
					<comments>https://patchlog.com/general/create-windows-10-install-usb-from-macos-mojave/#respond</comments>
		
		<dc:creator><![CDATA[Mihai]]></dc:creator>
		<pubDate>Mon, 23 Dec 2019 15:55:46 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[macos]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[windows]]></category>
		<guid isPermaLink="false">http://patchlog.com/?p=891</guid>

					<description><![CDATA[If you want to install windows on your mac and you need s bootable usb stick with windows, here's how to do it. Please note, this is not for installing windows on other devices. There is a solution using unetbootin , one with bootcamp assistant and one using mounting and manually copying files but none &#8230; <a href="https://patchlog.com/general/create-windows-10-install-usb-from-macos-mojave/" class="more-link">Continue reading <span class="screen-reader-text">Create Windows 10 install USB from macOS Mojave</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p>If you want to install windows on your mac and you need s bootable usb stick with windows, here's how to do it. Please note, this is not for installing windows on other devices. </p>



<p>There is a solution using unetbootin , one with bootcamp assistant and one using mounting and manually copying files but none of them worked for me. </p>



<p>This solution worked for me in macOS High Sierra and Mojave and it will probably work on other versions. </p>



<p>First you have to convert the windows iso file to an img:</p>



<p><code>hdiutil convert -format UDRW -o windows.img windows.iso</code></p>



<p>The result of this would most likely be a file named widows.img.dmg.  The next step is to unmount the usb disk ( diskutil list  to see which one it is , in my case this was /dev/disk2 ) </p>



<p><code>sudo diskutil unmountDisk /dev/disk2</code></p>



<p>Now just use dd to copy the image to the usb device:</p>



<p><code>sudo dd if=windows10.img.dmg of=/dev/disk2 bs=1m</code></p>



<p></p>
<div class='wpfblike' style='height: 40px;'><fb:like href='https://patchlog.com/general/create-windows-10-install-usb-from-macos-mojave/' layout='standard' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>]]></content:encoded>
					
					<wfw:commentRss>https://patchlog.com/general/create-windows-10-install-usb-from-macos-mojave/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">891</post-id>	</item>
		<item>
		<title>DIY dynamic dns and ssl certificates</title>
		<link>https://patchlog.com/general/diy-dynamic-dns-and-ssl-certificates/</link>
					<comments>https://patchlog.com/general/diy-dynamic-dns-and-ssl-certificates/#respond</comments>
		
		<dc:creator><![CDATA[Mihai]]></dc:creator>
		<pubDate>Tue, 15 Oct 2019 06:46:16 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[dynamic]]></category>
		<guid isPermaLink="false">http://patchlog.com/?p=880</guid>

					<description><![CDATA[Use SFTdyn to host your own dynamic dns server. The github page describes the whole setup process so there's no point in going over it again. This article will show you how you can create a free letsencrypt certificate for these dynamic domains without running a http server on them. ( in case you want &#8230; <a href="https://patchlog.com/general/diy-dynamic-dns-and-ssl-certificates/" class="more-link">Continue reading <span class="screen-reader-text">DIY dynamic dns and ssl certificates</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p>Use <a href="https://github.com/SFTtech/sftdyn">SFTdyn</a> to host your own dynamic dns server. The github page describes the whole setup process so there's no point in going over it again. </p>



<p>This article will show you how you can create a free letsencrypt certificate for these dynamic domains without running a http server on them. ( in case you want to use them for something like a smtp service or a http server that's not supported by the certbot plugins ).  </p>



<p>When setting up SFTdyn you configured bind to accept local updates. We'll use the same key for the certbot dns plugin so it can do dns challenges for creating and renewing certificates. </p>



<p>The certbot dns plugin needs a configuration file ( ~/.secrets/certbot/rfc2136.ini ) that looks like this:   </p>



<pre># Target DNS server ( always use an ip address here )
dns_rfc2136_server = 12.34.56.78
# Target DNS port
dns_rfc2136_port = 53
# TSIG key name ( this has to be set to local-ddns ) 
dns_rfc2136_name = local-ddns
# TSIG key secret ( get this from the ddns server's /var/run/bind/session.key  ) 
dns_rfc2136_secret = splfUqpteoHQ43DDzGKvMS6L3oCjzv20WpKfhxhgWo0=
# TSIG key algorithm
dns_rfc2136_algorithm = HMAC-SHA256
</pre>



<p>The secret will probably change when you restart bind, so make sure to update the rfc2136.ini file after you do it.  Or you can add the contents of the /var/run/bind/session.key file to the named.conf.local file and then change the key's name to something like "remote-key" and then also change the ~/.secrets/certbot/rfc2136.ini file to reflect the name of the new key  so you don't have to bother to copy the key every time you restart bind. </p>



<p>When all this is set up just run :</p>



<p>certbot certonly   --dns-rfc2136   --dns-rfc2136-credentials ~/.secrets/certbot/rfc2136.ini   -d &lt;my-domain-name&gt;</p>



<p></p>
<div class='wpfblike' style='height: 40px;'><fb:like href='https://patchlog.com/general/diy-dynamic-dns-and-ssl-certificates/' layout='standard' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>]]></content:encoded>
					
					<wfw:commentRss>https://patchlog.com/general/diy-dynamic-dns-and-ssl-certificates/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">880</post-id>	</item>
		<item>
		<title>Installing cordova fails</title>
		<link>https://patchlog.com/general/installing-cordova-fails/</link>
					<comments>https://patchlog.com/general/installing-cordova-fails/#respond</comments>
		
		<dc:creator><![CDATA[Mihai]]></dc:creator>
		<pubDate>Fri, 09 Aug 2019 21:06:35 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[cordova]]></category>
		<category><![CDATA[macos]]></category>
		<category><![CDATA[npm]]></category>
		<guid isPermaLink="false">http://patchlog.com/?p=884</guid>

					<description><![CDATA[I've just set up a new computer (macOS) and when I tried to install cordova it failed. It looked like it was doing somthing for a suspiciouly short time and then it exit whitout any error. It seems the problem was I was trying to install it from an app folder that contained a folder &#8230; <a href="https://patchlog.com/general/installing-cordova-fails/" class="more-link">Continue reading <span class="screen-reader-text">Installing cordova fails</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p>I've just set up a new computer (macOS) and when I tried to install cordova it failed. It looked like it was doing somthing for a suspiciouly short time and then it exit whitout any error. </p>



<p>It seems the problem was I was trying to install it from an app folder that contained a folder named cordova and although I was running "sudo npm install -g cordova" which is supposed to install it globally it didn't work. All it did was to link my app folder to /usr/local/lib/node_modules . After I removed the link and ran "npm install -g cordova" it installed correctly.</p>



<p>Note to self: next time you install cordova on a new computer make sure you don't do it from a place where there's already a "cordova" folder. </p>
<div class='wpfblike' style='height: 40px;'><fb:like href='https://patchlog.com/general/installing-cordova-fails/' layout='standard' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>]]></content:encoded>
					
					<wfw:commentRss>https://patchlog.com/general/installing-cordova-fails/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">884</post-id>	</item>
		<item>
		<title>Tevo Little Monster delta grid compensation</title>
		<link>https://patchlog.com/general/calibrate-tevo-little-monster-delata-grid-compensation/</link>
					<comments>https://patchlog.com/general/calibrate-tevo-little-monster-delata-grid-compensation/#respond</comments>
		
		<dc:creator><![CDATA[Mihai]]></dc:creator>
		<pubDate>Thu, 16 May 2019 23:53:48 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[calibration]]></category>
		<category><![CDATA[little monster]]></category>
		<category><![CDATA[tevo]]></category>
		<guid isPermaLink="false">http://patchlog.com/?p=858</guid>

					<description><![CDATA[Before you start the calibration check if you have the grid calibration enabled in the smoothieware config file:My config has this: #Example for the delta grid leveling strategy leveling-strategy.delta-grid.enable true # Enable grid leveling leveling-strategy.delta-grid.radius 140 # Grid radius in millimeters leveling-strategy.delta-grid.size 29 # Grid size, must be an odd number The bigger the grid &#8230; <a href="https://patchlog.com/general/calibrate-tevo-little-monster-delata-grid-compensation/" class="more-link">Continue reading <span class="screen-reader-text">Tevo Little Monster delta grid compensation</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Before you start the calibration check if you have the grid calibration enabled in the smoothieware config file:<br />My config has this:<br /><code><br />
 #Example for the delta grid leveling strategy<br />
leveling-strategy.delta-grid.enable          true            # Enable grid leveling<br />
leveling-strategy.delta-grid.radius          140              # Grid radius in millimeters<br />
leveling-strategy.delta-grid.size            29               # Grid size, must be an odd number<br />
</code></p>
<p>The bigger the grid size, the more points it will test and the longer will take.</p>
<p>Heat the printbed to the temperature you normally print with.</p>
<p>Do the grid calibration:</p>
<p>; home<br />G28</p>
<p>;bltouch alarm release<br />M280 PS10.6</p>
<p>; probe pin down<br />M280 S3</p>
<p>; set bed temp to 80C<br />M190 S80</p>
<p>; do delta calibration<br />G32</p>
<p>; save trim to sdcard<br />M500</p>
<p>; probe the grid and enable grid compensation<br />G31</p>
<p>; save the grid to sd card<br />M374</p>
<p>;To set the zero for the print head<br />;Make sure there is no left over material on the nozzle ( maybe heat and wipe it )<br />;go home<br />G28</p>
<p>;go close to Z=0 <br />G0 Z1</p>
<p>; put a sheet of thin paper under the nozzle<br />; Then move the head ( using the printer controls ) until it presses on the paper sheet, until ; you feel the friction when you pull on the paper. This is the Z=0 point<br />; Use this point as the homing offest<br />M306 Z0</p>
<p>;save to SD card<br />M500</p>
<p>But even after all this it seems the prints are still not all right, so another option is to do some manual calibration of the hotbed using some springs.Â </p>


<p></p>
<div class='wpfblike' style='height: 40px;'><fb:like href='https://patchlog.com/general/calibrate-tevo-little-monster-delata-grid-compensation/' layout='standard' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>]]></content:encoded>
					
					<wfw:commentRss>https://patchlog.com/general/calibrate-tevo-little-monster-delata-grid-compensation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">858</post-id>	</item>
		<item>
		<title>Recompile Dovecot with Vpopmail on Debian</title>
		<link>https://patchlog.com/linux/recompile-dovecot-with-vpopmail-on-debian/</link>
					<comments>https://patchlog.com/linux/recompile-dovecot-with-vpopmail-on-debian/#respond</comments>
		
		<dc:creator><![CDATA[Mihai]]></dc:creator>
		<pubDate>Thu, 25 Jul 2013 17:21:55 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[dovecot]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[vpopmail]]></category>
		<guid isPermaLink="false">http://patchlog.com/?p=841</guid>

					<description><![CDATA[Here's a script I use to quickly recompile dovecot with vpopmail support on Debian 6.0. I'm using the backports repository to get the 2.1 version of dovecot. Now I'm using the following script every time I update and I get a new version of the dovecot packages. &#160; The last line also installs all the &#8230; <a href="https://patchlog.com/linux/recompile-dovecot-with-vpopmail-on-debian/" class="more-link">Continue reading <span class="screen-reader-text">Recompile Dovecot with Vpopmail on Debian</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Here's a script I use to quickly recompile dovecot with vpopmail support on Debian 6.0. I'm using the <a href="http://backports.debian.org/Instructions/">backports</a> repository to get the 2.1 version of dovecot. </p>
<p>Now I'm using the following script every time I update and I get a new version of the dovecot packages. </p>
<pre><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p>The last line also installs all the dovecot packages except for the debug one. You might want to change it if you don't want all. </p>
<div class='wpfblike' style='height: 40px;'><fb:like href='https://patchlog.com/linux/recompile-dovecot-with-vpopmail-on-debian/' layout='standard' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>
]]></content:encoded>
					
					<wfw:commentRss>https://patchlog.com/linux/recompile-dovecot-with-vpopmail-on-debian/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">841</post-id>	</item>
		<item>
		<title>grub2 notes</title>
		<link>https://patchlog.com/linux/grub2-tricks/</link>
					<comments>https://patchlog.com/linux/grub2-tricks/#respond</comments>
		
		<dc:creator><![CDATA[Mihai]]></dc:creator>
		<pubDate>Sat, 20 Jul 2013 20:41:12 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[grub2]]></category>
		<guid isPermaLink="false">http://patchlog.com/?p=806</guid>

					<description><![CDATA[Grub2 configuration is in /etc/defaut/grub ( on Debian at least ). Set GRUB_DEFAULT=saved in /etc/default/grub if you want to start with the last good boot. update-grub - detects kernels automatically and writes boot lines to /boot/grub/grub.conf grub-set-default - set the default entry ( First boot entry is number 0 ) grub-reboot - set the boot &#8230; <a href="https://patchlog.com/linux/grub2-tricks/" class="more-link">Continue reading <span class="screen-reader-text">grub2 notes</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Grub2 configuration is in /etc/defaut/grub ( on Debian at least ).</p>
<p>Set GRUB_DEFAULT=saved in /etc/default/grub if you want to start with the last good boot.</p>
<p>update-grub - detects kernels automatically and writes boot lines to /boot/grub/grub.conf</p>
<p>grub-set-default - set the default entry ( First boot entry is number 0 )</p>
<p>grub-reboot - set the boot entry for the next reboot only ( for testing new kernels or other boot stuff especially when you're working remotely )</p>
<div class='wpfblike' style='height: 40px;'><fb:like href='https://patchlog.com/linux/grub2-tricks/' layout='standard' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>
]]></content:encoded>
					
					<wfw:commentRss>https://patchlog.com/linux/grub2-tricks/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">806</post-id>	</item>
		<item>
		<title>Howto check MySQL replication consistency</title>
		<link>https://patchlog.com/databases/howto-check-mysql-replication-consistency/</link>
					<comments>https://patchlog.com/databases/howto-check-mysql-replication-consistency/#comments</comments>
		
		<dc:creator><![CDATA[Mihai]]></dc:creator>
		<pubDate>Thu, 13 Sep 2012 16:50:38 +0000</pubDate>
				<category><![CDATA[databases]]></category>
		<category><![CDATA[checksum]]></category>
		<category><![CDATA[replication]]></category>
		<category><![CDATA[verify]]></category>
		<guid isPermaLink="false">http://patchlog.com/?p=824</guid>

					<description><![CDATA[If you want to be sure the data on the slave is the same as the data on the master ( yes sometimes is can happen to bbe diffeent ) you can use pt-table-checksum ( part of percona-toolkit ) to compute checksums for the data in the tables and then compare the checksums from the &#8230; <a href="https://patchlog.com/databases/howto-check-mysql-replication-consistency/" class="more-link">Continue reading <span class="screen-reader-text">Howto check MySQL replication consistency</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>If you want to be sure the data on the slave is the same as the data on the master ( yes sometimes is can happen to bbe diffeent ) you can use pt-table-checksum ( part of percona-toolkit ) to compute checksums for the data in the tables and then compare the checksums from the master with the ones on the slave(s). </p>
<h2>Some options</h2>
<h4>Use with replication</h4>
<p>pt-table-checksum can be used to compare any two databases/tables but if you want to compare everything on master and it's slaves you can use the<br />
--replicate option to connect only on the master and compute checksums. The checksums will then be computed on slaves too by replicating the checksum statements. </p>
<h4>Detecting slaves</h4>
<p>If you have slave hosts running on non standard ports use option --recursion-method=hosts to tell pt-table-checksum how to detect the slaves. Tell the slaves to report their hostname and and port with report-host and report-port in my.cnf . This will make them show in "show slave hosts" issued on the master. </p>
<p>If the "hosts" method doesn't work, try with --recursion-method=dsn=t=dbname.dsns_table . Create a table with the name "dsns_table" and the following structure in the "dbname" database:</p>
<pre>
CREATE TABLE `dsns` (
 `id` int(11) NOT NULL AUTO_INCREMENT,
 `dsn` varchar(255) NOT NULL,
 PRIMARY KEY (`id`)
)</pre>
<p>And put the dsns for accessing the slaves in the dsn field.<br />
Example:</p>
<pre>
insert into dsns values ('','h=1.1.1.2,u=root,P=3306,p=slavepassword');
</pre>
<h4>For non innodb plugin </h4>
<p>--lock-wait-time is required if using a version of mysql without innodb plugin. </p>
<h4>Database for storing checksums</h4>
<p>pt-table-checksum stores the checksums in mysql so you have to create a database where to store the checksums table. I named mine "mk" since the tool was called mk-table-checksum before it became part of percona toolkit. </p>
<p>Use the --create-replicate-table option to create the checksums table if it doesn't already exist. </p>
<h2>Example usage</h2>
<p>pt-table-checksum --recursion-method=hosts --lock-wait-time=50 --defaults-file=/home/mihai/mysql.pass -u root --create-replicate-table --replicate-check --replicate mk.checksums 127.0.0.1</p>
<h2>Example output</h2>
<pre>
            TS ERRORS  DIFFS     ROWS  CHUNKS SKIPPED    TIME TABLE
09-13T18:25:13      0      0      361       1       0   0.019 mydb.accounts
09-13T18:25:13      0      0       91       1       0   0.079 mydb.announcements
</pre>
<div class='wpfblike' style='height: 40px;'><fb:like href='https://patchlog.com/databases/howto-check-mysql-replication-consistency/' layout='standard' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>
]]></content:encoded>
					
					<wfw:commentRss>https://patchlog.com/databases/howto-check-mysql-replication-consistency/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">824</post-id>	</item>
		<item>
		<title>XtreemFS server on MacOSX</title>
		<link>https://patchlog.com/patches/xtreemfs-server-on-macosx/</link>
					<comments>https://patchlog.com/patches/xtreemfs-server-on-macosx/#respond</comments>
		
		<dc:creator><![CDATA[Mihai]]></dc:creator>
		<pubDate>Mon, 10 Sep 2012 16:15:48 +0000</pubDate>
				<category><![CDATA[Patches]]></category>
		<category><![CDATA[MacOSX]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[xtreemfs]]></category>
		<guid isPermaLink="false">http://patchlog.com/?p=820</guid>

					<description><![CDATA[Some time ago I tried to get the XtreemFS server to work on MacOSX (Lion). I had to patch it a bit to make it compile and run. So here's the patch if you want to give it a try: [download id="33"] I wanted to use it to have a synchroneous replicated filesystem over a &#8230; <a href="https://patchlog.com/patches/xtreemfs-server-on-macosx/" class="more-link">Continue reading <span class="screen-reader-text">XtreemFS server on MacOSX</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Some time ago I tried to get the <a href="http://www.xtreemfs.org">XtreemFS</a> server to work on MacOSX (Lion). </p>
<p>I had to patch it a bit to make it compile and run. So here's the patch if you want to give it a try:</p>
<p>[download id="33"]</p>
<p>I wanted to use it to have a synchroneous replicated filesystem over a WAN but in the end I gave up this idea and switched to <a href="http://www.cis.upenn.edu/~bcpierce/unison/">unison</a>. </p>
<p>Btw. I also tried to get gluster fs to work on MacOSX lion and partially succeeded. You can see my <a href="https://github.com/mihaisecasiu/glusterfs/tree/release-3.2">changes on github</a></p>
<div class='wpfblike' style='height: 40px;'><fb:like href='https://patchlog.com/patches/xtreemfs-server-on-macosx/' layout='standard' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>
]]></content:encoded>
					
					<wfw:commentRss>https://patchlog.com/patches/xtreemfs-server-on-macosx/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">820</post-id>	</item>
		<item>
		<title>Which email client for Linux?</title>
		<link>https://patchlog.com/linux/which-email-client-for-linux/</link>
					<comments>https://patchlog.com/linux/which-email-client-for-linux/#respond</comments>
		
		<dc:creator><![CDATA[Mihai]]></dc:creator>
		<pubDate>Mon, 23 Jul 2012 17:24:44 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[email client]]></category>
		<category><![CDATA[imap]]></category>
		<guid isPermaLink="false">http://patchlog.com/?p=815</guid>

					<description><![CDATA[I've been a thunderbird user since firefox was named firebird. I was happy with it, I like the way you can easily search over all accounts, how you can archive messages in folders by year by simply hitting the "a" key, I like the threads and even the "gmail" conversations extension even if I don't &#8230; <a href="https://patchlog.com/linux/which-email-client-for-linux/" class="more-link">Continue reading <span class="screen-reader-text">Which email client for Linux?</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>I've been a thunderbird user since firefox was named firebird. I was happy with it, I like the way you can easily search over all accounts, how you can archive messages in folders by year by simply hitting the "a" key, I like the threads and even the "gmail" conversations extension even if I don't use it. </p>
<p>One problem with thunderbird is it became unusable when I added an old account which was accumulating mail up to over 170k messages. I know 170k messages is not realistic and no one should have so many messages in inbox but still this made me look for something better. </p>
<p>First let's see what I'm looking for in an email client: </p>
<ol>
<li>Easy global search like thunderbird</li>
<li>Archive folders and 1 key hit like thudnerbird <img src="https://s.w.org/images/core/emoji/16.0.1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></li>
<li>Easy to mark messages as Spam/Junk with a single key hit, would be great to be able to mark multiple messages with a single key ( thunderbird doesn't have this ) </li>
<li>Message threads</li>
<li>And last but not least, be able to handle a lot of messages in a folder, don't have to be super fast but at least it shouldn't lock </li>
</ol>
<p>Here's what I tested so far:</p>
<h2>Evolution</h2>
<p>This was a nice surprise.<br />
Pro: Evolution downloaded 87k message headers in just a few seconds and had no problems with selecting all and moving around.<br />
Cons: </p>
<li>No archives</li>
<li>It has global search but it's a bit harder to access</li>
<li>Harder junk marking ( shift+ctrl+j instead of just j )</li>
<li>Always asks if I want to accept a certificate that's not issued for the exact domain of my email server ( at startup ) </li>
<p>I could accept all the cons except for the lack of archiving.<br />
Anyone knows of a plugin that does archiving like thunderbird ? Please let me know!</p>
<h2>Kmail</h2>
<p>Becomes almost unusable with a big inbox ( 87k), hard to select all messages </p>
<p>Pro: message list groups messages by year ( but this still doesn't beat yearly archives )<br />
Cons: </p>
<ul>
<li>very slow with a lot of messages, takes a lot of time to fetch message headers</li>
<li>adding an account doesn't show it immediately in the accounts list, unless you restart kmail</li>
<li>no archives</li>
<li>no keyboard shortcut for junk/spam marking ( seriously ???)</li>
<li>global search harder to access</li>
</ul>
<h2>sylpheed</h2>
<p>Pro: It's fast an lightweight but that also means it lacks what I want<br />
Cons: </p>
<ul>
<li>No archiving</li>
<li>No keybboard shortcut for marking junk mail</li>
<li>No global search</li>
</ul>
<p>Conclusion: there's no client that meets all my needs so I'm going to have to stay with Thunderbird and just use evolution when I want to open a big folder. </p>
<p>What email client are you using ? </p>
<div class='wpfblike' style='height: 40px;'><fb:like href='https://patchlog.com/linux/which-email-client-for-linux/' layout='standard' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>
]]></content:encoded>
					
					<wfw:commentRss>https://patchlog.com/linux/which-email-client-for-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">815</post-id>	</item>
		<item>
		<title>MacOSX command line tricks</title>
		<link>https://patchlog.com/macosx/macosx-command-line-tricks/</link>
					<comments>https://patchlog.com/macosx/macosx-command-line-tricks/#respond</comments>
		
		<dc:creator><![CDATA[Mihai]]></dc:creator>
		<pubDate>Mon, 16 Jul 2012 00:29:11 +0000</pubDate>
				<category><![CDATA[MacOSX]]></category>
		<category><![CDATA[dmg]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[listen]]></category>
		<category><![CDATA[noatime]]></category>
		<category><![CDATA[pidof]]></category>
		<category><![CDATA[strace]]></category>
		<guid isPermaLink="false">http://patchlog.com/?p=794</guid>

					<description><![CDATA[Here's a list of MacOSX commands I had to search for all over the internet because I needed to use them lately and I'm sure I'm going to forget since I'm not a big OSX user. So here they are for when I'll need them again ... 🙂 In linux when you want to know &#8230; <a href="https://patchlog.com/macosx/macosx-command-line-tricks/" class="more-link">Continue reading <span class="screen-reader-text">MacOSX command line tricks</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Here's a list of MacOSX commands I had to search for all over the internet because I needed to use them lately and I'm sure I'm going to forget since I'm not a big OSX user.  So here they are for when I'll need them again ... <img src="https://s.w.org/images/core/emoji/16.0.1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>In linux when you want to know which ports are opened and what applications listen on those ports you use netstat -lnp<br />
In MacOSX you get the listening ports with this:</p>
<pre><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p>Want to see what system call am application is making use strace, for MacOSX thats: </p>
<pre><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p>Here's how to install an application that comes packaged in a .dmg:</p>
<pre><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p>uninstall a package</p>
<pre><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p>pidof required by some mysql scripts </p>
<pre><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p>remount with noatime</p>
<pre><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p>More to come ...</p>
<div class='wpfblike' style='height: 40px;'><fb:like href='https://patchlog.com/macosx/macosx-command-line-tricks/' layout='standard' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>
]]></content:encoded>
					
					<wfw:commentRss>https://patchlog.com/macosx/macosx-command-line-tricks/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">794</post-id>	</item>
		<item>
		<title>Better FIX for Inspiron N7110 touchpad</title>
		<link>https://patchlog.com/linux/better-fix-for-inspiron-n7110-touchpad/</link>
					<comments>https://patchlog.com/linux/better-fix-for-inspiron-n7110-touchpad/#comments</comments>
		
		<dc:creator><![CDATA[Mihai]]></dc:creator>
		<pubDate>Wed, 16 Nov 2011 17:34:24 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[touchpad]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://patchlog.com/?p=784</guid>

					<description><![CDATA[Seth Forshee created a kernel patch and now the ALPS touchapd on this laptop and probably others is recognized as a touchpad instead of falling back to a psmouse. So now you can use the Touchpad tab in the "Mouse and touchpad settings" (gnome) to control the "click to tap", scrolling and other features and &#8230; <a href="https://patchlog.com/linux/better-fix-for-inspiron-n7110-touchpad/" class="more-link">Continue reading <span class="screen-reader-text">Better FIX for Inspiron N7110 touchpad</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Seth Forshee created a kernel patch and now the ALPS touchapd on this laptop and probably others is recognized as a touchpad instead of falling back to a psmouse. </p>
<p>So now you can use the Touchpad tab in the "Mouse and touchpad settings" (gnome) to control the "click to tap", scrolling and other features and you don't have to use <a href="http://patchlog.com/linux/fix-inspiron-n7110-alps-touchpad-in-ubuntu/">the patched syndaemon from my previous post</a>. </p>
<p>To install this fix on ubuntu just download <a href="http://people.canonical.com/~sforshee/alps-touchpad/psmouse-alps-0.10/psmouse-alps-dkms_0.10_all.deb">this deb package</a>, install and reboot. ( tested on Ubuntu 11.10 x86_64 ).  </p>
<p>If you want to know all the details go through the comments on <a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/545307">this bug report #545307</a></p>
<div class='wpfblike' style='height: 40px;'><fb:like href='https://patchlog.com/linux/better-fix-for-inspiron-n7110-touchpad/' layout='standard' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>
]]></content:encoded>
					
					<wfw:commentRss>https://patchlog.com/linux/better-fix-for-inspiron-n7110-touchpad/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">784</post-id>	</item>
		<item>
		<title>Fix inspiron N7110 ALPS Touchpad in Ubuntu</title>
		<link>https://patchlog.com/linux/fix-inspiron-n7110-alps-touchpad-in-ubuntu/</link>
					<comments>https://patchlog.com/linux/fix-inspiron-n7110-alps-touchpad-in-ubuntu/#comments</comments>
		
		<dc:creator><![CDATA[Mihai]]></dc:creator>
		<pubDate>Sat, 20 Aug 2011 18:35:12 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[alsp]]></category>
		<category><![CDATA[disable]]></category>
		<category><![CDATA[inspiron]]></category>
		<category><![CDATA[N7110]]></category>
		<category><![CDATA[synaptics]]></category>
		<category><![CDATA[syndaemon]]></category>
		<category><![CDATA[touchpad]]></category>
		<category><![CDATA[typing]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://patchlog.com/?p=772</guid>

					<description><![CDATA[I recently purchased a new dell inspiron N7110. The laptop is great and Ubuntu 11.04 works quite well but there is one important problem. The problem with most touchpads on laptops is that you'll often touch them accidentally while typing, this gets recorded as a tap/click and the typing cursor might move to another location &#8230; <a href="https://patchlog.com/linux/fix-inspiron-n7110-alps-touchpad-in-ubuntu/" class="more-link">Continue reading <span class="screen-reader-text">Fix inspiron N7110 ALPS Touchpad in Ubuntu</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>I recently purchased a new dell inspiron N7110. The laptop is great and Ubuntu 11.04 works quite well but there is one important problem.</p>
<p>The problem with most touchpads on laptops is that you'll often touch them accidentally while typing, this gets recorded as a tap/click and the typing cursor might move to another location and thus you might and up tying to a whole different place. </p>
<p>With synaptics touchpads or ALPS touchpads ( this is what N7110 has - ALPS Glidepoint) you can use syndaemon, a program that would run in background, monitor the keyboard and disable the touchpad while you type. But this program only works for touchpads which are being recognized as synaptics or ALPS touchpads. The touchpad on N7110 was recognized as a simple mouse, Xorg loaded the evdev driver instead of synaptics.  </p>
<p>So I thought that maybe I can modify syndaemon to make it work with mice too. And I did. I noticed a lot of other people have the same problem so this could be useful even if you have a different touchpad that's also recognized as a mouse.<br />
Download the patch for syndaemon here:<br />
[download id="32"]</p>
<p>To apply the patch:</p>
<pre><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p>The patch adds a new option to syndaemon to tell it to disable the mouse instead of a touchpad, without this the program will just exit when it can't find the touchpad. </p>
<pre><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p>Don't forget to start it every time you start X.  </p>
<p>Of course this is more like a quick hack then a real fix. A real fix would make Xorg or the kernel ( not sure exactly where the problem really is ) recognize this touchpad as a touchpad not as a mouse. </p>
<div class='wpfblike' style='height: 40px;'><fb:like href='https://patchlog.com/linux/fix-inspiron-n7110-alps-touchpad-in-ubuntu/' layout='standard' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>
]]></content:encoded>
					
					<wfw:commentRss>https://patchlog.com/linux/fix-inspiron-n7110-alps-touchpad-in-ubuntu/feed/</wfw:commentRss>
			<slash:comments>15</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">772</post-id>	</item>
		<item>
		<title>How to restore mysql replication</title>
		<link>https://patchlog.com/databases/howto-restore-mysqal-replication/</link>
					<comments>https://patchlog.com/databases/howto-restore-mysqal-replication/#respond</comments>
		
		<dc:creator><![CDATA[Mihai]]></dc:creator>
		<pubDate>Thu, 18 Aug 2011 17:12:25 +0000</pubDate>
				<category><![CDATA[databases]]></category>
		<category><![CDATA[maakit]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[replication]]></category>
		<category><![CDATA[restore]]></category>
		<guid isPermaLink="false">http://patchlog.com/?p=761</guid>

					<description><![CDATA[Something went wrong and your mysql replication broke, I'm talking here about problems with the sql thread, not connection problems. The sql thread shows you an error, what do you do to fix it and resume replication? Here are 3 ways to fix it, each has advantages and disadvantages, pick the one that fits best &#8230; <a href="https://patchlog.com/databases/howto-restore-mysqal-replication/" class="more-link">Continue reading <span class="screen-reader-text">How to restore mysql replication</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Something went wrong and your mysql replication broke, I'm talking here about problems with the sql thread, not connection problems.</p>
<p>The sql thread shows you an error, what do you do to fix it and resume replication?</p>
<p>Here are 3 ways to fix it, each has advantages and disadvantages, pick the one that fits best to your problem.</p>
<h2>1. Skip over the problem</h2>
<p>You can try to just skip over the statement that broke the replication by changing the position in log file.</p>
<p>There are two ways to do this:</p>
<h3>a) you can skip gradually</h3>
<pre>
slave stop;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
slave start;
show slave status \G
</pre>
<p>That would skip the next 1 statement but you can set the counter higher to skip more the one.<br />
Do it until the slave status shows the SQL thead is running. </p>
<h3>b) skip to the current position</h3>
<p>Use this is the first method keeps showing other statements that break replication and you don't have time to gradually skip statements. </p>
<p>First go on the master and type: show master status to find which is the current bin log file and the current position within the file.</p>
<p>Then go on the slave, stop it with "slave stop" and change the file name and position. Something like:</p>
<pre>slave stop; 
CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.001958', MASTER_LOG_POS=52562937;
slave start;
</pre>
<p>But do that with your own file name and position taken from the master.</p>
<p>Check the replication status with "show slave status".<br />
If the results are good ( both Slave_IO_Running and Slave_SQL_Running are Yes ) then you can go to the next step otherwise skip to next methods.</p>
<p>At this point you have a working replication but probably the data on the slave is not the same as on master since you skipped a few sql statements.</p>
<p>To fix it you can use maakit ( <a href="http://www.maatkit.org/doc/mk-table-checksum.html">mk-table-checksum</a> and <a href="http://www.maatkit.org/doc/mk-table-sync.html">mk-table-sync</a> )</p>
<h2>2. Full Dump and Restore</h2>
<p>Connect to master, dump everything in a sql file, copy to replication slave and load it in mysql.</p>
<p>Use --master-data so the replication position is set in the dump file and the slave will know where to start.</p>
<p>Use --disable-keys so the slave will not try to build indexes after each insert and only built them at the end of the import.</p>
<p>Use --add-locks to surround each table dump with lock table/unlock table - this makes the inserts faster in the slave.</p>
<p>Problem:<br />
--master-data will put a read lock on tables so operations on your master will lock waiting for the dump to finish. On large databases this can take a long time and it's unacceptable.</p>
<p>Possible fix:<br />
If you have innodb tables add --single-transaction so a single global lock will be used only for a short time at the beginning of the transaction.</p>
<p>The problem is not so big if you can have <a href="http://www.mysqlperformanceblog.com/2006/08/21/using-lvm-for-mysql-backup-and-replication-setup/" title="Using LVM for mysql backup and replication setup">filesystem snapshots on the master</a> like the ones created by lvm. </p>
<h2>3. Inconsistent Full Dump</h2>
<p>This is just another fix for the problem at #1. Dump the data just like before but without using --master-data. This means no locks so the master can still work normally.<br />
But because you don't use --master-data you will have to set the position in the slave yourself.<br />
on the master type:</p>
<pre>show master status \G</pre>
<p>Take the file name and position and use them in the CHANGE MASTER statement on the slave ( after you load the dump file ) . Something like:</p>
<pre>CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.001958', MASTER_LOG_POS=52562937;</pre>
<p>Of course all of this will create an inconsistent slave but you can fix this easily with maakit.</p>
<p>If you know other methods I'd love to hear about them. Let me know in the comments.</p>
<div class='wpfblike' style='height: 40px;'><fb:like href='https://patchlog.com/databases/howto-restore-mysqal-replication/' layout='standard' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>
]]></content:encoded>
					
					<wfw:commentRss>https://patchlog.com/databases/howto-restore-mysqal-replication/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">761</post-id>	</item>
		<item>
		<title>Wammu backup to CSV for Gmail</title>
		<link>https://patchlog.com/linux/wammu-backup-to-csv-for-gmail/</link>
					<comments>https://patchlog.com/linux/wammu-backup-to-csv-for-gmail/#comments</comments>
		
		<dc:creator><![CDATA[Mihai]]></dc:creator>
		<pubDate>Tue, 09 Aug 2011 09:26:08 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[wammu]]></category>
		<guid isPermaLink="false">http://patchlog.com/?p=750</guid>

					<description><![CDATA[This is a modification to the wammu2csv.pl script that you can still find in google cache if you look for it. The problem with the original script was that wammu ( version 0.35 anyway ) seems to generate backup files encoded in UTF-16 and the regular expressions in that script will not work unless the &#8230; <a href="https://patchlog.com/linux/wammu-backup-to-csv-for-gmail/" class="more-link">Continue reading <span class="screen-reader-text">Wammu backup to CSV for Gmail</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>This is a modification to the wammu2csv.pl script that you can still find in google cache if you look for it.</p>
<p>The problem with the original script was that wammu ( version 0.35 anyway ) seems to generate backup files encoded in UTF-16 and the regular expressions in that script will not work unless the content is first converted from UTF-16.</p>
<p>Another benefit of the modified script is that now you don't have to convert the backup file from DOS to UNIX anymore.</p>
<p>To use this script:</p>
<ol>
<li>Connect to your phone using wammu</li>
<li>Retrieve contacts from phone and save them in a file using the backup function</li>
<li>download [download id="31"] and run:
<pre>./wammu2csv.pl &lt;your-backup-file&gt; &gt; &lt;your-csv-file&gt;</pre>
<p>This will generate a CSV file that you can import in Gmail</li>
</ol>
<div class='wpfblike' style='height: 40px;'><fb:like href='https://patchlog.com/linux/wammu-backup-to-csv-for-gmail/' layout='standard' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>
]]></content:encoded>
					
					<wfw:commentRss>https://patchlog.com/linux/wammu-backup-to-csv-for-gmail/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">750</post-id>	</item>
	</channel>
</rss>
