Moving ResourceSpace to a new server...

360 views
Skip to first unread message

Douglas Thompson

unread,
Jun 28, 2021, 10:02:27 AM6/28/21
to ResourceSpace
So, I have 50,000+ images in my existing ResourceSpace install and I've got a new server set up with the latest version of ResourceSpace installed and running on it.

Since the new version is new enough that there are some Image Size and filestore structure capabilities that weren't present in my old version, I'm assuming that one (or more) scripts in pages/tools needs to be run after I copy over the old database and filestore to rebuild the sizes and whatnot.

In going through the list of pages/tools scripts, I'm seeing two potential scripts: "update_previews.php" and "reindex.php".

There's not a whole lot of documentation about these scripts, though, so I'm not sure if both are actually needed or not to achieve what I'm trying to achieve: only the image sizes that I've defined in the new system and adjusting the database and filestore structure so that the files are more evenly spread.

And maybe I just need to forego the image size and/or filestore changes entirely and just live with things as-is...and that's fine. I just figured now would be the best time for me to make significant changes, if possible, since we're basically starting out "clean"...

Our IS guy already has plans for how he's going to copy things over...I just need to know if there's anything additional that needs to be done on my end during/after the copy...

Thanks in advance for any information/advice,

Doug Thompson
Manager of Web and Electronic Communications
Ohio Wesleyan University

Douglas Thompson

unread,
Jul 7, 2021, 9:18:23 AM7/7/21
to ResourceSpace
Any updates on this one? It's now July and the "powers that be" on my end are getting anxious for me to get this upgrade done, but without knowing if either/both of the potential pages/tools scripts I identified will do what I want, I don't know how/if to proceed...

Mike Perry

unread,
Jul 7, 2021, 10:00:54 AM7/7/21
to ResourceSpace
From reindex.php:

"# Reindexes the resource metadata. This should be unnecessary unless the resource_keyword table has been corrupted."

This tells me the script applies to the keyword table. The word 'preview' is not in the script, so I presume it does nothing for or to previews.

I suspect update_previews.php is the one you want to try. I believe you could try it on a  single resource to see if it does what you want.

from update.previews.php:

'# If you want to recreate preview for a single resource, you can pass ref=[ref]&only=true'

I'm not a PHP script savant, so take this for what it's worth.

Douglas - considering the number of resources involved it might be appropriate to schedule a consultation with RS. Just a thought. . .

Mike

Ronnie Zeiller

unread,
Jul 8, 2021, 2:04:39 AM7/8/21
to ResourceSpace
Hi,

from my point of view it doesn't make sense to start with a "clean" installation of newest release. It is not an Operating System with a registry and things like that.
And you would have to import an old database structure into your new release anyway...
I had to move one of my archives with +100k images to a new server a few times.
Firstly I tried to get a working copy on the new server and secondly I did the update.

Therefore I would recommend:

1. rsync all data to the new server
2. edit config.php with appropriate paths for exiftools, imagemagick, etc., if the OS has changed
3. dump and import the database on the new server (if it is large you will need to ftp the database and import via mysql CLI)

When things are running:
Change to SVN versions (how is mentioned in the Knowledgebase)
Update

Then you could do other download/preview sizes, run tools scripts and other things.
If you really want then you could change to the new indexing system in filestore. (But I must confess, I do not understand why this should be necessary....)

All the best,
Ronnie


Dan Huby

unread,
Jul 8, 2021, 6:11:05 AM7/8/21
to ResourceSpace
Ronnie is right and that's in line with https://www.resourcespace.com/knowledge-base/systemadmin/upgrading

You don't need to do anything with the database or manually run any scripts e.g. to resize images.

Dan Huby

unread,
Jul 8, 2021, 6:12:45 AM7/8/21
to ResourceSpace

Douglas Thompson

unread,
Jul 8, 2021, 8:55:30 AM7/8/21
to ResourceSpace
Sounds like that'd be far easier to deal with...copying everything as-is, adjusting the config as needed (for paths and whatnot), converting the install (which was a download install) to an SVN install, upgrading RS, then tweaking the config further as needed for the new functionality.

I'll run that "plan b" by the IS guy here, but I suspect he'll be okay with it as well.

Thanks, everyone! :)

Mike Perry

