Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Auto-generate an application list for backup purposes System
I, like many others, have lost data due to insufficient (read: none) backups. I am now religious about backups, and have been using LaCie's Silverkeeper to back up my files nightly. All seemed well until recently I had another hard drive failure. I wasn't worried about my home folder, since the whole thing gets backed up, but I did lose all my applications. For the larger ones, you have a box or physical CD, so this isn't a big deal. However, all the neat share - free - donationware I get from various places was gone! I could trace back through preference files, application support folders, or try to remember. This was not ideal.

So I patched together the following simple AppleScript, which I run at startup. It outputs the ls command to a text file in my Documents folder, which is backed up nightly. I can then use this to recount all the applications I may have forgotten about. Paste this code into Applescript:
do shell script "ls /Applications >~/Documents/apps.txt"
I saved mine as an application, and then added it to my login items in the Accounts System Preferences panel.

As many have said before, I am not a scripter and have no real idea what I'm doing. I would have loved to make this a bash script that ran in the cron jobs, but I'm not that smart to figure it out. Also the list isn't formatted very well, and it leaves the .app extension intact. Nonetheless, this will help me remember those obscure applications I use in the event I have (eek!) another hard drive failure.

[robg adds: Converting this to a cron task that runs every hour or twice a day wouldn't be hard at all -- however, in the interest of accuracy, I'll let a commenter with more Unix skills than I take on that task! If you have applications you store in more than one location, you could add additional lines to the AppleScript, but use two greater-than signs to append the data to the existing file: do shell scdript "ls /Volumes/myapps >>~/Documents/apps.txt"]
    •    
  • Currently 3.00 / 5
  You rated: 5 / 5 (3 votes cast)
 
[7,770 views]  

Auto-generate an application list for backup purposes | 13 comments | Create New Account
Click here to return to the 'Auto-generate an application list for backup purposes' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Suggestion for apps in multiple locations
Authored by: stevebr on Nov 30, '06 08:47:14AM

Instead of ls, this seems like a perfect use for Mithras' cache_saved_searches, posted here last lear. To refresh people's memory, it creates Folders of symlinks matching the results of Spotlight saved searches. There's a modification in the comments of that hint

So, you would create a Spotlight search for applications and save it and run the script according to your schedule.

In a restore-from-backup situation the links are only useful for the names, but having the names on hand appears to be the goal of the hint.



[ Reply to This | # ]
Suggestion for apps in multiple locations
Authored by: stevebr on Nov 30, '06 08:52:09AM

Sorry for replying to myself but I left my post with an incomplete sentence, thus proving that "preview post" only helps if you read it ;)

"There's a modification in the comments of that hint" should read "There's a modification in the comments of that hint that adds flexibility by working with the current directory, in case you don't want to keep the saved search in the standard place."



[ Reply to This | # ]
Auto-generate an application list for backup purposes
Authored by: MtnBiker on Nov 30, '06 08:48:56AM

I have a related problem. I back-up my entire drive, but today (and it will take the better part of the day), I'm going to have to do a fresh install.

My question is: is there a way to tell if an application can be installed by just dragging the application to the Applications folder?

Many applications work this way and on first launch they automatically install whatever is needed in Application Support and elsewhere. Other programs require running an installer to put things in the right places.

FYI the reason for my need for a fresh install is that the December Security Update raised havoc with my first generation Intel iMac. It may not have been the update alone, but some crash or another that occurred right before the update. Disk repairs were needed after the attempted install. Long story and this is an incomplete description,

Thanks for the hint.

---
Hermosa Beach, CA USA



[ Reply to This | # ]
Auto-generate an application list for backup purposes
Authored by: fahirsch on Nov 30, '06 08:57:02AM

What I do is to have a folder, which periodically I burn to a CD, with the install programs and the emails with the receipts and passwords



[ Reply to This | # ]
Auto-generate an application list for backup purposes
Authored by: inspired_tmu on Nov 30, '06 09:15:51AM

In the terminal:

crontab -e

Then add the following line to execute once a day at midnight:

@daily	/Volumes/myapps >>~/Documents/apps.txt

Or for hourly execution at the top of each hour:

@hourly	/Volumes/myapps >>~/Documents/apps.txt

Alternatively, if you want this script executed, say, once every 3 hours:

0	*/3	*	*	*	/Volumes/myapps >>~/Documents/apps.txt

Etc. For more information, go to your Terminal and type:

man 5 crontab


[ Reply to This | # ]
Auto-generate an application list for backup purposes
Authored by: capitalj on Nov 30, '06 10:02:40AM
The last time I did an archive and install i didn't have to re-register anything. I don't remember where I saw this suggested, but I created an application folder for my third party applications inside my home folder -make a folder, name it "Applications" and the application icon automatically appears. I also have redundant backups of various kinds and I'll make use of this hint, too. I lost a lot of data once.

[ Reply to This | # ]
listing all apps on the machine
Authored by: hayne on Nov 30, '06 10:26:05AM
Note that on Tiger you can use the Spotlight-generated database to get a complete list of all apps that are on the machine - no matter where they are (in /Applications or elsewhere). You would do this via the following command (in a Terminal window):

mdfind 'kMDItemContentTypeTree == "com.apple.application"c'


[ Reply to This | # ]
Auto-generate an application list for backup purposes
Authored by: TvE on Nov 30, '06 11:56:09AM

My system is plain and simple - but rock solid:

I (manually - WOOOW!) write a logfile on all my computers and note (name+time+sn) everytime I install/update/remove any application large as small, free as expensive.

This has the added side-effect that I can always track what application/extension etc. might be causing what ever problem just arose.

If I frequent observe <problem X> (EG by looking in the system.log) I can easaly match the dates with my installations and possibly undo the installation ;-)



[ Reply to This | # ]
Auto-generate an application list for backup purposes
Authored by: tyip on Nov 30, '06 03:37:05PM

Wow, in your case, I'm sure you back up regularly and have never lost/will never lose any data. Hats off to you. :-)



[ Reply to This | # ]
Auto-generate an application list for backup purposes
Authored by: macintron on Nov 30, '06 01:35:20PM
or use

system_profiler -xml SPApplicationsDataType >~/Documents/apps.spx

This will generate a SystemProfiler file. It includes informations like version, architecture,...

[ Reply to This | # ]

Auto-generate an application list for backup purposes
Authored by: ocdinsomniac on Nov 30, '06 03:13:58PM

Of course, this begs the question: If you can't remember that you had an application, how badly did you really need it?

Sorry. Just being cheeky.

-systemsboy



[ Reply to This | # ]
Auto-generate an application list for backup purposes
Authored by: tyip on Nov 30, '06 03:40:51PM

It's a valid observation. Whenever I get a new computer, I always wonder if I should move every last app. and utility over. I usually only move the main ones. I may end up moving a few more but things I haven't used in a year, I doubt I'll ever use them again, no matter how useful they may look.



[ Reply to This | # ]
Auto-generate an application list for backup purposes
Authored by: dandj on Dec 01, '06 05:43:41AM

I use iMsafe as a backup tool and set Applications and Utilities folders to be backed up occasionally (ie weekly), and my Home folder daily.



[ Reply to This | # ]