<?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>Our-files.com - Nathans&#039; Rants</title>
	<atom:link href="http://blog.our-files.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.our-files.com</link>
	<description>Rants and Randomness, Mishaps and Misconceptions, and other wierd things</description>
	<lastBuildDate>Sat, 11 Feb 2012 08:13:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>SQL server log shipping over the interwebs with workgroup servers</title>
		<link>http://blog.our-files.com/2012/02/sql-server-log-shipping-over-the-interwebs-with-workgroup-servers/</link>
		<comments>http://blog.our-files.com/2012/02/sql-server-log-shipping-over-the-interwebs-with-workgroup-servers/#comments</comments>
		<pubDate>Sat, 11 Feb 2012 08:13:38 +0000</pubDate>
		<dc:creator>Internat</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://blog.our-files.com/?p=23</guid>
		<description><![CDATA[Notes from when i set up log shipping over the internet.. to be padded out with real deatil later. Create vpn between servers (use remote access and routing, and create the other server as a peristant dial on demand route) Make user say &#8220;sqlserver_agent&#8221; on both servers, with same username and same password. Make directory [...]]]></description>
			<content:encoded><![CDATA[<p>Notes from when i set up log shipping over the internet.. to be padded out with real deatil later.</p>
<p>Create vpn between servers (use remote access and routing, and create the other server as a peristant dial on demand route)</p>
<p>Make user say &#8220;sqlserver_agent&#8221; on both servers, with same username and same password.<br />
Make directory on primary server eg c:\database_logs<br />
grant access to both &#8220;sqlserver_agent&#8221; and &#8220;network service&#8221;<br />
share path on primary server. </p>
<p>create log destination folder on secondary server eg &#8220;c:\database_restore_logs&#8221; make sure both &#8220;network service&#8221; and &#8220;sqlserver_agent&#8221; can read/write to it</p>
<p>make sql server agent on both run servers with the same account as above.</p>
<p>make sure database on primary server is in full mode.<br />
back up database to share, and manually copy it across. manually restore it on the other site, but leave it in standby mode (had to do the manual copy since sqlserver.exe isnt running as the service account, and therefor couldnt access the network share where it was living on. only the agent could)</p>
<p>use the wizard to create the jobs on both servers that do the restore.</p>
<p>my wizard for some reason created the job with the wrong hostname and the sqllogship.exe command couldnt talk tot he server, so had to edit it from the wierd windows hostname that it had and change it to the ip of the host. using the correct hostname probably would have worked as we..</p>
<p>the user &#8220;network service&#8221; has no access over the network to do fuck all. dont use it for trying to communicate to other hosts.. i tried enabling guest, adding network service to all the shares, enabling everyone, and a whole lot of other things.. just create a service account on both servers with the same details and that will work just fine!!</p>
<p>used these sites for info</p>
<p>http://www.mssqltips.com/sqlservertip/2562/sql-server-log-shipping-to-a-different-domain-or-workgroup/</p>
<p>http://omaralzabir.com/how_to_setup_sql_server_2005_transaction_log_ship_on_large_database_that_really_works/</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.our-files.com/2012/02/sql-server-log-shipping-over-the-interwebs-with-workgroup-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Encrypted FlatFile Volume</title>
		<link>http://blog.our-files.com/2011/10/encrypted-flatfile-volume/</link>
		<comments>http://blog.our-files.com/2011/10/encrypted-flatfile-volume/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 05:22:35 +0000</pubDate>
		<dc:creator>Internat</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.our-files.com/?p=19</guid>
		<description><![CDATA[I used to have an encrypted volume on my file server, for storing sensitive things, but after an upgrade to the newest version of Debian, that stopped working. So after some mucking around and getting the old module for cryptoloop put back into my current kernel, I figured i might as well migrate over to [...]]]></description>
			<content:encoded><![CDATA[<p>I used to have an encrypted volume on my file server, for storing sensitive things, but after an upgrade to the newest version of Debian, that stopped working. So after some mucking around and getting the old module for cryptoloop put back into my current kernel, I figured i might as well migrate over to the newer version, which uses cryptsetup, losetup, and luks.</p>
<p>Ive shamelessly stolen these commands (although ive changed some of them)from <a href="http://wiki.centos.org/HowTos/EncryptedFilesystem">elsewhere</a>.. </p>
<p>Create the file system and restricted access.<br />
<code><br />
dd of=/path/to/secretfs bs=1G count=0 seek=8<br />
chmod 600 /path/to/secretfs<br />
</code></p>
<p>Create a loopback device for the file<br />
<code>losetup /dev/loop0 /path/to/secretfs</code><br />
Creates the volume, asks you for the key, and then creatss the DM mapping<br />
<code>cryptsetup -y luksFormat /dev/loop0<br />
cryptsetup luksOpen /dev/loop0 secretfs</code></p>
<p>Pad the file so it generates its random data<br />
<code>dd if=/dev/zero of=/dev/mapper/secretfs</code></p>
<p>Create the filesystem<br />
<code>mkfs.ext3 dev/mapper/secretfs<br />
</code></p>
<p># Mount the new filesystem in a convenient location<br />
<code>mkdir /mnt/cryptofs/secretfs<br />
mount /dev/mapper/secretfs /mnt/cryptofs/secretfs</code></p>
<p>And an encrypted volume is setup.</p>
<p>Now how to unmount:<br />
<code><br />
umount /mnt/cryptofs/secretfs<br />
cryptsetup luksClose secretfs<br />
losetup -d /dev/loop0</code></p>
<p>Remount:<br />
<code><br />
losetup /dev/loop0 /path/to/secretfs<br />
cryptsetup luksOpen /dev/loop0 secretfs<br />
(enter password when prompted)<br />
mount /dev/mapper/secretfs /mnt/cryptofs/secretfs</code></p>
<p>Now stuff that i can never remember how to do is grow the volume.</p>
<p>Make sure the volume is closed, unmounted etc.<br />
<code>umount /mnt/cryptofs/secretfs<br />
cryptsetup luksClose secretfs<br />
losetup -d /dev/loop0<br />
</code></p>
<p>Add 20gig to the file<br />
<code>dd if=/dev/zero bs=1G count=20 >> /dev/mapper/secretfs<br />
</code></p>
<p>Remount and reopen part of it</p>
<p><code>losetup /dev/loop0 /path/to/secretfs<br />
cryptsetup lucksOpen /dev/loop5 EncryptedFS<br />
</code></p>
<p>check the FS first<br />
<code>e2fsck -f /dev/mapper/EncryptedFS<br />
</code><br />
once thats done grow it<br />
<code>resize2fs /dev/mapper/EncryptedFS</code><br />
and your done. You can now open the volume for use</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.our-files.com/2011/10/encrypted-flatfile-volume/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reattaching database and fixing users</title>
		<link>http://blog.our-files.com/2010/06/reattaching-database-and-fixing-users/</link>
		<comments>http://blog.our-files.com/2010/06/reattaching-database-and-fixing-users/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 02:24:37 +0000</pubDate>
		<dc:creator>Internat</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://blog.our-files.com/?p=17</guid>
		<description><![CDATA[Backed up and restored a database the other day, but of course the network users arent setup properly cause there actually stored in the master database.. So i recreate the user on the instance which is fine , and then try and regrant it permissions on the database but it fails because its already there&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p>Backed up and restored a database the other day, but of course the network users arent setup properly cause there actually stored in the master database..</p>
<p>So i recreate the user on the instance which is fine , and then try and regrant it permissions on the database but it fails because its already there&#8230;</p>
<p>To fix&#8230;</p>
<pre name="code" class="sql">
User DATABASE
EXEC sp_change_users_login 'update_one', 'usernamehere', 'usernamehere''
</pre>
<p><a href="http://msdn.microsoft.com/en-us/library/ms174378.aspx">http://msdn.microsoft.com/en-us/library/ms174378.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.our-files.com/2010/06/reattaching-database-and-fixing-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pulling iphone backups apart</title>
		<link>http://blog.our-files.com/2010/04/pulling-iphone-backups-apart/</link>
		<comments>http://blog.our-files.com/2010/04/pulling-iphone-backups-apart/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 10:49:05 +0000</pubDate>
		<dc:creator>Internat</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.our-files.com/?p=15</guid>
		<description><![CDATA[I wanted to pull my iphone backups apart because i accidentally deleted some stuff but didn&#8217;t want to restore it all and play with it that way. So heres the tools and what i needed to do it: Backups are stored at: ~/Library/Application Support/MobileSync/Backup) or on a PC (c:\Documents and Settings\Application Data\Apple Computer\MobileSync\Backup). Iphone backup [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to pull my iphone backups apart because i accidentally deleted some stuff but didn&#8217;t want to restore it all and play with it that way.</p>
<p>So heres the tools and what i needed to do it:<br />
Backups are stored at: ~/Library/Application Support/MobileSync/Backup) or on a PC (c:\Documents and Settings\<username>Application Data\Apple Computer\MobileSync\Backup).</p>
<p><a href="http://www.supercrazyawesome.com/">Iphone backup extractor for OSX</a><br />
<a href="http://menoob.com/2008/12/04/how-to-save-and-read-your-iphone-text-messages-on-your-computer/">how-to-save-and-read-your-iphone-text-messages-on-your-computer</a><br />
<a href="http://menoob.com/2008/12/02/how-to-recover-your-iphone-files-photos-contacts-notes-sms-call-history-etc/">how-to-recover-your-iphone-files-photos-contacts-notes-sms-call-history-etc</a></p>
<p>Couldnt work out how to pull up previous backups though.. only the latest one.. which is a pain.. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.our-files.com/2010/04/pulling-iphone-backups-apart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manage your email better.</title>
		<link>http://blog.our-files.com/2010/03/manage-your-email-better/</link>
		<comments>http://blog.our-files.com/2010/03/manage-your-email-better/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 09:31:43 +0000</pubDate>
		<dc:creator>Internat</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.our-files.com/2010/03/manage-your-email-better/</guid>
		<description><![CDATA[Shorter emails are better.. apparently]]></description>
			<content:encoded><![CDATA[<p><img alt="" src="http://howtogetfocused.com/wp-content/uploads/2010/03/Email-Flowchart.png" title="Manage email better" class="alignnone" width="645" height="1099" /></p>
<p><a href="http://www.jonathanfields.com/blog/short-replies/?utm_source=feedburner&#038;utm_medium=feed&#038;utm_campaign=Feed%3A+JonathanFields+%28Jonathan+Fields+|+Awake+At+The+Wheel%29&#038;utm_content=Twitter">Shorter emails are better.. apparently</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.our-files.com/2010/03/manage-your-email-better/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Random Date functions in Oracle</title>
		<link>http://blog.our-files.com/2010/03/random-date-functions-in-oracle/</link>
		<comments>http://blog.our-files.com/2010/03/random-date-functions-in-oracle/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 03:58:30 +0000</pubDate>
		<dc:creator>Internat</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://blog.our-files.com/?p=13</guid>
		<description><![CDATA[Rounds Timefieldhere to the nearest 5 minutes.. trunc(timefieldhere,'dd') + round(to_char(timefieldhere,'sssss') / 300) / 288)]]></description>
			<content:encoded><![CDATA[<p>Rounds Timefieldhere to the nearest 5 minutes..</p>
<pre name="code" class="sql">
trunc(timefieldhere,'dd') + round(to_char(timefieldhere,'sssss') / 300) / 288)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.our-files.com/2010/03/random-date-functions-in-oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sed makes my head hurt</title>
		<link>http://blog.our-files.com/2010/03/sed-makes-my-head-hurt/</link>
		<comments>http://blog.our-files.com/2010/03/sed-makes-my-head-hurt/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 10:24:28 +0000</pubDate>
		<dc:creator>Internat</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.our-files.com/?p=12</guid>
		<description><![CDATA[Trying to use sed in some stuff and i never want to have to write this kinda crap again so.. grep '^D' Filename &#124; sed -e 's/\(^.\{43\}\)0\(.*\)/\1M\2/g' That looks for any line in &#8220;Filename&#8221; that starts with D&#8230; then if the 44th character is 0, replace it with an M. kgo. grep "^D" Filename &#124; [...]]]></description>
			<content:encoded><![CDATA[<p>Trying to use sed in some stuff and i never want to have to write this kinda crap again so..</p>
<pre>
grep '^D' Filename  | sed -e 's/\(^.\{43\}\)0\(.*\)/\1M\2/g'
</pre>
<p>That looks for any line in &#8220;Filename&#8221; that starts with D&#8230; then if the 44th character is 0, replace it with an M.<br />
kgo.</p>
<pre>
grep "^D" Filename | sed -e 's/.*/&#038;XX/'
</pre>
<p>That looks for anything in Filename and adds &#8220;XX&#8221; to the end of the line..<br />
<a href="http://www.thegeekstuff.com/2009/09/unix-sed-tutorial-replace-text-inside-a-file-using-substitute-command/">Another Useful link</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.our-files.com/2010/03/sed-makes-my-head-hurt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remap printers using wscript</title>
		<link>http://blog.our-files.com/2010/03/remap-printers-using-wscript/</link>
		<comments>http://blog.our-files.com/2010/03/remap-printers-using-wscript/#comments</comments>
		<pubDate>Sun, 21 Mar 2010 10:26:37 +0000</pubDate>
		<dc:creator>Internat</dc:creator>
				<category><![CDATA[VBS/WSCRIPT]]></category>

		<guid isPermaLink="false">http://blog.our-files.com/?p=11</guid>
		<description><![CDATA[For work i had to come up with a way to remap printers since our current print server is on the way out.. I was pondering at home about the best way to do this with minimal work for the service desk or for me, and this is what i came up with.. Easy way [...]]]></description>
			<content:encoded><![CDATA[<p>For work i had to come up with a way to remap printers since our current print server is on the way out.. I was pondering at home about the best way to do this with minimal work for the service desk or for me, and this is what i came up with.. Easy way to map any old printers to new ones.. Just have to update the findnewPrinter function with the old vs new printers..</p>
<pre name="code" class="vb">
'Script to map and remove printers from old print server to new one
'Needs an entry in findNewPrinter function for each mapping
'nfrankish;2010-03-21

Set objNetwork = CreateObject("Wscript.Network")
strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" &#038; strComputer &#038; "\root\cimv2")

Function findNewPrinter(Printername)
                select case PrinterName
                case "\\OldPrintServer\OldPrinterQueue"
                                findNewPrinter = "\\newprintserver\newprintqueue"
                case else
                                wscript.echo  "Printer: " &#038; Printername &#038; " not found"
                                findNewPrinter = ""
                end select
end function

Set colPrinters = objWMIService.ExecQuery _
    ("Select * From Win32_Printer Where Local = FALSE")

For Each objPrinter in colPrinters
                wscript.echo "Printer: " &#038; objprinter.Name &#038; " Default: " &#038; objprinter.default
                strNewPrinter = findNewPrinter(objprinter.name)
                if not (strNewPrinter = "") then
                                objNetwork.AddWindowsPRinterConnection strNewPrinter
                                if (objPrinter.default) then
                                                objNetwork.SetDefaultPrinter strNewPrinter
                                end if
                                objNetwork.RemovePrinterConnection objprinter.name, true, true
               end if
Next
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.our-files.com/2010/03/remap-printers-using-wscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linode.com VPS (Virtual Private Server) Hosting</title>
		<link>http://blog.our-files.com/2007/12/linodecom-vps-virtual-private-server-hosting/</link>
		<comments>http://blog.our-files.com/2007/12/linodecom-vps-virtual-private-server-hosting/#comments</comments>
		<pubDate>Mon, 24 Dec 2007 11:59:40 +0000</pubDate>
		<dc:creator>Internat</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.our-files.com/?p=9</guid>
		<description><![CDATA[So I&#8217;ve been with Linode.com now for coming up on either 3 or 4 years, I&#8217;ve lost track now. I was looking for a remote server that i could play with and run a few services such as mail and maybe a web page or two. So a friend and I bought a linode. Back [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve been with Linode.com now for coming up on either 3 or 4 years, I&#8217;ve lost track now. I was looking for a remote server that i could play with and run a few services such as mail and maybe a web page or two. So a friend and I bought a linode. Back then the lowest linode you could get was a 32mb linode (32mb of ram), and i think it hat 4gig of HDD space. Not a lot but it was reasonable at 19.95$ a month.  </p>
<p>Low and behold 3-4 years later, for the same price linode now offers the Linode 360, with 10Gig of storage off the bat. Every 6 months or so, so far, the team at Linode have managed to excite us all, by giving us free upgrades, the last one 20% ram increase for xmas. Ive been through countless free RAM upgrades, as well as storage, and transfer, and not once has there been a cost associated with it. </p>
<p>The only reason i can say that my uptime is not massively large, is that they keep giving out these upgrades that require us to reboot to take advantage of them. Otherwise i havnt had a much of a problem or downtime, that i havn&#8217;t caused myself, or was outside of Linode&#8217;s reachs (Datacentre issues).</p>
<p>Thats not to mention the friendliness and helpfulness of the 3 admins, Caker, Tasaro, and Mikegrb who are always available via the ticketing system, and atleast one is generally lurking in the irc channel (#linode on irc.oftc.net). On top of the help from the staff,  there are always people arround in the chat channel that are more then willing to help out on just about any linux topic, linode related, or not. That and the <a href="http://www.linode.com/forums">forums </a>are always bristling with activity, be it howto guides, customer feedback, announcements or community help requests with specific platform/software packages. </p>
<p>These days i have 3 linodes, 2x 360mb, and a 540mb one, ive never looked back&#8230;</p>
<p>With servers in 3 different data centres, full root access, friendly staff and a great community behind them, if your looking for a VPS, you can stop looking. Linode is the place to be. </p>
<p><a href="http://www.linode.com/?r=06166b3e8f5fb777b195dba42555e2aac7c435a8">www.linode.com</a> Got root?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.our-files.com/2007/12/linodecom-vps-virtual-private-server-hosting/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>LVM2 Guide</title>
		<link>http://blog.our-files.com/2007/12/lvm2-guide/</link>
		<comments>http://blog.our-files.com/2007/12/lvm2-guide/#comments</comments>
		<pubDate>Sun, 09 Dec 2007 10:19:11 +0000</pubDate>
		<dc:creator>Internat</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.our-files.com/?p=8</guid>
		<description><![CDATA[Well i got a few more drives today for my file server, and one of the things i couldnt remember was how to add to the LVM device that exists that stores all my loot. First off there is pvdisplay which shows you which physical drives are alocated to what volume group lvdisplay which gives [...]]]></description>
			<content:encoded><![CDATA[<p>Well i got a few more drives today for my file server, and one of the things i couldnt remember was how to add to the LVM device that exists that stores all my loot.</p>
<p>First off there is<br />
<code>pvdisplay</code> which shows you which physical drives are alocated to what volume group<br />
<code>lvdisplay</code> which gives you details about the actually logical volume, such as its status etc.</p>
<p>Now the part that initially tripped me up was forgetting to create the partition to LVM type on the raid<br />
<code>pvcreate /path/to/device</code><br />
It&#8217;ll show up something like this</p>
<blockquote><p>
pvcreate /dev/md3<br />
  Physical volume &#8220;/dev/md3&#8243; successfully created
</p></blockquote>
<p>Next step is to add it to the existing group<br />
<code>vgextend /path/to/device</code></p>
<blockquote><p>
channel:/etc/lvm# vgextend vg00 /dev/md3<br />
  Volume group &#8220;vg00&#8243; successfully extended
 </p></blockquote>
<p>Now that its in the volume group and its extended that group to incorporate all the devices, you need to extend the logical volume.<br />
<code>lvextend -l +536551 /dev/vg00/lv_space</code><br />
Where 536551 is the extents listed as free as shwon by <code>pvdisplay</code></p>
<p>Now that that is done, its just a matter of extending the file system..</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.our-files.com/2007/12/lvm2-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