unread,
Jul 8, 2021, 9:25:14 AM7/8/21
to ResourceSpace
Douglas --

When you've gotten this done (and I'm sure you'll succeed!) drop a quick bullet point note here about the procedure you successfully used. It would be of great benefit to others who follow.

Good Luck!!

Mike

Douglas Thompson

unread,
Jul 8, 2021, 9:53:03 AM7/8/21
to resour...@googlegroups.com
Oh definitely. Who knows when I'll actually be doing this, since it involves coordinating multiple people's schedules on my end, but there you go :)

--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.com
---
You received this message because you are subscribed to a topic in the Google Groups "ResourceSpace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/resourcespace/GgiAaMW0Cc8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to resourcespac...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/resourcespace/621afcfc-5537-4f92-9b9e-58b4209c53a9n%40googlegroups.com.


--

Douglas E. Thompson
Manager of Web and Electronic Communications
Office of University Communications
Ohio Wesleyan University

61 S. Sandusky St.
Delaware, OH 43015
Email: deth...@owu.edu
Office Phone: 740-368-3356
Website: owu.edu
Oh-Wooo!
OWU on FacebookOWU on YouTubeOWU on TwitterOWU on InstagramOWU on LinkedIn

Mike Perry

unread,
Jul 8, 2021, 10:23:01 AM7/8/21
to ResourceSpace
👍

Douglas Thompson

unread,
Jul 28, 2021, 11:27:31 AM7/28/21
to ResourceSpace
Well, that didn't work...here's what we tried:
  1. rsync all old data to the new server (including filestore and ResourceSpace's files)
  2. edit config.php with appropriate paths for exiftools, imagemagick, scramble keys, etc.
  3. dump and import the old database on the new server
Once the old version is running on the new server:
  1. change to SVN version using info on https://www.resourcespace.com/knowledge-base/systemadmin/upgrading
  2. update ResourceSpace to the latest version using info on https://www.resourcespace.com/knowledge-base/systemadmin/upgrading
  3. adjust the preview image sizes within ResourceSpace's back-end settings and/or the database (if you need to add a new image size label)
  4. run the update.previews.php script.
#1 and #2 worked, and #3 worked partway but it failed out with an error during the "import the old database on the new server" part. I was able to export the database from the old server and ZIP-compress it and start to import it into phpMyAdmin on the new server, but partway through that process, it threw up an "unrecognized statement type" error and refused to finish the import process.

So then our IT guy located the database file on the old server and copied that to the new server instead of dealing with the phpMyAdmin export/import process, and that worked, but then the login screen wouldn't fully render:

image.png

So, since that login screen partially rendered, we thought maybe it was some sort of PHP/mySQL version problem (since the old server is running PHP 6 and whatever mySQL version was up-to-date at that time, but the new server is running PHP 7 and whatever mySQL version is up-to-date with that), the IS guy attempted the SVN conversion and the upgrade steps listed as #1 and #2 in the second list, and those both appeared to work fine, but then when attempting to access the login screen, I got this:

image (1).png
So that didn't work.

So I'm thinking we're back to what I started to attempt with this: installing ResourceSpace v9.6 clean on the new server and getting it working as-is and then attempting to copy over the filestore, but won't I still run into the same database export/import problems, or should our IT guy do the database file copy thing and we'll see what happens?

If anyone has any suggestions for how to deal this without us having to re-upload all of the 50,000+ images and re-keyword them and whatnot, I'm all ears...

Help!

Ronnie Zeiller

unread,
Jul 28, 2021, 2:16:52 PM7/28/21
to ResourceSpace
Hi,

it is quite normal with phpmyadmin with huge files to get this error while importing.

But I do not know if it is a good idea to copy the database files to the new server. Especially if mysql version changed....

Why not uploading tables by ftp then SSH to the new server, call mysql via CLI and do it like:

mysql -u username -p database_name < file.sql

Secondly, put 
$show_detailed_errors = true;
into the config.php to get more info which error occurred.


Douglas Thompson

unread,
Jul 29, 2021, 9:16:36 AM7/29/21
to ResourceSpace
I'll run this by our IT guy...can't hurt at this point, right? :)

Thanks!

Douglas Thompson

