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 > OmniWeb > OmniWeb General
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Auto-backup workspace(s) Thread Tools Search this Thread Display Modes
Realizing that I should have done this long ago, I went ahead and made a launchd job to backup my main OW workspace daily. It seems particularly a good idea when running the sneaky peeks.

First make a folder called "Backups" in ~/Library/Application Support/OmniWeb 5/Workspaces.

Make a script in that folder; I called it Just paste this into your favorite text editor. After saving the text file, do chmod +x to it in the terminal to make it executable.

"Reading.owworkspace" is the name of the workspace that I'm backing up; more can be added.
The script will produce backups dated like this: Reading-2006.05.02.owworkspace


cd ~/Library/Application\ Support/OmniWeb\ 5/Workspaces

cp Reading.owworkspace Backups/Reading-`date "+%Y.%m.%d"`.owworkspace
(Incidentally, one could also automate the backing up of URLs into a database by gunzipping the workspaces and extracting the URLs from the xml.)

Then make a new launchd entry, and put it in ~/Library/LaunchAgents. (Make the folder if it's not already.) Again, just another text file. Replace "USER" with your username. The backup time here is set to 5:55 am.

In order to make it backup more than once a day, you need to make a new launchd entry; that is, a new file and a new label (instead of USER.OWworkspacebackup, say, USER.OWworkspacebackup.1 and USER.OWworkspacebackup.2). If you do this, you need to change the above script to add the time to the backups' filenames (`date "+%Y.%m.%d.%H.%m"; see man strftime for other date-time options).

(The path to the script here has to be the full path, so no ~/Library/...; note that spaces and other normally escaped characters do not need to be escaped here.)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "">
<plist version="1.0">
		<string>/Users/USER/Library/Application Support/OmniWeb 5/Workspaces/Backups/</string>
(Why is it that the [code] tag leaves so much space after the text?)

Lastly, to activate it, do launchctl load on the launchd file in the terminal.

I hope somebody finds this useful; if you have any questions, let me know.
Originally Posted by afb
[post=1521](Why is it that the [code] tag leaves so much space after the text?)
It preserves formatting. It also uses a fixed-width font.
I meant, why does it have to leave five or six lines after the code? I didn't leave any space after.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Feature Request: Disable auto-dim/auto-lock while plugged in awolfe_ii OmniFocus for iPhone 1 2014-01-13 08:55 AM
Workspace Auto-save feature not turning off? Andymax OmniWeb General 1 2008-07-09 12:16 PM
Auto-complete & Auto-fill Finlay Boo OmniWeb General 1 2007-09-11 12:26 PM
Workspace question Handycam OmniWeb General 4 2007-07-03 09:09 PM
Auto layout is an auto outline disaster bross OmniGraffle General 0 2007-04-16 09:59 AM

All times are GMT -8. The time now is 12:16 AM.

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