# Powercut! lightroom has lost a year's worth of work



## lyndseyg (Feb 22, 2011)

Can anybody help? I was editing pictures in lightroom when there was a powercut. on restarting the computer and relaunching lightroom a little error message came up, I can't remember what it said but it related to a problem with the back up catalogue. I haven't backed up for a couple of weeks, admittedly, but the only work showing is from over a year ago. Thousands of photos have gone. Oddly, my old watermark is showing at the top, as if my system has gone back in time. All my recently imported user presets are still there. Can anybody help? I'm really panicking.


----------



## Jim Wilde (Feb 22, 2011)

Hi Lyndsey, welcome to the forum!

It's quite possible that because of the power cut the 'lock' file (a temporary file which Lightroom creates at the start of each session and then deletes at the end of the session) is still on the hard drive, and so Lightroom can't open the proper catalog (which I guess is what the error message may have related to). Can I suggest that you close down Lightroom, then in Finder go and examine the files in the folder where your catalog resides....we are looking to see if there is a file with the name "*yourcatalogname.lrcat.lock" *(where 'yourcatalogname' is the proper name of your catalog - probably Lightroom 2 Catalog).

If there IS such a file, AND Lightroom is definitely NOT running, then delete the file (taking care to delete the 'lock' file and nothing else), then try to restart Lightroom. Depending on your startup preferences there still may be some work to do, but first of all go looking for that lock file. If you are uncertain about deleting it, just report back on your search and we'll talk you through the rest.


----------



## lyndseyg (Feb 22, 2011)

Hi Jim

What a relief that somebody has read my message and replied! I'm a bit worried about doing this incase I damage it more than I have, but if you think this will work I will give it a go. I have all my RAW files backed up to an external hard drive, so very worst case scenario, I can re-import, but i have spent a week working on this wedding and was meant to be burning it to DVD just as this power cut struck


----------



## lyndseyg (Feb 22, 2011)

Hi Jim

I have done this but to no avail; I dropped the lock file into the trash and then re-opened lightroom, but it took me back to the old one. It appaers all my old backups are still on my hard drive, just not in lightroom. Any other advice? Do I need to empty the trash with the lock file in it to make it work?


----------



## Jim Wilde (Feb 22, 2011)

No, shouldn't need to do that. It is possible that your Lightroom startup preferences are set to 'Load Most Recent Catalog', so of course it will open the one you were last using, i.e. the old backup one. In the folder where you just found the "*yourcatalogname.lrcat.lock*" file, you should also see the companion file "*yourcatalogname.lrcat".* Check that it is there, and if so with Lightroom open, select File>Open then point to that catalog file. Click OK and LR will ask you to confirm relaunch with the new catalog. Confirm, and if that works OK, let us know because hopefully you should be good to go.


----------



## lyndseyg (Feb 22, 2011)

Hi Jim

Thanks for all your help; With your advice, and a tech friend who logged in and operated remotely, we sorted it. It was exactly as you said, only probably is my entire back catalogue was in a folder marked 27-04-2009 which lead to a bit of head scratching!

Thanks again, you really helped me out


----------



## Jim Wilde (Feb 22, 2011)

OK, thanks for letting me know. Glad you got it sorted.

Word of advice.....backup your catalog! Often and regularly!


----------



## lyndseyg (Feb 22, 2011)

I don't back up as often as I should, maybe once every 3 weeks. Will be daily from now on! thanks again Jim.


----------



## b_gossweiler (Feb 22, 2011)

I recommend setting the backup routine to "Every Time when LR exits". You still can skip it whenever you don't really want to do it. But at least you're reminded.

Beat


----------



## lyndseyg (Feb 22, 2011)

I will do that. At the moment it reminds me when I launch and most of the time i am too impatient to do it... That will teach me. Backing up on exit is a much better way to do it.


----------



## b_gossweiler (Feb 22, 2011)

lyndseyg said:


> ... At the moment it reminds me when I launch and most of the time i am too impatient to do it...



Sorry, I didn't notice you're working with LR2. LR2 will not allow you to perform the backups during exit, but will insist on doing it during startup of LR. LR3 backs up during exit.

Beat


----------



## lyndseyg (Feb 22, 2011)

