API:bin/epadmin

From Eprints Documentation

Jump to: navigation, search

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


API: Core API

Latest Source Code (3.3, 3.2) | Revision Log | Before editing this page please read Pod2Wiki


Contents

NAME

epadmin - EPrints repository admin tool


SYNOPSIS

epadmin options command [repository_id]

Where command is one of:

  • cleanup_cachemaps
  • config_core
  • config_db
  • create
  • create_db
  • create_tables
  • create_user
  • erase_data
  • erase_eprints
  • erase_fulltext_index
  • help
  • profile
  • rebuild_triples
  • recommit
  • reorder
  • redo_files_modified
  • redo_mime_type
  • redo_thumbnails
  • refresh_abstracts
  • refresh_views
  • reindex
  • reload
  • set_developer_mode
  • show_config
  • show_plugins
  • test
  • unit_tests
  • update
  • upgrade

Type epadmin help command for further help.


COMMANDS

create

  epadmin create

Create a new repository instance based on question-and-answer.


create_test

  epadmin create_test

Create a test repository instance called "test".


cleanup_cachemaps

  epadmin cleanup_cachemaps repository_id

Drop any orphaned cache tables.


config_core

  epadmin config_core repository_id

Set hostname, contact email and repository name.


config_db

  epadmin config_db repository_id

Set database connection properties and, optionally, to create database and database user.


create_db

  epadmin create_db repository_id

Create a database and database user with the current settings.


create_user

  epadmin create_user repository_id

Create a new user. You need to do this to create your first admin account.


delete

  epadmin delete repository_id

Destroy repository_id and all of its content. Only use if you are absolutely sure you know what you're doing.


help

  epadmin help [command]

Show help for epadmin. Specify a command to get detailed help on a particular command


redo_files_modified

  epadmin redo_files_modified repository_id [ dataset objectid, ... ]

Call EPrints::DataObj::Document/files_modified for every document.


redo_mime_type

  epadmin redo_mime_type repository_id dataset [ objectid, ... ]

Redo file format identification. Dataset may be eprint, document or file.


redo_thumbnails

  epadmin redo_thumbnails repository_id [ eprintid, ... ]

Regenerate all the thumbnail and image-preview files and any other things which are triggered if the document file changed. Optionally supply a list of eprint ids to re-generate thumbnails for.


refresh_views

  epadmin refresh_views repository_id

Tell the webserver that all views pages must be regenerated. The webserver will update them next time they are requested. Also causes config to be reloaded.


refresh_abstracts

  epadmin refresh_abstracts repository_id

Tell the webserver that all abstract summary pages must be regenerated. The webserver will update them next , but won't update them again unless something on the EPrint changes or you re-run refresh abstracts. Also causes config to be reloaded.


reload

  epadmin reload repository_id

Cause the web server to reload the repository configuration.


create_tables

  epadmin create_tables repository_id

Create the database tables.


erase_data

  epadmin erase_data repository_id

Erases and recreates the database. Removes all documents and files. Does not touch the configuration files.


erase_eprints

  epadmin erase_eprints repository_id

Erases all the documents and eprints (including their files). Recreates the eprint and document tables. Leaves configuration files and the users and subjects tables alone.


erase_fulltext_index

  epadmin erase_fulltext_index repository_id

This erases all the .words and .indexcodes cache files from your repository, forcing the indexer to rerun the tools used to extract full text from your documents.

This is useful if you only setup the fulltext indexing after your repository is already live, or if you discover there has been a problem.


show_config

  epadmin show_config repository_id key1 [key2 ...]

Dump the given configuration section identified by key1. Use extra keys to get a lower-level configuration setting.


show_plugins

  epadmin show_plugins repository_id [filters]

Dump a list of all enabled plugins. You can constrain this list by providing filters e.g.:

  type=Import


test

  epadmin test repository_id

A null operation which just checks your configuration files are OK and that you can connect to the database. If no repository_id is specified loads each repository in turn. Use --verbose to generate more information.


profile

  epadmin profile test

Run a performance profile of test using Devel::NYTProf.


unit_tests

  epadmin unit_tests

Run unit tests, printing the results to STDOUT. If everything passed will exit with a return code of 0.


rehash

  epadmin rehash repository_id [document_id]

Recalculate the hashes of the files in this document and write it to a probity log file. If a document id is given then just generate the hash for that document.


update

  epadmin update repository_id

This will add tables and columns to your SQL database to bring it in-line with your current configuration. It will not remove data. Use with caution on a live database. Database backup is recommended before use on live systems.


recommit

  epadmin recommit repository_id dataset_id [eprint_id eprint_id ...]

Recommit all the records in the given dataset. What this does is cause the automatic values to be re-calculated. If a list of eprint_ids is given then just recommit those.


reorder

  epadmin reorder repository_id dataset_id [eprint_id eprint_id ...]

Regenerate the order values for the dataset. If a list of eprint_ids is given then just recalculate ordervalues for those.


rebuild_triples

  epadmin rebuild_triples repository_id [dataset_id item_id item_id ...]]

Queue all the records to have their RDF triple cache rebuilt. This may tie-up the indexer for some time on a large repository. Do this if you have made changes to the way RDF triples are produced from an EPrint.


reindex

  epadmin reindex repository_id dataset_id [eprint_id eprint_id ...]

Schedule the dataset for reindexing. The indexer will do the actual indexing and it may take some time. This only schedules the reindexing. If a list of eprint_ids is given then just reindex those.


remove_field

  epadmin remove_field repository_id dataset field_id

Remove the database entries for the given field, can not be undone!


set_developer_mode

  epadmin set_developer_mode repository_id <on|off>

While set to on developer mode causes the web server to reload the repository configuration on every page request. This makes development much quicker but must not be left switched on in a production environment since it increases server load dramatically.


upgrade

  epadmin upgrade repository_id

After upgrading EPrints, use this to update the database tables. It will advise any other tasks that are required.


OPTIONS

  • --help
Print a brief help message and exit.
  • --man
Print the full manual page and then exit.
  • --quiet
This option does not do anything.
  • --verbose
Explain in detail what is going on. May be repeated for greater effect.
  • --force
Be more forceful (don't ask for confirmation).
  • --version
Output version information and exit.


COPYRIGHT

Copyright 2000-2011 University of Southampton.

This file is part of EPrints http://www.eprints.org/.

EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

EPrints is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with EPrints. If not, see http://www.gnu.org/licenses/.


Personal tools