XMP files and Lightroom questions

nickt

Senior Member
Xmp files??? How are they used? I just want to make sure I am understanding xmp files in Lightroom. I can safely delete the xmp files, right? And then have Lightroom make new ones? Here's the longer story if you are wondering why I ask...

My computer died the other day. I have a simple backup program that runs every night. This program copies changed files to an attached usb drive. It does not overwrite files that have changed, it adds a number to the file name. So after copying my pictures and LR catalog back, I see that I have a BUNCH of extra xmp files. About 700 images are affected, some having up to 6 renamed xmp files. The reason being I edited or tagged some images repeatedly over the course of days and each change got numbered and added to the daily backup. At first I panicked that I had made a big mess, then I reasoned that Lightroom doesn't actually use these files since they are optional and for use with other software. Have I got this right?? If not a problem, my plan is to do a *.xmp search and delete all of the xmp files. Then I would tell Lightroom to generate new ones. I have the box checked to automatically make these files, but I would be selecting my whole catalog and telling it to save metadata to file. Probably a long process. Or since I don't know how to use these xmp files anyway, maybe I should I wait until I actually need them before I make new ones? If that is the case, should I turn off the option to automatically create them?

Thanks for any guidance before I hit the delete button.
 

RocketCowboy

Senior Member
Those XMP files contain all the edits you've made to your raw files. If you delete the XMPs, they will be recreated, but LR might not know what edits you previously made to your images.


Sent from my iPhone using Tapatalk
 

WayneF

Senior Member
Right, you surely want to keep your xmp files (which is the the saved list of all edits made), unless you want to start all over from scratch. Deleting the xmp file loses all your previous edits (but you never lose the original raw unless you delete it). Another way to start over is to select Camera Raw Defaults (it clears the list of edit instructions).

Raw files are never modified. What is saved is the list of your edits that you selected (which are saved in that xmp file). When you make more changes, you are simply changing the list of the edits (you are not shifting tones around, you are not changing pixels at al, you are simply modifying the list of edit commands). The results of those saved edits are shown to you when you open the raw editor again, you are still where you were. The edits are finally actually implemented only in the JPG or TIF copy that you output from raw, for the ultimate uses of the image.

It is called lossless editing. You can even uncrop by simply clearing any crop you made previously.
 

nickt

Senior Member
Thanks Rocketcowboy and Wayne. This was my understanding of xmp files as well, but I am now wondering if the Lightroom catalog is the active keeper of it's edits. I did include the catalog in my backups.
I am starting to believe yes, the LR catalog does completely store all LR edits and key words. In the LR catalog settings, we have the option to create side car files or not create them. Deselecting the option gives a warning that other applications will not see LR edits. LR continues to function normally without generating any xmp with the option turned off.
So I am cautiously hopeful I can delete these files and recreate fresh versions rather than renaming hundreds of files spanning many folders. I am also hopeful because as I look through my images today with clear head, I am seeing my latest edits and keywords even though there may be 6 versions of the same xmp in the folder. If Lightroom is using these files it would be likely looking at the xmp with the matching file name which would be the wrong one in my case. The matching xmp would be the oldest xmp as the more recent versions were renamed by my backup software. I think an outside application would definitely grab the wrong xmp due to the renaming of newer versions so this is why I am thinking I must get rid of them.
 

WayneF

Senior Member
It is a selectable option. have Photoshop instead of Lightroom. They both use the same Adobe Camera Raw module. And there is an option to keep the edits in the xmp, or in the database.

Don't delete at first. You can always test by moving the xmp to another folder, so they are not found, and the seeing if your method still retains the edits. If not, you can move them back. My own notion is the xmp don't hurt anything, and is a very small file to update when changes are made.
 

BackdoorArts

Senior Member
After first making sure that the Metadata tab in your catalog settings has the XMP sidecar box unchecked, I would find a photo that has an associated XMP file that you're planning on deleting, rename the .XMP file to .XYZ or something, then try and access the image in LR and see if the edits are intact. If they are then the XMP metadata was transferred into the LR catalog and you're OK. If not, then you first need to get that metadata into the catalog.

If you have the right file utility you could rename all .XMP files to .XYZ first and then check your images. Otherwise just make sure you check your images before emptying the trash on your computer.
 

Fred Kingston

Senior Member
According to Adobe's help files... LR writes changes to the catalogue whether you specify XMP files or not. The thing to remember is, if you do all processing in LR...then you don't need XMP files. If you do any processing in programs OTHER than LR... AND you want to open an image with the changes you made in LR, then you'll need the XMP files.

If you infrequently do editing in other programs, and don't want to create all the external XMP files, remember, you can selectively create XMP files for a single file or a group of files from the menu...
 

nickt

Senior Member
Thanks guys. I did some tests...

test 1: On a not-so-important picture folder containing some of the excess xmp files... opening a nef with PS Elements did in fact apply old unwanted edits as I feared. My backup xmp files were numbered like abc.xmp, abc.1.xmp, abc.2.xmp with the higher numbered file being the correct one. PSE of course chose the oldest one with the unaltered file name.

