The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus 1 for Mac
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
my backup file shrunk??? Thread Tools Search this Thread Display Modes
hi,

my backup ofocus was 3.2mb. this is after doing a compact and a rebuild.

shutdown, reopened, saved again, still 3.2mb

then I added 3 linked files (jpg, but not stored as attachments),
so file should not have grown. and it didn't.

it shrunk! now it's 2.3mb.

what happened???

I'm wondering if i accidentally deleted a giant folder full of stuff. Impossible to know since I have so many folders and most are collapsed.

It would be very easy to mistakenly delete a folder as it doesn't require a command-delete, but just a single press with no confirmation such as (do you wish to delete entire folder and all subfolders?) is this normal protocol? or is this an operation that should be changed?

is there any way to compare the two backup files to see easily what is different. i think in microsoft word I can compare two versions of files and it shows in red what's different. is there any app to do this? or a script?

thanks again everyone!
 
There are certain circumstances in which "compact" will still leave files around which can be cleaned up later. For example, any change files less than an hour old will always be preserved.

If enough time passed between one backup and the next for some transactions to be compacted away, that could explain what you saw.

Quote:
Originally Posted by myfre View Post
It would be very easy to mistakenly delete a folder as it doesn't require a command-delete, but just a single press with no confirmation
Sorry for the confusion! If the entire contents of your selection are visible, OmniFocus will delete it, but if there are hidden contents, it'll ask for confirmation. (See attached screenshot.)

Quote:
Originally Posted by myfre View Post
is there any way to compare the two backup files to see easily what is different. i think in microsoft word I can compare two versions of files and it shows in red what's different. is there any app to do this? or a script?
Hm, I'm not sure if we've gotten a feature request for a diff tool before, but I'll make sure your post gets filed as one, or attached to an existing request if there is one.

There is a rough way to accomplish this using Rob Trew's excellent Quick Stats script, but it's going to require some effort.
  1. Back up your current database to your desktop or other easy-to-find location.
  2. Revert OmniFocus to the first backup you want to test, then run Quick Stats. Use the "copy to clipboard" button to save stats in TextEdit or similar.
  3. Revert to the second backup you want to test, then run quick stats again.
  4. Compare results of the two Quick Stats runs.

If the stats match, transaction files were deleted between the backups, but the informational content didn't actually change. If there was some sort of informational content change, you'll want to open both backups and look for differences.

Final step, of course, is to revert to the backup you made in Step 1, above.

Hope this helps!
Attached Thumbnails
Click image for larger version

Name:	Delete.png
Views:	949
Size:	70.3 KB
ID:	2238  

Last edited by Brian; 2012-02-03 at 12:28 PM.. Reason: forgot to attach the screenshot.
 
Wasn't able to find an existing request for a diff tool; filed a new one. Thanks!
 
Side note: Just because your file is smaller doesn't guarantee you've lost data. If one client hasn't synced in a couple days, the data is spread across multiple files. When all the clients are perfectly in sync, it can be smooshed down into fewer files.
 
You can open your backup files (without restoring them!) by double-clicking them. You'll get a suitably-titled window in addition to the normal one, and you can have a look to see if anything is obviously missing.
 
thanks. used Rob's quick stats script and compared the old backup as whpalmer suggested. they are the same.

regarding deleting, it seems i can delete a collapsed folder with no confirmation message, if that's what you mean by hidden contents.

I would prefer to use command delete, if that can be added as a feature request. or have a confirmation for any delete -at least as an option.

thanks
 
Quote:
Originally Posted by myfre View Post
thanks. used Rob's quick stats script and compared the old backup as whpalmer suggested. they are the same.
You know, I thought to myself "he's not going to use OFQuickStats to compare them, is he? Not if I tell him to look..." when I wrote that post. Apparently, I was wrong :-)

OFQuickStats isn't the tool for the job, as it rummages around in the cache for the default document, and so will give identical answers even if the databases are completely different. It not only doesn't know which database you might be looking at, it doesn't even need OmniFocus to be running to do its work. Alas, it only works for the default document, not any that you've opened by double-clicking in the Finder.

If you want to do some counting and have it work for other than the default document, you might use this older script which isn't as fast:

Code:
-- Recursively counts projects, single-action lists, and folders of the front OmniFocus document. Written by Dennis Rande, 10/16/08.  Additional modifications by Bill Palmer to permit use with other documents, count actions and zip files, etc.

global FolderRec
global ProjRec
global SALRec

set FolderRec to {numActive:0, numDropped:0, totalNum:0}
set ProjRec to {numActive:0, numOnHold:0, numCompleted:0, numDropped:0, totalNum:0}
set SALRec to {numActive:0, numOnHold:0, numCompleted:0, numDropped:0, totalNum:0}

tell application "OmniFocus"
	if (front document is default document) then
		set DoZipFileandActions to true
	else
		set DoZipFileandActions to false
	end if
	my GetStats(front document)
	repeat with aFolder in every folder of front document
		my GetStats(aFolder)
		my RecursiveScan(aFolder)
	end repeat
end tell



set output to ""

