Difference between revisions of "How to combine or migrate servers"

From EPrints Documentation
Jump to: navigation, search
(Redirected page to Moving a repository)
 
Line 1: Line 1:
 +
#REDIRECT [[Moving a repository]]
 +
 
[[Category:Howto]]
 
[[Category:Howto]]
 
[[Category:Management]]
 
[[Category:Management]]

Latest revision as of 14:44, 18 May 2012

From http://www.eprints.org/tech.php/thread-1666.html

Migration of archives from one server to another is relatively simple.

What you will need to copy.... (for archive "xxxx")

/opt/eprints2/archives/xxxx.xml (this is your basic config. for the archive, such as it's id, url and database)

/opt/eprints2/archives/xxxx/documents/ This is where all the actual pdf's etc are stored. Be careful, if you used any symlinks, to copy the files and not just the symlink.

/opt/eprints2/archives/xxxx/cfg/ This is the rest of the archive configuration.

plus the SQL database which can be exported from mysql by doing mysqldump xxxx -u xxxx -p > backup.sql (or whatever mysql user is appropriate if not xxxx) You will be prompted for the password.

If you can't remeber the name of your database or the user & pass look in /opt/eprints2/archives/xxxx.xml

The easiest way to create the new database on the new eprints install, and get the permissions right, is to:

  • Copy over all the static files described above.
  • Run configure_archive xxxx, keep pushing return to keep the current options but then choose 'yes' to create the database.
  • copy backup.sql to the new machine
  • run on the new machine:

mysql xxxx -u xxxx -p < backup.sql

You *can* also copy over the /opt/eprints2/archives/xxxx/html/ directory if you want to save having to rerun things like generate_static and generate_abstracts etc.

bin/generate_static xxxx
bin/generate_abstracts xxxx
bin/generate_views xxxx
bin/generate_apacheconf

Then TEST TEST TEST!