How to combine or migrate servers

From EPrints Documentation
Revision as of 15:07, 2 March 2006 by WikiSysop (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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!