<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -40,14 +40,14 @@
 			&lt;key&gt;caret&lt;/key&gt;
 			&lt;dict&gt;
 				&lt;key&gt;column&lt;/key&gt;
-				&lt;integer&gt;4&lt;/integer&gt;
+				&lt;integer&gt;7&lt;/integer&gt;
 				&lt;key&gt;line&lt;/key&gt;
-				&lt;integer&gt;33&lt;/integer&gt;
+				&lt;integer&gt;65&lt;/integer&gt;
 			&lt;/dict&gt;
 			&lt;key&gt;firstVisibleColumn&lt;/key&gt;
 			&lt;integer&gt;0&lt;/integer&gt;
 			&lt;key&gt;firstVisibleLine&lt;/key&gt;
-			&lt;integer&gt;0&lt;/integer&gt;
+			&lt;integer&gt;21&lt;/integer&gt;
 		&lt;/dict&gt;
 		&lt;key&gt;config/backup_manager.yml&lt;/key&gt;
 		&lt;dict&gt;
@@ -93,6 +93,20 @@
 				&lt;integer&gt;10&lt;/integer&gt;
 			&lt;/dict&gt;
 		&lt;/dict&gt;
+		&lt;key&gt;lib/full_backup.rb&lt;/key&gt;
+		&lt;dict&gt;
+			&lt;key&gt;caret&lt;/key&gt;
+			&lt;dict&gt;
+				&lt;key&gt;column&lt;/key&gt;
+				&lt;integer&gt;27&lt;/integer&gt;
+				&lt;key&gt;line&lt;/key&gt;
+				&lt;integer&gt;13&lt;/integer&gt;
+			&lt;/dict&gt;
+			&lt;key&gt;firstVisibleColumn&lt;/key&gt;
+			&lt;integer&gt;0&lt;/integer&gt;
+			&lt;key&gt;firstVisibleLine&lt;/key&gt;
+			&lt;integer&gt;0&lt;/integer&gt;
+		&lt;/dict&gt;
 		&lt;key&gt;lib/project_manager.rb&lt;/key&gt;
 		&lt;dict&gt;
 			&lt;key&gt;caret&lt;/key&gt;
@@ -127,8 +141,9 @@
 		&lt;string&gt;TODO.taskpaper&lt;/string&gt;
 		&lt;string&gt;lib/snapshot.rb&lt;/string&gt;
 		&lt;string&gt;bin/backup.rb&lt;/string&gt;
-		&lt;string&gt;config/backup_manager.yml&lt;/string&gt;
 		&lt;string&gt;lib/backup.rb&lt;/string&gt;
+		&lt;string&gt;lib/full_backup.rb&lt;/string&gt;
+		&lt;string&gt;config/backup_manager.yml&lt;/string&gt;
 		&lt;string&gt;lib/project_manager.rb&lt;/string&gt;
 	&lt;/array&gt;
 	&lt;key&gt;showFileHierarchyDrawer&lt;/key&gt;</diff>
      <filename>Nemo Backup System.tmproj</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@
 # = Nemo Backup Manager
 #
 # Author::		Mike Green &lt;mike.is.green@gmail.com&gt;
-# Date::			03-11-2008
+# Date::			05-09-2008
 # Copyright::	Copyright (c) 2008 Mike Green
 # License::		GNU General Public License
 #
@@ -24,11 +24,18 @@ require '../lib/backup.rb'
 
 Prefs = OpenStruct.new({
 	&quot;delete&quot; =&gt; true,
-	&quot;config&quot; =&gt; File.expand_path(File.join(File.dirname(__FILE__), &quot;../config/backup_manager.yml&quot;))}),
+	&quot;config&quot; =&gt; File.expand_path(File.join(File.dirname(__FILE__), &quot;../config/backup_manager.yml&quot;)),
+	&quot;snapshot&quot; =&gt; false,
+	&quot;archive&quot; =&gt; false,
+	&quot;interval&quot; =&gt; nil
 })
 
 args = OptionParser.new do |opts|
 	opts.banner = &quot;backup.rb [options] drive_1 [drive_2, drive_3, etc.]&quot;
