pic.JPG vs. pic.jpg > how to re-attach originals to missing item on gallery??? pic.JPG vs. pic.jpg > how to re-attach originals to missing item on gallery???
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

pic.JPG vs. pic.jpg > how to re-attach originals to missing item on gallery???

Started by stoeby, February 03, 2011, 01:20:28 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

stoeby

Hello, I couldn't find a case like this in the forum. (Only how to delete missing items on Server after deleted files.)
I need a solution in other way. How to re-attach original files from a backup to the missing items on Server?
at the moment the gallery's site is: http://www.turnabteilung-medienarchiv.de/cpg148

Where should I start... I have had a problem which was solved here http://forum.coppermine-gallery.net/index.php/topic,70170.msg343566.html#msg343566, but created a new one. A short outline: Server cpg148 hacked, made backup of Serverfiles with FileZilla, sanatized files locally, deleted all files on Server (which was slightly wrong), Uploaded sanatized Files, Upgrade to cpg15x! As my wish, Structure of Albums and Pictures available. MANY THX TO THIS FORUM & ITS POSTERS!!!

!!!!BUT now a few Pictures are missing and only shown with a Dustbin-Thumbnail. (see Foto14~0-gallery-Thumbnails.JPG)!!!!!
These are Pictures which have the same name as other files on the Server because it can handle e.g. Picture.jpg and Picture.JPG (see Attachment FileZilla-Foto14JPGvsFoto14jpg.JPG). While doing the mentioned backup with over 2000 files, filezilla was asking to overwrite existing files. I did not know why there are morethan one of the same file, so I chose to Overwrite, if the file is a newer one and checked the Botton to repeat it for the whole batch (see FileZilla-OverwriteExistingFile.JPG).
Finaly I lost about 70 picture in the backup. This would not be so bad if I wouldn't have deletet all the existing files from Server, as mentioned above.
Now I got from the previous "Admin" a Photo-CD with the original Photos, unfortunately with original filenames.
As you can see, the file 14.JPG on the CD is the same as 14~0.JPG on Server(compare Foto14-CD.JPG and Foto14~0-gallery-EditPic.JPG).

  • I uploaded this file 14.JPG from CD to \userpics\10001 on the server and changed the missing item's filename with edit_one_pic.php from 14~0.JPG to 14.JPG. >> No Success ("ERROR, File 14.JPG already exists")
  • Just to rename the file on the Serverdirectory \10001\ into 14~0.JPG, was unsuccessful too.
  • Next try, was equal: delete the file 14~0.JPG from Server. Change with edit_one_pic.php the missing item's filename from 14~0.JPG to 14.JPG and uploaded file 14.JPG from CD to Server. >>> "ERROR, File 14~0.JPG is missing."
  • Anyway, edit_one_pic.php couldn't change the name of the missing item.
    • And uploading a file with the same name was not working, too.
    How will I get the pictures back to their place, where they are missing. I will do it for every single of the 70 missing pictures, but it must be possible. Again, I am very sorry for "overreading a single line" in the very good cpg documentations, what has brought me into this situation.

    Any idea is welcome.
    Thx in advance.

phill104

Please start by opening up your gallery, it is hard to check things when we can only view the thumbs.

Are the fullsize images still in tact and where they were? If they are then you can simply run admin tools to re-generate the thumbs and intermediate pics (As you can appreciate, I could have found this out if your gallery was open).

As the database is in tact then even if the images are missing then it might still be possible with a bit of effort to recover even if th fullsize images are not still there.
It is a mistake to think you can solve any major problems just with potatoes.

Αndré

Quote from: stoeby on February 03, 2011, 01:20:28 AM
I did not know why there are morethan one of the same file
I'm currently not sure if it's OS depended or file system depended, but on Linux with one of the recommended file systems file names are case sensitive. That means that 'File1' and 'file1' are different files!


To recover the overwritten/missing pictures I'd do the following (regardless of your description). Just have a look which files are missing. Then upload that files with the same file names (including the same case). Now you should be able to see the full-sized version of that pictures. If that works, run the admin tools to create the intermediate-sized pictures (if needed) and the thumbnails. Don't try to rename that files with edit_one_pic.php.

stoeby

