Pages: [1]   Go Down

Author Topic: Backup Catalog Management  (Read 3786 times)

MBehrens

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 321
Backup Catalog Management
« on: November 26, 2007, 11:08:51 pm »

I was dong some file managemnt and found that all of the backups ever created for each of my LR Catalogs were still hanging around from Beta Testing up tothe most current. Was consuming a couple of GB of space.

Anyone know of a setting/preference to have LR only keep so many of these? 3 or 4 would be plenty depending on how often backups are created.

Thanks,
Morey
Logged

Jeremy Roussak

  • Administrator
  • Sr. Member
  • *****
  • Offline Offline
  • Posts: 8965
    • site
Backup Catalog Management
« Reply #1 on: November 27, 2007, 04:00:41 am »

Quote
I was dong some file managemnt and found that all of the backups ever created for each of my LR Catalogs were still hanging around from Beta Testing up tothe most current. Was consuming a couple of GB of space.

Anyone know of a setting/preference to have LR only keep so many of these? 3 or 4 would be plenty depending on how often backups are created.

Thanks,
Morey
[a href=\"index.php?act=findpost&pid=156304\"][{POST_SNAPBACK}][/a]

If you're using a Mac, an AppleScript attached to the folder which would delete the oldest backup when a new one was created would be pretty trivial to write.

Jeremy
Logged

Jeremy Roussak

  • Administrator
  • Sr. Member
  • *****
  • Offline Offline
  • Posts: 8965
    • site
Backup Catalog Management
« Reply #2 on: November 27, 2007, 03:23:03 pm »

I wrote:
Quote
If you're using a Mac, an AppleScript attached to the folder which would delete the oldest backup when a new one was created would be pretty trivial to write.

Jeremy
[a href=\"index.php?act=findpost&pid=156342\"][{POST_SNAPBACK}][/a]

And here it is. Copy into the Script Editor, save as a compiled script in /Library/Scripts/Folder Action Scripts. Enable folder actions for your LR backup folder and assign this script as an action.

All it does is to check, whenever something is added to the folder, if more than maxFolders exist and, if they do, to delete the oldest of them. It works because LR (1.3, anyway) creates a new folder for each new backup.

You can change maxFolders to any value you like, depending on how many backups you want to keep.

Tested, but not thoroughly. Seems to work. Use at your own risk. No warranties, express or implied. Should you or any of your IM team be captured or killed, I will disavow any knowledge of your actions.

Jeremy

to getOldest(folderList)
   local theFolder, theOldest, oldestDate
   tell application "Finder"
      set theOldest to folderList's first item
      set oldestDate to theOldest's creation date
      repeat with theFolder in folderList
         if theFolder's creation date is less than oldestDate then
            set theOldest to theFolder
            set oldestDate to theOldest's creation date
         end if
      end repeat
   end tell
   return theOldest
end getOldest

on adding folder items to thisFolder after receiving addedItems
   set maxFolders to 5
   tell application "Finder" to set folderList to every folder in thisFolder
   if (count items in folderList) is greater than maxFolders then
      set theFolder to getOldest(folderList)
      tell application "Finder" to delete theFolder
   end if
end adding folder items to
Logged

dedalus

  • Newbie
  • *
  • Offline Offline
  • Posts: 7
Backup Catalog Management
« Reply #3 on: November 27, 2007, 05:03:49 pm »

Quote
I was dong some file managemnt and found that all of the backups ever created for each of my LR Catalogs were still hanging around from Beta Testing up tothe most current. Was consuming a couple of GB of space.

Anyone know of a setting/preference to have LR only keep so many of these? 3 or 4 would be plenty depending on how often backups are created.

Thanks,
Morey
[a href=\"index.php?act=findpost&pid=156304\"][{POST_SNAPBACK}][/a]
If using Windows it´s easy just  manually delete the old backup folders.
Logged

MBehrens

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 321
Backup Catalog Management
« Reply #4 on: November 27, 2007, 06:55:48 pm »

I'm on Windows so the scripting is possible but not worth the effort. Simply purging them out from time to time seems to be the ticket.

Seems like a good feature for LR in the Catalog settings. Set the frequency and the retention count.

Thanks!
Logged

Doug_H

  • Newbie
  • *
  • Offline Offline
  • Posts: 3
Backup Catalog Management
« Reply #5 on: November 28, 2007, 05:26:10 am »

Help! - I decided to follow this and delete the old folders. However in doing so I accidentally doubleclicked on the .lrcat file in one of the old folders and Lightroom no longer starts up - it tries to show the last image I worked on but fails with a 'report this error to Microsoft' box.
Anyone any ideas?
Logged

tomrock

  • Full Member
  • ***
  • Offline Offline
  • Posts: 247
    • http://tomrockwell.com
Backup Catalog Management
« Reply #6 on: November 28, 2007, 07:34:33 am »

Find the .lrcat file in the most recent folder and double-click that.
Logged

Doug_H

  • Newbie
  • *
  • Offline Offline
  • Posts: 3
Backup Catalog Management
« Reply #7 on: November 28, 2007, 03:36:26 pm »

Thanks - it needed to be the main catalogue file (not the most recent backup which is what I tried first) - am now breathing normally again: memo to self - TRY not to do stupid things in the midst of processing a wedding!
Logged
Pages: [1]   Go Up