+	opts.on(&quot;-s&quot;, &quot;--snapshot INTERVAL&quot;, [:hourly, :daily], &quot;Take an incremental snapshot for the selected interval (hourly or daily)&quot;) do |opt|
+		Prefs.snapshot = true
+		Prefs.interval = opt
+	end
 	opts.on(&quot;-n&quot;, &quot;--no-delete&quot;, &quot;Don't delete files no longer found on source volume&quot;) do
 		Prefs.delete = false
 	end
@@ -43,10 +50,23 @@ args = OptionParser.new do |opts|
 	end
 end
 
+
 begin
 	args.parse!
 	
+	ARGV.each do |schema|
+		if Prefs.snapshot
+			sh = Snapshot.new(schema, Prefs.interval)
+			sh.snap
+		elsif Prefs.archive
+			fb = FullBackup.new(schema)
+			fb.compress if fb.enough_room?
+		elsif Prefs.snapshot &amp;&amp; Prefs.archive
+			puts &quot;One or the other, bud. You can't take a snapshot and a backup at the same time&quot;
+			exit
+		end
+	end
 rescue OptionParser::ParseError =&gt; e
-	LOG.error(e)
+	#LOG.error(e)
 	puts e
 end
\ No newline at end of file</diff>
      <filename>bin/backup.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,26 +11,12 @@ class FullBackup
 	
 	def initialize(schema)
 		@date		= Time.now.strftime(&quot;%m-%d-%Y&quot;)
-		@schema	= Backup::SETTINGS[schema]
+		@schema	= settings(schema)
 		@src		= Pathname.new(@schema['source'])
-		@dest		= Pathname.new(@schema['backup directory'])
-		
+		@dest		= Pathname.new(@schema['backupdir'])
 		@dest.mkpath unless @dest.exist?
 	end
 	
-	def get_source_size
-		LOG.info(&quot;Calculating size of the files to be backed up. This may take a while...&quot;)
-		output 		= `du -ckd 0 #{@src.to_s}`
-		@src_size	= output.slice(/^\d+/).to_i
-		LOG.info(&quot;Total Size: #{@src_size.to_s} Megabytes&quot;)
-	end
-	
-	def get_dest_free_space
-		output = `df -m #{@dest.to_s} | awk '{print $4}'`
-		@dest_free_space	= output.slice(/\d+$/).to_i
-		LOG.info(&quot;Destination volume has #{@dest_free_space.to_s} MB of free space&quot;)
-	end
-	
 	def compress
 		Dir.chdir(@src.dirname)
 		Zip::ZipFile.open((@dest + &quot;FullBackup_#{@date}.zip&quot;).to_s, Zip::ZipFile::CREATE) do |zipfile|
@@ -45,4 +31,20 @@ class FullBackup
 		Dir.glob(&quot;#{@dest}/*.0&quot;).each {|f| File.delete(f) }	# Get rid of temporary files created by rubyzip.
 	end
 	
+	def enough_room?
+		@src_size = get_source_size
+		@dest_free_space = get_dest_free_space
+		@dest_free_space &gt; @src_size
+	end
+	
+	private
+		def get_source_size
+			output 		= `du -md 0 #{@src.to_s}`
+			output.slice(/^\d+/).to_i
+		end
+	
+		def get_dest_free_space
+			output = `df -m #{@dest.to_s} | awk '{print $4}'`
+			output.slice(/\d+$/).to_i
+		end
 end
\ No newline at end of file</diff>
      <filename>lib/full_backup.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,9 +11,9 @@ class Snapshot
 		@schema 		= settings(schema)
 		@interval		= interval
 		begin
-			FileUtils.mkpath(&quot;#{@schema['snapshot directory']}/#{interval}&quot;) unless FileTest.exist?(&quot;#{@schema['snapshot directory']}/#{interval}&quot;)
+			FileUtils.mkpath(&quot;#{@schema['snapdir']}/#{interval}&quot;) unless FileTest.exist?(&quot;#{@schema['snapdir']}/#{interval}&quot;)
 			@src 				= Pathname.new(@schema['source'])
-			@dest 			= Pathname.new(@schema['snapshot directory'] + &quot;/#{interval}&quot;)
+			@dest 			= Pathname.new(@schema['snapdir'] + &quot;/#{interval}&quot;)
 			@max_snaps	= @schema[interval]
 			@excludes		= @schema['exclude'].map {|e| &quot;--exclude=#{e} &quot; }
 			@siblings 	= @dest.children.reverse.delete_if {|x| x.basename.to_s !~ /Snapshot\.\d+/ }
@@ -56,7 +56,7 @@ class Snapshot
 		end
 
 		def refresh
-			@dest 			= Pathname.new(@schema['snapshot directory'] + &quot;/#{interval}&quot;)
+			@dest 			= Pathname.new(@schema['snapdir'] + &quot;/#{interval}&quot;)
 			@siblings 	= @dest.children.reverse.delete_if {|x| x.basename.to_s !~ /Snapshot\.\d+/ }
 			@oldest_sib = @siblings[0].to_s
 			self</diff>
      <filename>lib/snapshot.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f41526961dd862c68fd92b571e76d6cda63443b5</id>
    </parent>
  </parents>
  <author>
    <name>Mike Green</name>
    <email>mike@fifthroomcreative.com</email>
  </author>
  <url>http://github.com/mikedamage/incremental-backup-system/commit/e5476973a81ecc84e84bf36435147aea05671d44</url>
  <id>e5476973a81ecc84e84bf36435147aea05671d44</id>
  <committed-date>2008-05-09T13:32:07-07:00</committed-date>
  <authored-date>2008-05-09T13:32:07-07:00</authored-date>
  <message>beginning basic functionality for CLI interface</message>
  <tree>b361b8fc74fe6225b00923f5824fce1a335e9dc1</tree>
  <committer>
    <name>Mike Green</name>
    <email>mike@fifthroomcreative.com</email>
  </committer>
</commit>