Quote from: Αndré on February 03, 2011, 09:59:32 AM
I'm currently not sure if it's OS depended or file system depended, but on Linux with one of the recommended file systems file names are case sensitive. That means that 'File1' and 'file1' are different files!
I am with you: the overwrite problem seems to be from WinXP. It can not differ between .jpg and .JPG. Users of FileZilla should be warned for this problem, when creating backups. Maybe it exists, but I did't read it  ::)

Quote from: Αndré on February 03, 2011, 09:59:32 AM
To recover the overwritten/missing pictures I'd do the following (regardless of your description). Just have a look which files are missing. Then upload that files with the same file names (including the same case). Now you should be able to see the full-sized version of that pictures. If that works, run the admin tools to create the intermediate-sized pictures (if needed) and the thumbnails. Don't try to rename that files with edit_one_pic.php.
Yes, it works: renamed original file 14.JPG from CD to 14~0.JPG and uploaded it beside 14~0.jpg. Now the Fullsizepicture of 14~0.JPG was visible, but not the thumb. Therefore I ran the Admintool "Update thumbs" of that Album > Thumb available.  :) Thx, André
I have to do this for the around 70pics. The Admintool "update thumbs" gave me an errorreport like this.
Extract of run1: "...
ERROR creating: albums/userpics/10001/thumb_16~0.JPG
albums/userpics/10001/thumb_15~0.jpg updated successfully
albums/userpics/10001/thumb_14~0.JPG updated successfully
ERROR creating: albums/userpics/10001/thumb_13~0.JPG
..."
Extract of run 2: "...ERROR creating: albums/userpics/10001/thumb_16~0.JPG
albums/userpics/10001/thumb_15~0.jpg updated successfully
albums/userpics/10001/thumb_14~0.JPG updated successfully
albums/userpics/10001/thumb_13~0.JPG updated successfully
ERROR creating: albums/userpics/10001/thumb_12~0.JPG
..."
As you can see the update was good for 14~0.JPG and 13~0.JPG, which I uploaded step by step for testing your suggestions.
If I ran the tool for all Albums, would it show me a list of all missing pictures??? It would be easier for me to identify those, than seeking for them through every album. Or do you see another way to repair quicker all missing pictures? I am afraid of destruction in anyway.

Thanks in advance

stoeby

Quote from: Phill Luckhurst on February 03, 2011, 03:41:49 AM
Please start by opening up your gallery, it is hard to check things when we can only view the thumbs.
Thx Phill, I opended the gallery for guests to view thumbs AND medium AND fullsize.

Quote from: Phill Luckhurst on February 03, 2011, 03:41:49 AM
As the database is in tact then even if the images are missing then it might still be possible with a bit of effort to recover even if th fullsize images are not still there.

What other kind of effort is possible, than "renaming and uploading every single picture and the running Admintool update thumbs"??? I am not lazy, but everytime interested in efficient way to solve pfoblems.

Thanks

Joe Carver

Look for the button "Toggle Directory Comparison" in Filezilla - try that first.
70 missing files should not take too long to find.

Αndré

Quote from: stoeby on February 08, 2011, 11:55:35 PM
Users of FileZilla should be warned for this problem, when creating backups. Maybe it exists, but I did't read it  ::)
Quote from: stoeby on February 03, 2011, 01:20:28 AM
filezilla was asking to overwrite existing files.
;)


Quote from: stoeby on February 08, 2011, 11:55:35 PM
If I ran the tool for all Albums, would it show me a list of all missing pictures??? It would be easier for me to identify those, than seeking for them through every album. Or do you see another way to repair quicker all missing pictures?
I don't know if it will create such a list for you. But I've created a plugin which checks for missing files in your gallery (actually it's a quite big plugin which adds various functionality and optical modifications to my gallery). If you're interested I'll try to extract the corresponding code part and create a standalone plugin.

phill104

My top tip here is to get yourself a copy of Ubuntu or similar installed on your windows box. You can run Ubuntu as a Windows application, uninstall it etc from the control panel.

Using a Linux install is by far the best way to do all your web administration even if it is just for the simple fact that is respects the upper/lower case file system. Your webhost is almost certainly Linux based so going this way makes so much sense. It would have saved you all the hassle you are having now.
It is a mistake to think you can solve any major problems just with potatoes.