<?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>Zach Dwiel &#187; fyi</title>
	<atom:link href="http://dwiel.net/blog/category/fyi/feed/" rel="self" type="application/rss+xml" />
	<link>http://dwiel.net</link>
	<description>Repository of code snippits and ideas</description>
	<lastBuildDate>Thu, 22 Apr 2010 15:15:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>mongorestore: ERROR: root directory must be a dump of a single collection when specifying a collection name with &#8211;collection</title>
		<link>http://dwiel.net/blog/mongorestore-error-root-directory-must-be-a-dump-of-a-single-collection-when-specifying-a-collection-name-with-collection/</link>
		<comments>http://dwiel.net/blog/mongorestore-error-root-directory-must-be-a-dump-of-a-single-collection-when-specifying-a-collection-name-with-collection/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 02:20:38 +0000</pubDate>
		<dc:creator>dwiel</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[fyi]]></category>

		<guid isPermaLink="false">http://dwiel.net/?p=195</guid>
		<description><![CDATA[mongorestore wants the specific collection's filename rather than the entire database's dump folder:
span, strong { font-family: courier, monospace; }

dwiel@dwiel$ mongodump -d db -c variables -o ../backups/1
connected to: 127.0.0.1
DATABASE: db	 to 	../backups/1/db
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;db.variables to ../backups/1/db/variables.bson
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3 objects
dwiel@dwiel$ mongorestore -d db -c variables --drop ../backups/1
ERROR: root directory must be a dump of a single collection
&#160;&#160;&#160;&#160;&#160;&#160;&#160;when specifying a collection name [...]]]></description>
			<content:encoded><![CDATA[<p>mongorestore wants the specific collection's filename rather than the entire database's dump folder:</p>
<style>span, strong { font-family: courier, monospace; }</style>
<p><code></p>
<div style="font-family: courier, monospace;"><strong>dwiel@dwiel$</strong><span style="color: #000000;"> </span>mongodump -d db -c variables -o ../backups/1<br />
<span style="color: #333333;">connected to: 127.0.0.1<br />
DATABASE: db	 to 	../backups/1/db<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;db.variables to ../backups/1/db/variables.bson<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3 objects</span><br />
<strong>dwiel@dwiel$</strong> mongorestore -d db -c variables --drop ../backups/1<br />
<span style="color: #800000;">ERROR: root directory must be a dump of a single collection<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when specifying a collection name with --collection<br />
usage: ........</span><br />
<strong>dwiel@dwiel$</strong> mongorestore -d db -c variables --drop ../backups/1/db/variables.bson<br />
<span style="color: #333333;">connected to: 127.0.0.1<br />
../backups/1/db/variables.bson<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;going into namespace [db.variables]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dropping<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3 objects</span></div>
<p></code></p>
<p>quite obvious in retrospect given the error message, but the internet didn't know the answer yet and there isn't much documentation about mongorestore.</p>
]]></content:encoded>
			<wfw:commentRss>http://dwiel.net/blog/mongorestore-error-root-directory-must-be-a-dump-of-a-single-collection-when-specifying-a-collection-name-with-collection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Permission Errors After Moving Datadir</title>
		<link>http://dwiel.net/blog/mysql-permission-errors-after-moving-datadir/</link>
		<comments>http://dwiel.net/blog/mysql-permission-errors-after-moving-datadir/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 03:52:11 +0000</pubDate>
		<dc:creator>dwiel</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[fyi]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://dwiel.net/?p=161</guid>
		<description><![CDATA[I wanted to make space on my root partition and so moved my mysql data dir to /home/mysql in /etc/mysql/my.conf and received the following errors:
dwiel@dwiel:~$ sudo mysqld
091111 20:39:16 [Warning] Can't create test file /home/mysql/dwiel.lower-test
091111 20:39:16 [Warning] Can't create test file /home/mysql/dwiel.lower-test
091111 20:39:16 [Note] Plugin 'FEDERATED' is disabled.
mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
091111 20:39:16 [ERROR] [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to make space on my root partition and so moved my mysql data dir to /home/mysql in /etc/mysql/my.conf and received the following errors:</p>
<p><code>dwiel@dwiel:~$ sudo mysqld<br />
091111 20:39:16 [Warning] Can't create test file /home/mysql/dwiel.lower-test<br />
091111 20:39:16 [Warning] Can't create test file /home/mysql/dwiel.lower-test<br />
091111 20:39:16 [Note] Plugin 'FEDERATED' is disabled.<br />
mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)<br />
091111 20:39:16 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.<br />
091111 20:39:16  InnoDB: Operating system error number 13 in a file operation.<br />
InnoDB: The error means mysqld does not have the access rights to<br />
InnoDB: the directory.<br />
InnoDB: File name ./ibdata1<br />
InnoDB: File operation call: 'open'.<br />
InnoDB: Cannot continue operation.<br />
</code></p>
<p>The problem was with apparmor.  It was restricting mysql from reading and writing to /home/mysql.  To correct this I edited the file /etc/apparmor.d/usr.sbin.mysqld and added:</p>
<p><code><br />
/home/mysql r,<br />
/home/mysql** rwk,<br />
</code></p>
<p>to the end of the file.  Then restarted apparmor:</p>
<p><code><br />
sudo /etc/init.d/apparmor restart<br />
</code></p>
<p>and then restarted apache with no problem</p>
]]></content:encoded>
			<wfw:commentRss>http://dwiel.net/blog/mysql-permission-errors-after-moving-datadir/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Passwordless login for SSH not working</title>
		<link>http://dwiel.net/blog/passwordless-login-for-ssh-not-working/</link>
		<comments>http://dwiel.net/blog/passwordless-login-for-ssh-not-working/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 07:22:12 +0000</pubDate>
		<dc:creator>dwiel</dc:creator>
				<category><![CDATA[fyi]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[passwordless]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[sshd]]></category>

		<guid isPermaLink="false">http://dwiel.net/?p=63</guid>
		<description><![CDATA[I have not been able to login to my system with passwordless SSH for some time now and finally figured out the problem.  I had to change the permissions of my home directory to disallow writing by everyone.  I knew that ~/.ssh and the files in it required specific permissions to be set, but I [...]]]></description>
			<content:encoded><![CDATA[<p>I have not been able to login to my system with passwordless SSH for some time now and finally figured out the problem.  I had to change the permissions of my home directory to disallow writing by everyone.  I knew that ~/.ssh and the files in it required specific permissions to be set, but I hadn't heard about the home directory having similar requirements.</p>
]]></content:encoded>
			<wfw:commentRss>http://dwiel.net/blog/passwordless-login-for-ssh-not-working/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