test 2: I deleted all xmp in that folder... LR had no problem, all edits with history and tags retained, business as usual. Opened the same nefs with PSE, NO edits were applied. I saw original unprocessed image.

test 3: Went back to LR, selected all files in folder and told LR to write metadata to files. New and properly named xmp's were produced. Opened nefs again in PSE and now the correct edits were applied. happy-happy.

So I will go for the mass xmp delete and have LR re-write the metadata to get the xmp back in sync. Nothing to lose but time as I will keep my last backup for awhile.

Overall, I am happy I had a backup from 12 hours earlier for this sudden computer death. Going forward, I think I will not use the backup option of renaming duplicates. Too many *.1.*, *.2.* files to sort through to find the latest version.

Thanks everyone for the replies.
 

nickt

Senior Member
According to Adobe's help files... LR writes changes to the catalogue whether you specify XMP files or not. The thing to remember is, if you do all processing in LR...then you don't need XMP files. If you do any processing in programs OTHER than LR... AND you want to open an image with the changes you made in LR, then you'll need the XMP files.

If you infrequently do editing in other programs, and don't want to create all the external XMP files, remember, you can selectively create XMP files for a single file or a group of files from the menu...
Thanks! I didn't see this as I was typing my reply above, but that is what I learned today by doing a few tests.
 

BackdoorArts

Senior Member
Thanks guys. I did some tests...

test 1: On a not-so-important picture folder containing some of the excess xmp files... opening a nef with PS Elements did in fact apply old unwanted edits as I feared. My backup xmp files were numbered like abc.xmp, abc.1.xmp, abc.2.xmp with the higher numbered file being the correct one. PSE of course chose the oldest one with the unaltered file name.

test 2: I deleted all xmp in that folder... LR had no problem, all edits with history and tags retained, business as usual. Opened the same nefs with PSE, NO edits were applied. I saw original unprocessed image.

test 3: Went back to LR, selected all files in folder and told LR to write metadata to files. New and properly named xmp's were produced. Opened nefs again in PSE and now the correct edits were applied. happy-happy.

So I will go for the mass xmp delete and have LR re-write the metadata to get the xmp back in sync. Nothing to lose but time as I will keep my last backup for awhile.

Overall, I am happy I had a backup from 12 hours earlier for this sudden computer death. Going forward, I think I will not use the backup option of renaming duplicates. Too many *.1.*, *.2.* files to sort through to find the latest version.

Thanks everyone for the replies.

Just curious, but is there a reason you don't just open them in PSE directly from LR and avoid writing the XMP files at all?
 

nickt

Senior Member
Just curious, but is there a reason you don't just open them in PSE directly from LR and avoid writing the XMP files at all?
I normally do just open pse directly from LR. To be honest, I had no idea how xmp were used, I just turned on the option to create them because I read it was good to do 'just in case'. I was pretty sure having multiple out-of-sync xmp would make me crazy at some point if I did need them. So I learned a little of how they are used with my 'tests' and confirmed the renumbering from my backup left me with a historical xmp tied to image rather than the latest.

Would you suggest I do not create new xmp after I delete them and wait until if and when I need them? Fred mentioned that as well. I only use LR at this point and sometimes PSE. Thanks for any tips.
 

BackdoorArts

Senior Member
The only time I've ever intentionally created them was when I needed to send an actual RAW edit to someone else for use in something other than LR (even with LR I've usually just sent the NEF and created a preset that could be imported with the settings if I wanted someone to see what I did). When I was using only PSE early on they got created automatically, and were I ever to consider dropping LR I'd obviously do that. I do weekly backups of my catalog just in case, and I suppose if I wanted to be absolutely anal I could created XMP files and then delete them after each backup so I'm guaranteed not to lose anything should LR go down in the middle of working in it.

I just find them to be a hassle to keep track of and you invariably wind up with orphans somehow.
 

RocketCowboy

Senior Member
The only time I've ever intentionally created them was when I needed to send an actual RAW edit to someone else for use in something other than LR (even with LR I've usually just sent the NEF and created a preset that could be imported with the settings if I wanted someone to see what I did). When I was using only PSE early on they got created automatically, and were I ever to consider dropping LR I'd obviously do that. I do weekly backups of my catalog just in case, and I suppose if I wanted to be absolutely anal I could created XMP files and then delete them after each backup so I'm guaranteed not to lose anything should LR go down in the middle of working in it.

This is a good point ...

So if using LR as the catalogue for my images, LR can send to PS without using the external XMPs? I thought I had enabled the creation of XMP sidecars specifically to allow feeding edited raw images from LR into PS for further processing. If that's not needed ... then I've got a lot of cleanup I can do as well.
 

BackdoorArts

Senior Member
This is a good point ...

So if using LR as the catalogue for my images, LR can send to PS without using the external XMPs? I thought I had enabled the creation of XMP sidecars specifically to allow feeding edited raw images from LR into PS for further processing. If that's not needed ... then I've got a lot of cleanup I can do as well.

When you do an Edit In... from LR it will send the ACR data stored in the catalog to PS or any other application. XMP files are only necessary if you want to open it in PS directly without LR. You've got some clean-up to do.
 
Top