set output to output & "Active Folders:  " & numActive of FolderRec & return
set output to output & "Dropped Folders:  " & numDropped of FolderRec & return
set output to output & "Total Folders:  " & totalNum of FolderRec & return & return

set output to output & "Active Projects:  " & numActive of ProjRec & return
set output to output & "On Hold Projects:  " & numOnHold of ProjRec & return
set output to output & "Completed Projects:  " & numCompleted of ProjRec & return
set output to output & "Dropped Projects:  " & numDropped of ProjRec & return
set output to output & "Total Projects:  " & totalNum of ProjRec & return & return

set output to output & "Active Single-Action Lists:  " & numActive of SALRec & return
set output to output & "On Hold Single-Action Lists:  " & numOnHold of SALRec & return
set output to output & "Completed Single-Action Lists:  " & numCompleted of SALRec & return
set output to output & "Dropped Single-Action Lists:  " & numDropped of SALRec & return
set output to output & "Total Single-Action Lists:  " & totalNum of SALRec & return & return

if (DoZipFileandActions) then
	set TotalNumActions to do shell script "sqlite3 ~/Library/Caches/com.omnigroup.OmniFocus/OmniFocusDatabase2 'select count(*) from Task';"
	set ZipFileCount to do shell script "ls -l ~/Library/Application\\ Support/OmniFocus/OmniFocus.ofocus | grep zip | wc -l | tr -d ' '"
	set output to output & TotalNumActions & " actions in " & ZipFileCount & " zip files"
end if

display dialog output buttons {"Copy", "OK"} default button 2
if button returned of result is "Copy" then
	set the clipboard to output
end if

on RecursiveScan(aFolder)
	with timeout of 300 seconds
		tell application "OmniFocus"
			tell default document
				repeat with subFolder in every folder of aFolder
					my GetStats(subFolder)
					my RecursiveScan(subFolder)
				end repeat
			end tell
		end tell
	end timeout
end RecursiveScan

on GetStats(aContainer)
	tell application "OmniFocus"
		tell default document
			
			set FolderActiveCount to count of (folders whose hidden is false) of aContainer
			set FolderDroppedCount to count of (folders whose hidden is true) of aContainer
			set FolderTotalCount to count of folders of aContainer
			
			set numActive of FolderRec to (numActive of FolderRec) + FolderActiveCount
			set numDropped of FolderRec to (numDropped of FolderRec) + FolderDroppedCount
			set totalNum of FolderRec to (totalNum of FolderRec) + FolderTotalCount
			
			set SALActiveCount to count of (projects whose singleton action holder is true and status is active) of aContainer
			set SALOnHoldCount to count of (projects whose singleton action holder is true and status is on hold) of aContainer
			set SALCompletedCount to count of (projects whose singleton action holder is true and status is done) of aContainer
			set SALDroppedCount to count of (projects whose singleton action holder is true and status is dropped) of aContainer
			set SALTotalCount to count of (projects whose singleton action holder is true) of aContainer
			
			set numActive of SALRec to (numActive of SALRec) + SALActiveCount
			set numOnHold of SALRec to (numOnHold of SALRec) + SALOnHoldCount
			set numCompleted of SALRec to (numCompleted of SALRec) + SALCompletedCount
			set numDropped of SALRec to (numDropped of SALRec) + SALDroppedCount
			set totalNum of SALRec to (totalNum of SALRec) + SALTotalCount
			
			set ProjActiveCount to count of (projects whose singleton action holder is false and status is active) of aContainer
			set ProjOnHoldCount to count of (projects whose singleton action holder is false and status is on hold) of aContainer
			set ProjCompletedCount to count of (projects whose singleton action holder is false and status is done) of aContainer
			set ProjDroppedCount to count of (projects whose singleton action holder is false and status is dropped) of aContainer
			set ProjTotalCount to count of (projects whose singleton action holder is false) of aContainer
			
			set numActive of ProjRec to (numActive of ProjRec) + ProjActiveCount
			set numOnHold of ProjRec to (numOnHold of ProjRec) + ProjOnHoldCount
			set numCompleted of ProjRec to (numCompleted of ProjRec) + ProjCompletedCount
			set numDropped of ProjRec to (numDropped of ProjRec) + ProjDroppedCount
			set totalNum of ProjRec to (totalNum of ProjRec) + ProjTotalCount
			
		end tell
	end tell
end GetStats
 
thanks Bill, tried your script. works great.
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Omnifocus Backup File Format iluvembra OmniFocus 1 for Mac 5 2012-04-19 06:36 PM
iPhone backup to text file? linabella OmniFocus for iPhone 2 2011-09-13 01:41 PM
HELP! Looking for autosave backup location for unsaved file. ravenwing OmniGraffle General 7 2010-12-06 10:36 AM
what's the difference between an OF Archive file and an OF Backup file webalstrom OmniFocus 1 for Mac 1 2010-02-05 06:28 PM
Using a backup as main omnifocus file DataCaliber OmniFocus 1 for Mac 3 2007-12-04 09:50 PM


All times are GMT -8. The time now is 02:19 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.