Change all symlinks - Please help a backpacker fix his travel site! :-)
|
frowbie
Joined: 2003-12-14
Posts: 6 |
Posted: Thu, 2009-10-08 04:45
|
|
Hi, Please help a backpacker fix his travel site!! I host a gallery of about 3500 photos from around the world on a Dreamhost website (ilivenow.com/travel) and they recently performed a server migration that broke all my symlinks to my photos. I would be fine with either correcting the links or getting rid of symlinks entirely and letting Gallery handle the file structure, but I'm really not sure how to do either. It sounds like all I would need to do is a search/replace of the "/.fujiama" portion to remove it, but I don't know how to do that either. This collection of photos represents over 10 years of travel to almost 50 countries. Please, please, please help me fix these links!!! Thanks for any help you can offer! Here's a note from Dreamhost's support. I didn't change any of the default paths so I don't know how the paths became incorrect. lrwxrwxrwx 1 ilivenow pg869820 114 2009-09-30 03:11 IMG_0199.JPG ->
Thanks! |
|

Posts: 16503
A few options I can see. First BACKUP BACKUP BACKUP, there you've been warned:
(thinking about this as I type)
You can try moving the real files over the place of the symlinks. I think, though I'm not sure, that the database doesn't contain any information about the symlink.
I'd try that first, probably, just test a photo first, so I'd try just moving/copying IMG_0199.JPG from the 'parliament' directory that is under gallery_content to the one that is under g2data.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 6
Hi Nivekiam,
I tried copying 1 image over and it didn't work. I appreciate the suggestion, though. If you or anyone else has any suggestions, I'd really appreciate it!
Matt
Posts: 22888
See the backup suggestion that nivekiam said. BACKUP!
In your db admin tool ( phpMyAdmin )
edit the values in the file column for each item (id) in the server_add_files table.
If that works for one item then you will have to do it manually for all links. Yes a Pain for 3500 items...
or learn or find somebody that can change values. Perhaps deramhost can help out? Worth a shot.
It might be simple or as complex as a regex to find the value of the old servername and remove it from the path without removing to much or not enough.
Good luck, I would help but I don't have the skill to do direct SQL queries and regexes.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 6
Hi floridave,
I appreciate the tip. Dreamhost unfortunately won't help. I asked and their standard response is they don't support websites. I tried Dreamhost's suggestion to modify the symlink manually as a test, but that didn't fix it. I confirmed the symlink is correct, it just doesn't appear in Gallery. But I'll take a look at your suggestion. Thanks!
Matt