Discussion:
[EP-tech] Restored backup problem
Alex Birchall
2008-11-26 17:12:19 UTC
Permalink
http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/
Hi,

I have a backup EPrints server on which I have restored the latest
backup of the live server.

The problem is that the Home page has lost all of its formatting and the
links from the home page lead to the live version of the repository.

I am sure I have tried the most likely looking epadmin options in an
attempt to resolve this problem, but so far to no avail. Is there, if
fact, a (fairly) quick fix?

epadmin test repository_id reports everything as OK.

Regards,


Alex Birchall
Library Systems Manager
Middlesex University
The Sheppard Library
The Burroughs
London NW4 4BT
UK

Tel: +44 (0) 20 8411 5235
Mobile: 07765 237 570
Ben Wheeler
2008-11-26 21:00:34 UTC
Permalink
http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/
Post by Alex Birchall
I have a backup EPrints server on which I have restored the latest
backup of the live server.
The problem is that the Home page has lost all of its formatting and the
links from the home page lead to the live version of the repository.
I am sure I have tried the most likely looking epadmin options in an
attempt to resolve this problem, but so far to no avail. Is there, if
fact, a (fairly) quick fix?
EPrints has an unfortunate tendancy to use absolute URLs, including in
the database itself. Moving EPrints from one server to another requires
a global search and replace on the server name in the database dump before
loading it onto your backup server. Then ensure that the correct server name
is present in the EPrints configuration, and re-run generate_apacheconf,
generate_static, generate_views and generate_abstracts, make a burnt offering,
restart Apache, and hope for the best.

Can you tell I've had to do this too many times? ;)

The loss of formatting is probably CSS related, so ensure that your
backup server has the same CSS files as your main server too.

Ben
Matthew Brady
2008-11-26 21:58:00 UTC
Permalink
http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/
I have had this problem as well, after migrating prod back to refresh
test and dev environments.

I have only had to change the host detail
$c->{host} = 'eprints.usq.edu.au';
In the file
/opt/eprints3/archives/repoid/cfg/cfg.d/10_core.pl

And in the file
/opt/eprints3/archives/repoid/var/auto-apache.conf there are 4 lines
with server names.

That's been it, and it seems to work for me, after a generate static ;)

I haven't had to do any global find/replace.

Hope this helps you out.

Matt

-----Original Message-----
From: eprints-tech-***@ecs.soton.ac.uk
[mailto:eprints-tech-***@ecs.soton.ac.uk] On Behalf Of Ben Wheeler
Sent: Thursday, 27 November 2008 7:01 AM
To: eprints-***@ecs.soton.ac.uk
Subject: [EP-tech] Re: Restored backup problem

http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/
Post by Alex Birchall
I have a backup EPrints server on which I have restored the latest
backup of the live server.
The problem is that the Home page has lost all of its formatting and the
links from the home page lead to the live version of the repository.
I am sure I have tried the most likely looking epadmin options in an
attempt to resolve this problem, but so far to no avail. Is there, if
fact, a (fairly) quick fix?
EPrints has an unfortunate tendancy to use absolute URLs, including in
the database itself. Moving EPrints from one server to another requires
a global search and replace on the server name in the database dump
before
loading it onto your backup server. Then ensure that the correct server
name
is present in the EPrints configuration, and re-run generate_apacheconf,

generate_static, generate_views and generate_abstracts, make a burnt
offering,
restart Apache, and hope for the best.

Can you tell I've had to do this too many times? ;)

The loss of formatting is probably CSS related, so ensure that your
backup server has the same CSS files as your main server too.

Ben


This email (including any attached files) is confidential and is for the
intended recipient(s) only. If you received this email by mistake,
please, as a courtesy, tell the sender, then delete this email.

The views and opinions are the originator's and do not necessarily
reflect those of the University of Southern Queensland. Although all
reasonable precautions were taken to ensure that this email contained no
viruses at the time it was sent we accept no liability for any losses
arising from its receipt.

The University of Southern Queensland is a registered provider of
education with the Australian Government (CRICOS Institution Code No's.
QLD 00244B / NSW 02225M)
Yuri
2008-11-27 09:28:10 UTC
Permalink
http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/
Post by Alex Birchall
http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/
I have had this problem as well, after migrating prod back to refresh
test and dev environments.
I have only had to change the host detail
$c->{host} = 'eprints.usq.edu.au';
In the file
/opt/eprints3/archives/repoid/cfg/cfg.d/10_core.pl
And in the file
/opt/eprints3/archives/repoid/var/auto-apache.conf there are 4 lines
with server names.
That's been it, and it seems to work for me, after a generate static ;)
also the versions saved in xml.

generally doing a grep -r <oldname> is a good thing :)
Ben Wheeler
2008-11-27 11:18:04 UTC
Permalink
http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/
Post by Matthew Brady
I have only had to change the host detail
$c->{host} = 'eprints.usq.edu.au';
In the file
/opt/eprints3/archives/repoid/cfg/cfg.d/10_core.pl
And in the file
/opt/eprints3/archives/repoid/var/auto-apache.conf there are 4 lines
with server names.
Of course you shouldn't be editing that file by hand, cos it's auto generated!
bin/generate_apacheconf after changing 10_core.pl should do the trick.
Post by Matthew Brady
I haven't had to do any global find/replace.
One place that the full URL shows up in the database is eprint.fileinfo.
If you don't change it you may find that thumbnails and/or links to
documents are going to the wrong server. That's been my experience anyway.

Ben

Loading...