unread,
Jul 30, 2021, 9:49:20 AM7/30/21
to ResourceSpace
I got to thinking (and our IT guy agreed)...bumping up RS' errors wouldn't probably wouldn't make much of a difference in this instance, since no onscreen error is appearing in the first place...the page just isn't rendering all the way.

So the guy did some searching through various PHP log files and found this:

The problem is already logged by php-fpm - "php-fpm error: call to undefined function get_header_image(), /var/www/html/rsspace/login.php on line 193" - there's a PHP library someplace that RS can't open or read or doesn't know where it's located or something. The question for the list is - "where is the php function get_header_image() defined?" That would get us started because then we can figure out why RS can't find that function (e.g. permissions issue on a file someplace)

This all exceeds my knowledge, but hopefully there's a kernel of information in the above that'll give someone some ideas?

Thanks in advance for any help with this,

Mike Perry

unread,
Jul 30, 2021, 10:58:02 AM7/30/21
to ResourceSpace
The get_header_image function is defined in include/functions.php on line 1151. . .

Douglas Thompson

unread,
Jul 30, 2021, 11:31:54 AM7/30/21
to ResourceSpace
Thanks! I'll pass the info on to our IT guy. Fingers crossed it can lead to us resolving the issue :)

Douglas Thompson

unread,
Aug 4, 2021, 9:16:49 AM8/4/21
to ResourceSpace
Our IT guy was able to use the info you provided, Mike, to resolve the issue completely. It works! I now have a fully functioning (and SVN-ified/fully updated) RS installed on a new server and it has the filestore and users and keywords and whatnot that were on the old RS installation, so it's working as-is :) Thanks, everyone!

Question...from settings that were established long ago on the old RS we had, it's generating two image size variations (beyond "original size", of course): "scr" (1440x1440) and "lpr" (2000x2000). That last one isn't needed at all and I'd like to rename "scr" to "web" for the 1440x1440 one. Can that be done? I can edit the "scr" and "lpr" sizes, but the IDs for them are read-only...are those IDs defined somewhere (in the config file, in the database, etc.) where I can change them?

Presumably after I do this, I'll need to run a pages/tools script to regenerate the files. Are either the reindex.php or the update.previews.php scripts appropriate for this?

Let me know.

Thanks again,

Doug Thompson
Manager of Web and Electronic Communications
Ohio Wesleyan University

Mark Leo-Russell

unread,
Aug 4, 2021, 11:41:01 AM8/4/21
to ResourceSpace
Doug--

We recently migrated Resource Space to a new server, moving from a LAMP stack to WIMP, and simultaneously upgrading from RS 8.6 to 9.5 and then 9.6. Lots of growing pains to be sure. In answer to your question, the update-previews.php script should take care of regenerating your previews. Beforehand make sure the permissions on the Resource Space /filestore directory are set correctly. That gave me lots of problems until I got things set right.

Mark L-R

Douglas Thompson

unread,
Aug 4, 2021, 11:49:54 AM8/4/21
to ResourceSpace
Thanks! The script is running (properly) and time will tell...it's only at 1300 or so, but there are over 50000 resources, so this would be a "leave the script running through lunch and cross your fingers that it's done (or near-done) when you get back" type of situation :P

Mike Perry

unread,
Aug 4, 2021, 12:12:14 PM8/4/21
to ResourceSpace
Doug -- glad I could help. Dreamweaver's Search function  still comes in handy sometimes!

I'm just 120 miles south of you on 42 -- in the Cincinnati area. . .


On Wednesday, August 4, 2021 at 11:41:01 AM UTC-4 mark...@nmt.edu wrote:

Douglas Thompson

unread,
Aug 4, 2021, 12:59:18 PM8/4/21
to ResourceSpace
Okay...I'm starting to think that maybe the update_previews.php script is not what I need...and maybe I don't need any script...

Up to this point, I've been under the impression that, during the upload process, ResourceSpace generates files at each of the Image Sizes sizes, to make download when the time comes faster.

So, since I'm eliminating an entire size out of the three sizes that our old ResourceSpace install had defined, I figured that should free up around 1/3 of the disk space usage (I realize that it'd probably be nowhere near an actual 1/3 of the disk space usage, but you hopefully get the gist).

Anyway, is there some sort of "clean the filestore" script that I should be using, or are the image sizes generated at download and thus there are no extra files laying around unused in the filestore now...

Reply all
Reply to author
Forward
0 new messages