Dobrica Pavlinušić's random unstructured stuff
eprints: Revision 12
{toc: }

^ Documents with departments and security settings

.pre
select
archive.eprintid,department,security
from archive,document
where document.eprintid = archive.eprintid and department like '%informacijske%';
.pre

^ Update access to `staffonly`

.pre
begin;
update document set security='staffonly' where eprintid in ( select eprintid from archive where department like '%informacijske%' );
commit;
.pre

^ Repository

^^ backup

.pre
# prefix all commands with: sudo -u eprints /usr/share/eprints3/bin/
export ffzg archive XMLFiles > /tmp/ffzg.xmlfile
export ffzg subject XML > /tmp/submject.xml
export ffzg user XML > /tmp/user.xml
.pre

^^ restore

http://wiki.eprints.org/w/API:bin/import

.pre
epadmin erase_data ffzg

import_subjects --verbose --force --xml ffzg /tmp/submject.xml
import --verbose --migration ffzg user XML /tmp/user.xml
import --verbose --migration ffzg eprint XML /tmp/ffzg.xmlfile

generate_static ffzg
generate_views ffzg
.pre

^^ importing from other data source

When generating xml file for import documented at http://wiki.eprints.org/w/XML_Export_Format from some other dataset using `--update` is useful to re-run import

.pre
sudo -u eprints /usr/share/eprints3/bin/import --verbose --migration --enable-file-imports --update grf eprint XML xml
.pre

^ HASH in export filters with multilang fields

* bug report: http://www.eprints.org/tech.php/16066.html
* eprints meta patch: {file: eprints-plugin-export-simple-multilang.diff}

Even better solution which should work across updates is described at: http://www.eprints.org/tech.php/16125.html and our local changes are in {file: eprints-SimpleMultilang.zip}