Oh no! I well, post it note on the desk then. Repeat to self, ''back up back up''' ....


----------



## lyndseyg (Feb 23, 2011)

Hi jim

I opened lightroom this morning, but when I clicked on the last image i was working on yesterday before the power cut, the dialogue box saying there was a corrupt catalog appeared again. I have deleted the photos which I was working on when the power cut in the hope that they are the corrupt files. Is there a way of finding out which files are corrupt? Also if I create a new catalog, is that essentially a new empty catalog and will I lose all the other work?  Hope you can help


----------



## Jim Wilde (Feb 23, 2011)

Lynsdey, when you take a catalog backup there is an option to "Test the integrity of the Catalog". It's a check box on the backup screen, is it checked? If not, try running a backup and check that option and let us know the results.

Another question....do you get the same error message when you click on earlier photos in the catalog?


----------



## lyndseyg (Feb 23, 2011)

i am not sure, I will check that and get back to you. At the moment I am exporting the last collection of photos so at least i can send the wedding to the couple, then maybe I can find out if it is a file in this collection and the whole collection be deleted?


----------



## Jim Wilde (Feb 23, 2011)

OK, if you are exporting it sounds as if the corruption is localised and not widespread. Let us know what happens when you've run that integrity test.


----------



## lyndseyg (Feb 23, 2011)

The export worked, I shut down lightroom and opened it again to see if it was working as normal. The box appeared saying there was a problem last time lighroom closed and it would check the files, it ran an integrity test on the catalog and the thumbnails cache. It has now brought up a box saying corrupt catalog detected. The options are 'show in finder' 'quit' and 'repair catalog'. If I click on repair catalog, it says updating catalog file format. It runs. It then says 'cannot repair corrupt file catalog the catalog "lightroom 2 catalog is corrupt and cannot be repaired at this time'. It gives me an option to choose a different catalog, there are 3 to choose from (one which is users/lyndseygoddard/pictures/lightroom/lightroom2 catalog.ircat (default) and then 2 which are users/lyndseygoddard/pictures/lightroom/backups) there is the box to tick to test integrity of the catalog.

Do you suggest I try all 3 with the box ticked? I have tried the first one (listed as default) and it hasn't worked


----------



## Jim Wilde (Feb 23, 2011)

No, don't try to open different catalogs at this time....it really sounds as if your power cut has corrupted the catalog, and Lightroom cannot repair it. There are probably only two options left.....go back to the last backup taken before the power cut (which means you would lose all the work you have done between then and now), or we try to salvage what we can from the current corrupt catalog by trying a catalog export.

To try the catalog export, you need to cancel out of whatever state Lightroom is currently in, then start it up as normal like you did this morning. Don't try to take a backup or do an integrity test.

If Lightroom starts OK, get back to me and we'll try the export....


----------



## lyndseyg (Feb 24, 2011)

Hi Jim

I just left it yesterday; we are moving house and it had got me so behind with my packing! my tech friend is going to help me this morning; can you run me through what needs to be done to do a catalog export and give me a little info on what this actual involves and what it will leave me with work-wise. I don't know if the going back to the last back up option is possible; when we were looking at the back ups the dates didn't tally, they were a little haywire. Hopefully you can advise.

Thanks Jim, appreciate your help with this


----------



## Jim Wilde (Feb 24, 2011)

Lyndsey, before we get into trying to export from the catalog, I'd really like to get clear in my mind which catalog you are using/have used since the power cut. Could I ask that you hold down the Cmd key when you start Lightroom and the "Select Catalog" dialog box should appear as per this screenshot:




When that box appears could you take a screenshot and post it here so that I can see what catalogs we are dealing with.

Could you also, using Finder, open the folder *users/lyndseygoddard/pictures/lightroom/backups* and give me a screenshot of the contents (I'm just trying to establish what catalog backups exist that we can revert to if we can't fix your proper catalog). Thanks.


----------



## lyndseyg (Feb 24, 2011)

Jim, i am going to wait until my tech friend is around if that's OK. He is not familiar with lightroom per se but works with computers mostly MACs for a living so knows his way around a lot better than me. Should be sometime very soon


----------



## lyndseyg (Feb 24, 2011)

Jim apologies for the delay, has taken some time to get back to a firm footing.

see active Catalog screen shot.  unfortunately holding down CMD on startup didn't not do anything but I think this is the screen in LR2 that you needed to see:



Below is the backup directory. As you will see there doesn't appear to be regular backups in there. Yes I hold my hand up to saying no to the odd Skip Backup, but I def didnt go 6months at times without it creating one (as shown)

You are prob wondering what the POST Power folder is. This is the firm footing, as recovered from somewhere within backups, after the power cut, after my technical friend had found a working up to date catalog and after I had deleted 2 suspected faulty photos in a vain hope of making it work. 



the current active catalog is a copy of the POST POWER files, so they are not altered while we try your suggestions



many thanks, look forward to your next suggestion

Lyndsey/Heath


----------



## Jim Wilde (Feb 24, 2011)

Lyndsey/Heath...thanks for the screenshots, and it's good to see that you have a copy of the 'current' catalog that we can go back to if needed.

Also, it seems to me that in the worst case scenario we could always go back to the December 15th catalog, yes? Would be a pain, but not an unmitigated disaster.

So, recapping, you are getting occasional problems with the current catalog and whenever you try to test the integrity LR tells you there is a corruption that you cannot fix, is that right?

Sorry for the questions, I just want to make sure I fully understand before we move on.


----------



## lyndseyg (Feb 24, 2011)

please, dont be sorry you are being a huge help

yes we could go back to December 15th but I would lose so much work I dont even want to think about it.

I have had no problem up until the power cut, 
and since then Catalog is Corrupt or Test fail is common.  Selecting alternate catalogs results in extremely dated catalogs with thousands  of missing photos/edits.

Ideally I want to export/save as much of the contents of this catalog as possible, and I presume reimport that into a NEW catalog to start afresh and hopefully weed out the corrupt files (if they still exist)

does that makes sense?


----------



## Jim Wilde (Feb 24, 2011)

OK, best thing to do first is try to export the current catalog in its entirety to see what we get. 

Open Lightroom using the 'current' catalog, then do File>Export as Catalog and you should see a dialog similar to this:



Make sure that you browse to your Lightroom folder in Pictures, then enter a unique file-name (e.g. Exported Catalog), then make sure the bottom 3 boxes are *unchecked *(so we select all images, we don't move your original picture files, and at this stage we don't copy all your preview data - if this works you can rebuild previews later).

Click on save and let me know what happens.


----------



## lyndseyg (Feb 22, 2011)

Can anybody help? I was editing pictures in lightroom when there was a powercut. on restarting the computer and relaunching lightroom a little error message came up, I can't remember what it said but it related to a problem with the back up catalogue. I haven't backed up for a couple of weeks, admittedly, but the only work showing is from over a year ago. Thousands of photos have gone. Oddly, my old watermark is showing at the top, as if my system has gone back in time. All my recently imported user presets are still there. Can anybody help? I'm really panicking.


----------



## lyndseyg (Feb 24, 2011)

ok done, its created an Exported Catalog of only 72MB?

another thing I noted, it said Exporting a Catalog of 1970 photos....yet ALL PHOTOGRAPHS in LR2 says 25069

what shall I do with the exported catalog?

TIA


----------



## Jim Wilde (Feb 24, 2011)

Ah, maybe a good idea to do that again. Make sure before you start to click on All Photographs (it's possible you had a folder or collection selected), then try again. Either overwrite the previous exported catalog or create version2. Just keep track of what you call them and where you are putting them so we can find them again.


----------



## lyndseyg (Feb 24, 2011)

Heath has had to go into a meeting so i am going to wait until he is available again before trying what you said.

I'm very grateful for the help and guidance you have provided Jim, it really is invaluable. Thanks


----------



## Jim Wilde (Feb 24, 2011)

No worries...let me know when you've redone the export and we'll take it from there. In an ideal world it'll work, but I suspect we might not be that lucky....in which case we'll have to take a 'bit by bit' approach....


----------



## lyndseyg (Feb 24, 2011)

These things are sent to test us! 

Thanks will be in touch once we have redone the export


----------



## LightCode (Feb 24, 2011)

TNG said:


> Word of advice.....backup your catalog! Often and regularly!


 I would add: save your catalog backups to an external HD, too

in case your computer crashes, you have both the original RAWs and the LR catalog backups!

:nod:


----------



## lyndseyg (Feb 25, 2011)

Hi Jim

The export of the entire catalog seems to have worked. Can you advise us as to what we should do next?

Thanks


----------



## Jim Wilde (Feb 25, 2011)

Hi Lyndsey, that sounds promising!

First thing to do is check the contents of the exported catalog....make a note of the number of pictures in your catalog then close Lightroom, browse to the new exported catalog file, double-click to launch Lightroom and compare the number of pictures. Initially you will see that the thumbnails in the exported catalog will be grey squares, these will start to render as you view the images into the Grid or Filmstrip, and if this works out you can start a full render of the previews at your leisure (more about that later).

So, assuming the exported catalog opens OK, and has the right number of pictures, you need to run the integrity test on the exported catalog. Do that and let me know what happens....


----------



## lyndseyg (Mar 3, 2011)

Hi Jim

Sorry to have gone all quiet on you1 i moved house this week so things have been a bit hectic, plus my computer has been in a box for the past 4 days. I have it set up now but i don't have the external hard drive so I will be doing as you suggested above tomorrow when everything is set up as before. Thanks for you on going support with this.

Lyndsey


----------



## lyndseyg (Mar 3, 2011)

Hi Jim

Sorry to have gone all quiet on you1 i moved house this week so things have been a bit hectic, plus my computer has been in a box for the past 4 days. I have it set up now but i don't have the external hard drive so I will be doing as you suggested above tomorrow when everything is set up as before. Thanks for you on going support with this.

Lyndsey


----------



## lyndseyg (Mar 28, 2011)

Hi Jim

Sorry to have gone all quiet on you. We exported the catalog as you suggested, and Lightroom seemed to be working as normal, so (foolishly?!) I continued to work in Lightoom, with the exported duplicate sitting on my desk top. We had turned off the 'back up each time Lightroom starts' button, and in that time i imported approximately 800 images. Lightroom allowed me to work on them as normal until a couple of days ago when the 'catalog corruption' box showed again. We have imported the exported catalog which contains all the images,(post power cut) bar the 800 new ones, and run and integrity check. We have also ticked the back up each time Lightroom starts' button again.

So the questions i have are: is there anyway to get back the 800 images as they hadn't been backed up? (i assume the answer will be no)
Will this corruption message show up again, and is it to do with the fact that all my images are in one catalog (25000+ RAW CR2)?
Will buying and installing Lightroom 3 eradicate the problem?

Look forward to your reply

Lyndsey


----------



## Jim Wilde (Mar 28, 2011)

Hi Lyndsey, welcome back!

Not sure I fully understood all that, so let me articulate what I *think* you are telling me:

1. After exporting the catalog, you in fact did not switch to using that as per my suggestion, but instead carried on using the 'original' catalog. Is that correct?
2. You stopped backing up the 'original' catalog, correct?
3. And you have imported circa 800 new images onto the original catalog?
4. And you've just hit the 'catalog corruption' error again?
5. So you've now imported the exported catalog....but into what? A new catalog or the 'original'? If you've simply imported into the current original then nothing should have changed and your 800 new images should still be there. If you have imported into a new empty catalog (why?) then the 800 new images will not be there.

So to start, can you firstly confirm points 1-4 for me, and then can you clarify exactly what you did in point 5?

Thanks.


----------



## Jim Wilde (Mar 28, 2011)

Lynsdey, just realised I didn't answer your last two questions:

1. I don't think the size of the catalog is related to the problem....there are many users here with catalogs exceeding 100,000 images.
2. Upgrading to Lightroom 3 *may *help (as it writes out a new catalog when it upgrades a Lightroom 2 catalog)....that may (but also may not) get rid of the corruption. I know, not very helpful, sorry!

For now though, get back to me on the other questions and we'll take it from there.


----------



## lyndseyg (Mar 29, 2011)

hi Jim, thanks for your reply

1. yes
2. yes
3. yes
4. yes
5. a new catalog: imported the export that you had us make originally. The 800 are lost/trapped in the original catalog, not this new catalog that I have since created.

Does this make sense?

Lyndsey


----------



## Jim Wilde (Mar 29, 2011)

Thanks, yes it makes sense, although step 5 could more easily have been accomplished by simply opening the exported catalog (an exported catalog is still a viable catalog, and doesn't need to be 'imported' to enable it to be used)....which explains my question "Why?" in my post.

So effectively you are using the exported catalog as your new 'master' catalog, yes? In order to try to get back the 800 images which are sitting in the corrupted catalog you need to proceed as follows:

1. Open the corrupted catalog and select the 800 images (should be able to to that by filtering by date).
2. Ctrl+A to select them all, then File>Export as Catalog.
3. In the dialog box that ensues, give the exported catalog a name/location, then *uncheck* "Include Negatives" and optionally "Include Available Previews" (if you uncheck the latter you will need to rebuild them after importing them into the current catalog).
4. Once the export is finished, switch back to your current catalog and *take a backup and note the timestamp.....that's the fallback should anything go wrong!
*5. Start Lightroom again using the new current catalog and do File>Import from Catalog.....choose the catalog you created in step 3 and the import should proceed to bring in the 800 images.
6. Keep your fingers crossed that the corruption doesn't recur!

Let me know if any of that is unclear. Of course if you can't open the corrupted catalog because of the, well, corruption then I think you may be out options in terms of recovering any development work you've done on the 800, and all that may be left is to import them in to your new catalog and start working them again.


----------



## lyndseyg (Mar 30, 2011)

Hi Jim

The problem with the 800 images is, when we exported the catalog before, we had turned off the 'back up' box as this was creating problems. We hadn't turned it back on so the 800 images which had been imported weren't being saved. We have taken the catalog we had exported back into lightroom which has effectively created a new catalog (?). I have  imported the 800 RAW images that were lost and just started again, it seemed like a better option than trying to open the corrupted catalog.

Am I correct in assuming that when we imported the entire catalog back in to a new catalog that Lightroom would have 'weeded out' any corrupt files? if yes, can I assume that I have a firm footing on which to work now?


----------



## Jim Wilde (Mar 30, 2011)

lyndseyg said:


> Hi Jim
> 
> We hadn't turned it back on so the 800 images which had been imported weren't being saved.



Hi Lyndsey,
That sort of implies a slight misunderstanding about the way the catalog works. It's a database which is updated in real-time, so any imports are immediately 'saved' (i.e. written) into the catalog. So even though you weren't backing up the catalog the 800 images would still have been in there.

However as you have now imported them back into your 'new' catalog, I assume you don't want to take any further action about trying to recover any 'lost' edits from the corrupt catalog? There are ways we could try, but this would involve opening the corrupt catalog which I sense you are not keen to do?



> Am I correct in assuming that when we imported the entire catalog back in to a new catalog that Lightroom would have 'weeded out' any corrupt files? if yes, can I assume that I have a firm footing on which to work now?


All I can say is that I *hope* that the export/import actions will have weeded out any corruption, but I can't guarantee this. All I can suggest is that you run the integrity check during your next catalog backup and keep your fingers crossed. If there is still a corruption in there somewhere you're probably faced with having to start exporting in smaller chunks into a new fresh catalog, running integrity checks as we go, and hopefully finding the culprit that way. But hopefully it won't come to that.


----------



## lyndseyg (Mar 30, 2011)

not keen to open the corrupt catalog!

i'm not sure I do understand exactly how the catalog works and i'm not exactly sure what i wrote earlier. i know that the catalog we imported back into lightroom was the one we had exported prior to the 800 new ones, so they weren't in that cataolg, and i am happy to leave them where they are and work on the new ones.

The back ups is set to each time I open lightroom now, and if i'm not mistaken that runs an integrity test at that time. I intend to buy lightroom 3 now and hopefully won't have any issues with this pesky problem.

Thanks for your help Jim, a true forum knight in shining armour!


----------



## Jason (Apr 1, 2011)

One more thing to consider now:  How about a UPS to avoid this issue in the future? :}   They don't cost that much anymore, and are well worth their weight in time saved!

Cheers!


----------



## lyndseyg (Apr 5, 2011)

a UPS? can you elaborate?


----------



## schlotz (Apr 5, 2011)

lyndseyg said:


> a UPS? can you elaborate?


 
Uninterruptable Power Supply


----------



## Victoria Bampton (Apr 5, 2011)

A UPS is a large battery which kicks in if the power goes off, enabling you to close down the computer cleanly if the power doesn't come back on.  Some even do it automatically for you.  If you'd had a UPS attached, then you'd have been able to close down LR and the computer without this kind of damage.  It's not the first thing most home users think of doing, but prices have come down so it's well worth considering.


----------



## lyndseyg (Apr 12, 2011)

Thanks for this advice, I am now looking into it


----------

