<?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>TECH.kulish.com &#187; FreeBSD</title>
	<atom:link href="http://tech.kulish.com/category/os/freebsd/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech.kulish.com</link>
	<description>Technical Goulash</description>
	<lastBuildDate>Thu, 01 Dec 2011 00:39:52 +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>HTTPS Redirects</title>
		<link>http://tech.kulish.com/2011/02/18/https-redirects/</link>
		<comments>http://tech.kulish.com/2011/02/18/https-redirects/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 17:17:44 +0000</pubDate>
		<dc:creator>Null</dc:creator>
				<category><![CDATA[Daemons]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Website]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[HTTPS]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://tech.kulish.com/?p=248</guid>
		<description><![CDATA[Redirecting HTTP to HTTPS for a whole site using virtual hosts: #Basics snipped for brevity.... RewriteEngine on #RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] RedirectPermanent / https://www.foo.com/]]></description>
			<content:encoded><![CDATA[<p>Redirecting HTTP to HTTPS for a whole site using virtual hosts:</p>
<blockquote>
<pre><code>

<VirtualHost>

#Basics snipped for brevity....

<Directory /var/www/foo/html>
   RewriteEngine on
   #RewriteBase /
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</Directory>

RedirectPermanent / https://www.foo.com/
</VirtualHost>
</code></pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://tech.kulish.com/2011/02/18/https-redirects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeNAS Debian UPS Specs</title>
		<link>http://tech.kulish.com/2010/12/10/freenas-ups-specs/</link>
		<comments>http://tech.kulish.com/2010/12/10/freenas-ups-specs/#comments</comments>
		<pubDate>Sat, 11 Dec 2010 03:44:32 +0000</pubDate>
		<dc:creator>Null</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[NUT]]></category>
		<category><![CDATA[UPS]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://tech.kulish.com/?p=216</guid>
		<description><![CDATA[Initially the UPS was being monitored by a FreeNAS installation, this was changed due to performance issues unrelated to the UPS monitoring software. Details on the migration are still being compiled, meanwhile, read this. How come I feel there was a lot of time wasted?! Here are the readings from the UPS. I am disappointed [...]]]></description>
			<content:encoded><![CDATA[<p>Initially the UPS was being monitored by a FreeNAS installation, this was changed due to performance issues unrelated to the UPS monitoring software.  Details on the migration are still being compiled, meanwhile, read <a href="http://tech.kulish.com/2008/03/26/debian-nas/">this</a>.</p>
<p>How come I feel there was a lot of time wasted?!</p>
<p>Here are the readings from the UPS.  I am disappointed that it is not reporting battery voltage, but at least I am getting % charged.<BR><BR></p>
<pre>
battery.charge: 100                     Battery charge (percent of full)
battery.charge.low: 28			Remaining battery level when UPS switches to LB (%)
driver.name: powerpanel			Driver name
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ttyS0	Serial or USB port
driver.version: 2.2.2			Driver version - NUT release
driver.version.internal: 0.23		Internal driver version
input.frequency: 60.3			Input line frequency (Hz)
input.frequency.nominal: 60		Nominal input line frequency (Hz)
input.transfer.high: 145		High voltage transfer point (V)
input.transfer.low: 90			Low voltage transfer point (V)
input.voltage: 123			Input voltage (V)
input.voltage.nominal: 120		Nominal input voltage (V)
output.voltage: 0			Output voltage (V)
output.voltage.nominal: 120		Nominal output voltage (V)
ups.beeper.status: enabled		UPS beeper status
ups.delay.shutdown: 0			Shutdown with delay command (seconds)
ups.delay.start: 45			Wait before (re)starting (seconds)
ups.firmware: 5.100			UPS firmware
ups.load: 46				Load on UPS (percent of full)
ups.mfr: CyberPower			UPS manufacturer
ups.model: OP1500			UPS model
ups.serial: [unknown]			UPS serial number
ups.status: OL				UPS status
ups.temperature: 35.3			UPS temperature (degrees C)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://tech.kulish.com/2010/12/10/freenas-ups-specs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Raw FTP Commands</title>
		<link>http://tech.kulish.com/2009/05/22/raw-ftp-commands/</link>
		<comments>http://tech.kulish.com/2009/05/22/raw-ftp-commands/#comments</comments>
		<pubDate>Fri, 22 May 2009 14:04:11 +0000</pubDate>
		<dc:creator>Null</dc:creator>
				<category><![CDATA[Daemons]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[PASV]]></category>
		<category><![CDATA[PORT]]></category>
		<category><![CDATA[USER]]></category>

		<guid isPermaLink="false">http://tech.lan.side/?p=57</guid>
		<description><![CDATA[I retrieved it from here: http://www.nsftools.com/tips/RawFTP.htm List of raw FTP commands (Warning: this is a technical document, not necessary for most FTP use.) Note that commands marked with a * are not implemented in a number of FTP servers. Common commands * ABOR &#8211; abort a file transfer * CWD &#8211; change working directory * [...]]]></description>
			<content:encoded><![CDATA[<p>I retrieved it from here: http://www.nsftools.com/tips/RawFTP.htm</p>
<p>List of raw FTP commands<br />
(Warning: this is a technical document, not necessary for most FTP use.)</p>
<p>Note that commands marked with a * are not implemented in a number of FTP servers.</p>
<p>Common commands</p>
<p>    * ABOR &#8211; abort a file transfer<br />
    * CWD &#8211; change working directory<br />
    * DELE &#8211; delete a remote file<br />
    * LIST &#8211; list remote files<br />
    * MDTM &#8211; return the modification time of a file<br />
    * MKD &#8211; make a remote directory<br />
    * NLST &#8211; name list of remote directory<br />
    * PASS &#8211; send password<br />
    * PASV &#8211; enter passive mode<br />
    * PORT &#8211; open a data port<br />
    * PWD &#8211; print working directory<br />
    * QUIT &#8211; terminate the connection<br />
    * RETR &#8211; retrieve a remote file<br />
    * RMD &#8211; remove a remote directory<br />
    * RNFR &#8211; rename from<br />
    * RNTO &#8211; rename to<br />
    * SITE &#8211; site-specific commands<br />
    * SIZE &#8211; return the size of a file<br />
    * STOR &#8211; store a file on the remote host<br />
    * TYPE &#8211; set transfer type<br />
    * USER &#8211; send username </p>
<p>Less common commands</p>
<p>    * ACCT* &#8211; send account information<br />
    * APPE &#8211; append to a remote file<br />
    * CDUP &#8211; CWD to the parent of the current directory<br />
    * HELP &#8211; return help on using the server<br />
    * MODE &#8211; set transfer mode<br />
    * NOOP &#8211; do nothing<br />
    * REIN* &#8211; reinitialize the connection<br />
    * STAT &#8211; return server status<br />
    * STOU &#8211; store a file uniquely<br />
    * STRU &#8211; set file transfer structure<br />
    * SYST &#8211; return system type </p>
<p>ABOR<br />
Syntax: ABOR</p>
<p>Aborts a file transfer currently in progress.</p>
<p>ACCT*<br />
Syntax: ACCT account-info</p>
<p>This command is used to send account information on systems that require it. Typically sent after a PASS command.</p>
<p>ALLO<br />
Syntax: ALLO size [R max-record-size]</p>
<p>Allocates sufficient storage space to receive a file. If the maximum size of a record also needs to be known, that is sent as a second numeric parameter following a space, the capital letter &#8220;R&#8221;, and another space.</p>
<p>APPE<br />
Syntax: APPE remote-filename</p>
<p>Append data to the end of a file on the remote host. If the file does not already exist, it is created. This command must be preceded by a PORT or PASV command so that the server knows where to receive data from.</p>
<p>CDUP<br />
Syntax: CDUP</p>
<p>Makes the parent of the current directory be the current directory.</p>
<p>CWD<br />
Syntax: CWD remote-directory</p>
<p>Makes the given directory be the current directory on the remote host.</p>
<p>DELE<br />
Syntax: DELE remote-filename</p>
<p>Deletes the given file on the remote host.</p>
<p>HELP<br />
Syntax: HELP [command]</p>
<p>If a command is given, returns help on that command; otherwise, returns general help for the FTP server (usually a list of supported commands).</p>
<p>LIST<br />
Syntax: LIST [remote-filespec]</p>
<p>If remote-filespec refers to a file, sends information about that file. If remote-filespec refers to a directory, sends information about each file in that directory. remote-filespec defaults to the current directory. This command must be preceded by a PORT or PASV command.</p>
<p>MDTM<br />
Syntax: MDTM remote-filename</p>
<p>Returns the last-modified time of the given file on the remote host in the format &#8220;YYYYMMDDhhmmss&#8221;: YYYY is the four-digit year, MM is the month from 01 to 12, DD is the day of the month from 01 to 31, hh is the hour from 00 to 23, mm is the minute from 00 to 59, and ss is the second from 00 to 59.</p>
<p>MKD<br />
Syntax: MKD remote-directory</p>
<p>Creates the named directory on the remote host.</p>
<p>MODE<br />
Syntax: MODE mode-character</p>
<p>Sets the transfer mode to one of:</p>
<p>    * S &#8211; Stream<br />
    * B &#8211; Block<br />
    * C &#8211; Compressed </p>
<p>The default mode is Stream.</p>
<p>NLST<br />
Syntax: NLST [remote-directory]</p>
<p>Returns a list of filenames in the given directory (defaulting to the current directory), with no other information. Must be preceded by a PORT or PASV command.</p>
<p>NOOP<br />
Syntax: NOOP</p>
<p>Does nothing except return a response.</p>
<p>PASS<br />
Syntax: PASS password</p>
<p>After sending the USER command, send this command to complete the login process. (Note, however, that an ACCT command may have to be used on some systems.)</p>
<p>PASV<br />
Syntax: PASV</p>
<p>Tells the server to enter &#8220;passive mode&#8221;. In passive mode, the server will wait for the client to establish a connection with it rather than attempting to connect to a client-specified port. The server will respond with the address of the port it is listening on, with a message like:<br />
227 Entering Passive Mode (a1,a2,a3,a4,p1,p2)<br />
where a1.a2.a3.a4 is the IP address and p1*256+p2 is the port number.</p>
<p>PORT<br />
Syntax: PORT a1,a2,a3,a4,p1,p2</p>
<p>Specifies the host and port to which the server should connect for the next file transfer. This is interpreted as IP address a1.a2.a3.a4, port p1*256+p2.</p>
<p>PWD<br />
Syntax: PWD</p>
<p>Returns the name of the current directory on the remote host.</p>
<p>QUIT<br />
Syntax: QUIT</p>
<p>Terminates the command connection.</p>
<p>REIN*<br />
Syntax: REIN</p>
<p>Reinitializes the command connection &#8211; cancels the current user/password/account information. Should be followed by a USER command for another login.</p>
<p>REST<br />
Syntax: REST position</p>
<p>Sets the point at which a file transfer should start; useful for resuming interrupted transfers. For nonstructured files, this is simply a decimal number. This command must immediately precede a data transfer command (RETR or STOR only); i.e. it must come after any PORT or PASV command.</p>
<p>RETR<br />
Syntax: RETR remote-filename</p>
<p>Begins transmission of a file from the remote host. Must be preceded by either a PORT command or a PASV command to indicate where the server should send data.</p>
<p>RMD<br />
Syntax: RMD remote-directory</p>
<p>Deletes the named directory on the remote host.</p>
<p>RNFR<br />
Syntax: RNFR from-filename</p>
<p>Used when renaming a file. Use this command to specify the file to be renamed; follow it with an RNTO command to specify the new name for the file.</p>
<p>RNTO<br />
Syntax: RNTO to-filename</p>
<p>Used when renaming a file. After sending an RNFR command to specify the file to rename, send this command to specify the new name for the file.</p>
<p>SITE*<br />
Syntax: SITE site-specific-command</p>
<p>Executes a site-specific command.</p>
<p>SIZE<br />
Syntax: SIZE remote-filename</p>
<p>Returns the size of the remote file as a decimal number.</p>
<p>STAT<br />
Syntax: STAT [remote-filespec]</p>
<p>If invoked without parameters, returns general status information about the FTP server process. If a parameter is given, acts like the LIST command, except that data is sent over the control connection (no PORT or PASV command is required).</p>
<p>STOR<br />
Syntax: STOR remote-filename</p>
<p>Begins transmission of a file to the remote site. Must be preceded by either a PORT command or a PASV command so the server knows where to accept data from.</p>
<p>STOU<br />
Syntax: STOU</p>
<p>Begins transmission of a file to the remote site; the remote filename will be unique in the current directory. The response from the server will include the filename.</p>
<p>STRU<br />
Syntax: STRU structure-character</p>
<p>Sets the file structure for transfer to one of:</p>
<p>    * F &#8211; File (no structure)<br />
    * R &#8211; Record structure<br />
    * P &#8211; Page structure </p>
<p>The default structure is File.</p>
<p>SYST<br />
Syntax: SYST</p>
<p>Returns a word identifying the system, the word &#8220;Type:&#8221;, and the default transfer type (as would be set by the TYPE command). For example: UNIX Type: L8</p>
<p>TYPE<br />
Syntax: TYPE type-character [second-type-character]</p>
<p>Sets the type of file to be transferred. type-character can be any of:</p>
<p>    * A &#8211; ASCII text<br />
    * E &#8211; EBCDIC text<br />
    * I &#8211; image (binary data)<br />
    * L &#8211; local format </p>
<p>For A and E, the second-type-character specifies how the text should be interpreted. It can be:</p>
<p>    * N &#8211; Non-print (not destined for printing). This is the default if second-type-character is omitted.<br />
    * T &#8211; Telnet format control (<CR>, <FF>, etc.)<br />
    * C &#8211; ASA Carriage Control </p>
<p>For L, the second-type-character specifies the number of bits per byte on the local system, and may not be omitted.</p>
<p>USER<br />
Syntax: USER username</p>
<p>Send this command to begin the login process. username should be a valid username on the system, or &#8220;anonymous&#8221; to initiate an anonymous login.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.kulish.com/2009/05/22/raw-ftp-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maintenance: gps.kulish.com</title>
		<link>http://tech.kulish.com/2008/01/23/maintenance-gps-kulish-com/</link>
		<comments>http://tech.kulish.com/2008/01/23/maintenance-gps-kulish-com/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 15:42:20 +0000</pubDate>
		<dc:creator>Null</dc:creator>
				<category><![CDATA[Daemons]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[ntp]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[kulish]]></category>

		<guid isPermaLink="false">http://tech.lan.side/?p=64</guid>
		<description><![CDATA[The gps.kulish.com FQDN will be re-directed to our backup stratum 2 server during a short maintenance window from 1700 &#8211; 2000 CDT US. ntp pool clients should see no interruption in services. However, this means that kulish.com will be providing a stratum 2 time source while the gps is offline. ** Stratum 1 services are [...]]]></description>
			<content:encoded><![CDATA[<p>The gps.kulish.com FQDN will be re-directed to our backup stratum 2 server during a short maintenance window from 1700 &#8211; 2000 CDT US.</p>
<p>ntp pool clients should see no interruption in services. However, this means that kulish.com will be providing a stratum 2 time source while the gps is offline. **</p>
<p>Stratum 1 services are expected to resume at, or before, 2000 CST.</p>
<p>During maintenance we will be making final adjustments to the GPS system before going &#8220;live&#8221;.</p>
<p>** A second stratum 1 server will be coming online Q2 2008 to avoid the stratum bump in the future.</p>
<p>NOTE: See comments for details about the outage.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.kulish.com/2008/01/23/maintenance-gps-kulish-com/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bind9: Master Only</title>
		<link>http://tech.kulish.com/2008/01/10/bind9-master-only/</link>
		<comments>http://tech.kulish.com/2008/01/10/bind9-master-only/#comments</comments>
		<pubDate>Thu, 10 Jan 2008 19:43:22 +0000</pubDate>
		<dc:creator>Null</dc:creator>
				<category><![CDATA[Daemons]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[zone]]></category>

		<guid isPermaLink="false">http://tech.lan.side/?p=77</guid>
		<description><![CDATA[Configuration for a master only DNS server. 1. WILL NOT answer queries 2. WILL NOT forward queries 3. WILL NOT perform recursion 4. WILL allow transfers from specified slaves Zone and configuration files are backed up disk to disk via rsync. Single point editing of our name space. Single point of failure. If server is [...]]]></description>
			<content:encoded><![CDATA[<p>Configuration for a master only DNS server.</p>
<p>1. WILL NOT answer queries<br />
2. WILL NOT forward queries<br />
3. WILL NOT perform recursion<br />
4. WILL allow transfers from specified slaves</p>
<p>Zone and configuration files are backed up disk to disk via rsync.</p>
<p>Single point editing of our name space.</p>
<p>Single point of failure. If server is lost, updates to DNS cannot be made until another master is brought online.</p>
<p>options {<br />
directory &#8220;/etc&#8221;;<br />
pid-file &#8220;/var/run/named.pid&#8221;;<br />
version &#8220;Windows 3.11&#8243;;<br />
allow-query {&#8220;none&#8221;; };<br />
allow-recursion {&#8220;none&#8221;; };<br />
notify yes;<br />
also-notify {<br />
IPn.IPn.IPn.IPn;<br />
};<br />
allow-transfer {<br />
IPn.IPn.IPn.IPn;<br />
};<br />
};</p>
<p>zone &#8220;my.hosts.net&#8221; {<br />
type master;<br />
file &#8220;/etc/my.hosts.net&#8221;;<br />
};</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.kulish.com/2008/01/10/bind9-master-only/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spam Bashing</title>
		<link>http://tech.kulish.com/2006/03/07/spam-bashing/</link>
		<comments>http://tech.kulish.com/2006/03/07/spam-bashing/#comments</comments>
		<pubDate>Tue, 07 Mar 2006 23:55:06 +0000</pubDate>
		<dc:creator>Null</dc:creator>
				<category><![CDATA[Daemons]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[amavis]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[SMTP]]></category>
		<category><![CDATA[spamassassin]]></category>

		<guid isPermaLink="false">http://tech.lan.side/?p=107</guid>
		<description><![CDATA[We finally have our spam filtering back in place at kulish.com. We&#8217;ve set it to a semi-aggressive filter where pretty much every incoming email is marked with a spam score. We&#8217;re using the postfix+amavis+clamd+spamassassin setup. While we&#8217;ve been doing without it for a few months (using client side stuff until I found time), I still [...]]]></description>
			<content:encoded><![CDATA[<p>We finally have our spam filtering back in place at kulish.com. We&#8217;ve set it to a semi-aggressive filter where pretty much every incoming email is marked with a spam score.</p>
<p>We&#8217;re using the postfix+amavis+clamd+spamassassin setup.</p>
<p>While we&#8217;ve been doing without it for a few months (using client side stuff until I found time), I still don&#8217;t remember it working this well on the last server install.</p>
<p>Here&#8217;s a wopper of an email, just after the installation and testing were completed. The receiving parties and server names have been sanitized to protect the marginally innocent (**PROTECTED**).</p>
<p>From ***PRO@TECTED***.com Tue Feb 14 23:02:47 2006<br />
Return-Path:<br />
Delivered-To: spam-quarantine<br />
X-Envelope-From:<br />
X-Envelope-To: **PROTECTED**<br />
X-Quarantine-Id:<br />
Received: from lh (unknown [61.130.156.43])<br />
by **PROTECTED** (Postfix) with SMTP id D90164B92A;<br />
Tue, 14 Feb 2006 23:02:35 -0600 (CST)<br />
Received: from 61.130.156.43 (HELO localhost.localdomain) (61.130.156.43)<br />
by 61.130.156.43 with SMTP; Wed, 15 Feb 2006 07:06:05 +0200<br />
Message-Id:</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.kulish.com/2006/03/07/spam-bashing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simple MySQL Backup Script</title>
		<link>http://tech.kulish.com/2005/12/15/simple-mysql-backup-script/</link>
		<comments>http://tech.kulish.com/2005/12/15/simple-mysql-backup-script/#comments</comments>
		<pubDate>Thu, 15 Dec 2005 05:00:36 +0000</pubDate>
		<dc:creator>Null</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[Backup Script]]></category>
		<category><![CDATA[BSD]]></category>
		<category><![CDATA[database]]></category>

		<guid isPermaLink="false">http://tech.lan.side/?p=109</guid>
		<description><![CDATA[Below is a simple database backup script to use with MySQL. #!/usr/bin/perl -w use strict; # Backup &#8211; Script used to backup MySQL databases to an NFS share. # VERSION: 1.2 # DATE: 12152005 # AUTHOR: packetmad # This is a Freebsd 4.x-centric script. It may run on other # versions of Freebsd, or any [...]]]></description>
			<content:encoded><![CDATA[<p>Below is a simple database backup script to use with MySQL.</p>
<p>#!/usr/bin/perl -w</p>
<p>use strict;</p>
<p># Backup &#8211; Script used to backup MySQL databases to an NFS share.<br />
# VERSION: 1.2<br />
# DATE: 12152005<br />
# AUTHOR: packetmad</p>
<p># This is a Freebsd 4.x-centric script. It may run on other<br />
# versions of Freebsd, or any other BSD for that matter, but I<br />
# wrote it on a Freebsd 4.7 system. It&#8217;s not even guaranteed<br />
# to run on that.</p>
<p># Speaking of guarantees, warranties, etc., there ain&#8217;t one, so<br />
# don&#8217;t even try. :P<br />
# I am not responsible for the output of this script, nor am I<br />
# responsible for any damage or data loss as a result of using<br />
# this script. In short, I am not responsible for anything<br />
# regarding this script.<br />
# Furthermore, I am not responsible if this script causes<br />
# Your dog to die, your wife to leave you, or<br />
# your truck to break down.<br />
# I am releasing this script under the conventions of the BSD<br />
# license. You can use it, modify it, sleep with it, or<br />
# whatever. If you do find this script useful or have<br />
# suggestions on a better way to do some things contained here<br />
# in, I welcome all correspondence.<br />
# The latest version of this script can be obtained at:<br />
# http://tech.kulish.com</p>
<p># USE THIS SCRIPT AT YOUR OWN RISK!!!!!!!!!!!!!!!!!!</p>
<p># Change Log<br />
# v1.1<br />
# Date: 11302002<br />
# Initial Release, absolutely BUG FREE! :)<br />
# v1.2<br />
# Date: 12152005<br />
# Added compression functionality<br />
# Added naming of backup files by date<br />
# Changed longterm storeage directory for 1back to store1</p>
<p>###<br />
# Declare variables and arrays.<br />
###</p>
<p>my (<br />
$bdir, $sysname, $logfile, %databases, $key, $database, $rightnow<br />
);</p>
<p>$bdir = &#8216;/databases/&#8217;;<br />
chomp ( $sysname = `uname -n` );<br />
chomp ( $rightnow = `date +%m%d%G%H%M` );<br />
#print $rightnow;<br />
# Databases we want to backup and associated archive names.<br />
# Database => sql file pairs.</p>
<p>%databases = (&#8216;testdb1&#8242; => &#8216;testdb1.sql&#8217;,<br />
&#8216;testdb2&#8242; => &#8216;testdb2.sql&#8217;);</p>
<p>###<br />
# Backup Section<br />
###<br />
foreach $key (sort keys %databases) {<br />
$database = $databases{$key};<br />
`mysqldump -uUSERNAME -pPASSWORD $key >> $bdir$sysname/$database`;}</p>
<p>###<br />
# Compression Functionality<br />
###</p>
<p>foreach $key (sort keys %databases) {<br />
$database = $databases{$key};<br />
`gzip -c $bdir$sysname/$database > $bdir$sysname/$rightnow$database.gz`;}</p>
<p># scp them to the fileshare<br />
#`scp $bdir$sysname/*.gz USERNAME\@SERVER:databases`;</p>
<p>###<br />
# Clean backup dir<br />
###</p>
<p>`rm -rf $bdir$sysname/*.sql`;<br />
`mv $bdir$sysname/*.gz $bdir$sysname/store1`;</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.kulish.com/2005/12/15/simple-mysql-backup-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>STSE Supercluster</title>
		<link>http://tech.kulish.com/2003/12/26/stse-supercluster/</link>
		<comments>http://tech.kulish.com/2003/12/26/stse-supercluster/#comments</comments>
		<pubDate>Fri, 26 Dec 2003 23:45:01 +0000</pubDate>
		<dc:creator>Null</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[beowulf]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[ganglia]]></category>
		<category><![CDATA[mpi]]></category>

		<guid isPermaLink="false">http://tech.lan.side/?p=126</guid>
		<description><![CDATA[I&#8217;ve spent the last few months picking at a FreeBSD clustering project. Well, with some help from BSDHound and the Central Iowa Linux Users Group (CIALUG), it&#8217;s finally complete. I clustered 4 Pentium 133s running FreeBSD 5.1-Release using LAM-MPI for the messaging interface and Ganglia for the monitoring. You can view the statistics here, but [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent the last few months picking at a FreeBSD clustering project. Well, with some help from BSDHound and the Central Iowa Linux Users Group (CIALUG), it&#8217;s finally complete.</p>
<p>I clustered 4 Pentium 133s running FreeBSD 5.1-Release using LAM-MPI for the messaging interface and Ganglia for the monitoring. You can view the statistics here, but you must be registered and signed-in to do so (the pages are fairly graphic intensive).</p>
<p>I believe there will be a clustering How-To posted to BSDHound.com in the future, and if it is, I will be sure to post and update here.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.kulish.com/2003/12/26/stse-supercluster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mounting Jumpdrives in FreeBSD</title>
		<link>http://tech.kulish.com/2003/12/16/mounting-jumpdrives-in-freebsd/</link>
		<comments>http://tech.kulish.com/2003/12/16/mounting-jumpdrives-in-freebsd/#comments</comments>
		<pubDate>Tue, 16 Dec 2003 23:44:07 +0000</pubDate>
		<dc:creator>Null</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[FBSD]]></category>
		<category><![CDATA[Lexar Jumpdrive]]></category>
		<category><![CDATA[print]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://tech.lan.side/?p=128</guid>
		<description><![CDATA[After my fiasco trying to get FBSD to auto mount when the jumpdrive was inserted, I ended up just creating a little perl script to take care of it for now (being finals week and all). It&#8217;s not much and does absolutely no error checking, but if anyone has any suggestions, they are more than [...]]]></description>
			<content:encoded><![CDATA[<p>After my fiasco trying to get FBSD to auto mount when the jumpdrive was inserted, I ended up just creating a little perl script to take care of it for now (being finals week and all). It&#8217;s not much and does absolutely no error checking, but if anyone has any suggestions, they are more than welcome.</p>
<p>Keep in mind, you must have the proper settings active in your kernel for this to work.</p>
<p>Here it is:</p>
<p>#!/usr/bin/perl -w</p>
<p>use strict;</p>
<p># If no arguments are given, print a brief help message<br />
if (!defined($ARGV[0]))<br />
{<br />
print &#8220;\n&#8221;;<br />
print &#8220;Help:\n&#8221;;<br />
print &#8220;Lexar Jumpdrive mounting script\n&#8221;;<br />
print &#8220;\n&#8221;;<br />
print &#8220;You must provide one of the following arguments:\n&#8221;;<br />
print &#8220;m Mounts the Jumpdrive.\n&#8221;;<br />
print &#8220;u UnMounts the Jumpdrive.\n&#8221;;<br />
print &#8220;\n&#8221;;<br />
print &#8220;Example: lexar m\n&#8221;;<br />
print &#8220;\n&#8221;;<br />
}</p>
<p># m mounts the jumpdrive<br />
elsif ($ARGV[0] eq &#8220;m&#8221;)<br />
{<br />
# mounting the jumpdrive at /lexar<br />
# this can be set to whatever you like<br />
system &#8220;/sbin/mount -t msdos /dev/da0s1 /lexar&#8221;;<br />
print &#8220;Jumpdrive mounted at /lexar.\n&#8221;;<br />
}</p>
<p>elsif ($ARGV[0] eq &#8220;u&#8221;)<br />
{<br />
# umounts the jumpdrive<br />
system &#8220;/sbin/umount /lexar&#8221;;<br />
print &#8220;Jumpdrive unmounted.\n&#8221;;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.kulish.com/2003/12/16/mounting-jumpdrives-in-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing fstab Problems in FreeBSD</title>
		<link>http://tech.kulish.com/2003/12/15/fixing-fstab-problems-in-freebsd/</link>
		<comments>http://tech.kulish.com/2003/12/15/fixing-fstab-problems-in-freebsd/#comments</comments>
		<pubDate>Mon, 15 Dec 2003 23:34:20 +0000</pubDate>
		<dc:creator>Null</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[Opensource Attitudes]]></category>
		<category><![CDATA[Single User Mode]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://tech.lan.side/?p=130</guid>
		<description><![CDATA[I made a bad decision that resulted in a non-bootable (to single user only) FreeBSD system. Now I realize that no one really cares what kind of jam I&#8217;m in, just like I don&#8217;t normally care what kind they are in. But when you have to sit through some &#8216;open sourcer&#8217; stroke his own ego [...]]]></description>
			<content:encoded><![CDATA[<p>I made a bad decision that resulted in a non-bootable (to single user only) FreeBSD system. Now I realize that no one really cares what kind of jam I&#8217;m in, just like I don&#8217;t normally care what kind they are in. But when you have to sit through some &#8216;open sourcer&#8217; stroke his own ego with the &#8220;I know something or where to find it, and you dont. I know its a simple question to answer quickly, but Im just gonna post tidbits of a manpage out of context&#8221; attitude, it really irritates me.</p>
<p>I use alot of opensource and I try to avoid doing that to others (usually successful), as well as avoiding the &#8220;the distro I use is better, so you should just switch to fix your problem&#8221; answers. There is definately reason to read the documentation, but at some point its just proper to be upstanding and state &#8220;such and such should fix your problem, when you&#8217;re back up and running make sure to look at the manpage&#8221;. Their normal excuse is &#8220;I&#8217;m sick of answering all these newbie questions that are in the clearly addressed manpages&#8221;. To that I say, THEN GET OUT OF ?N*X SUPPORT CHANNELS.</p>
<p>Anyway, I digress. Now to the real problem, me blowing up my /etc/fstab and how to fix it, in case it happens to you!</p>
<p>I started a forum thread entitled &#8220;Opensource Attitudes&#8221; to address the rant portion of this. If anyone has any questions about the technical side of this article, feel free to start a thread in the appropriate forum.</p>
<p>So the faulty decision I made was to add a USB jumpdrive to my fstab. I wouldn&#8217;t recommend this :)</p>
<p>To fix the ensuing cluster, I did the following:</p>
<p>1. Rebooted into Single User Mode<br />
2. Mount (to see whats mounted and how)<br />
3. cat /etc/fstab (to see what filesystems I normally mount)<br />
4. mount /dev/ad0s2a /usr (to get my utilities, namely vi)<br />
5. mount -u -w / (This mounts / writeable so you can save your new fstab)<br />
6. vi /etc/fstab to remove your bad entry or whatever it is that was changed<br />
7. reboot</p>
<p>At this point everything should be back to where it was before the fateful edit, if not, just repeat the steps above until it is.</p>
<p>It&#8217;s also a good idea to make a copy of your /etc/fstab in case it&#8217;s fat-fingered yet again. That way, you can at least see the way it was previously broke (better yet, make a backup before your initial edit of the working copy&#8230; lesson learned)</p>
<p>Hope this saves some of you from the open-source ego-trip, at least for fixing your file systems.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.kulish.com/2003/12/15/fixing-fstab-problems-in-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: kulish.com @ 2012-02-07 18:44:45 by W3 Total Cache -->
