EPrints Technical Mailing List Archive
Message: #07555
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Reset an archive before going live
- To: <eprints-tech@ecs.soton.ac.uk>
- Subject: Re: [EP-tech] Reset an archive before going live
- From: Yuri <yurj@alfa.it>
- Date: Mon, 5 Nov 2018 09:10:49 +0100
Il 01/11/18 19:12, John Salter via Eprints-tech ha scritto:
Hi Yuri, Have you configured any metadata field via the web interface? [SELECT COUNT(*) FROM mf;].
Hi John! MariaDB [myserver]> SELECT COUNT(*) FROM mf; +----------+ | COUNT(*) | +----------+ | 0 | +----------+ 1 row in set (0.00 sec) I've customized only phrases and templates and added some fields.
If you haven't, then I think these steps: Bin/export subjects bin/epadmin erase_data bin/epadmin create_db import subjects
Uhm erase_data epadmin erase_data repository_idErases and recreates the database. Removes all documents and files. Does not touch the configuration files.
It already recreate the database, why should I run "epadmin create_db"?
You could either: - create a copy of the epadmin script, and add the 'user' dataset to the erase_eprints datasets or - manually remove all user* tables from the database, and then run: UPDATE counters SET counter=0 WHERE countername = userid;
I think this is the safer way.
Then run: bin/epadmin update ARCHIVEID which I *think* should create all the tables necessary.
Why create the tables? They're already there and clear_table just do a delete:
sub clear_table { my( $self, $tablename ) = @_; my $sql = "DELETE FROM ".$self->quote_identifier($tablename); $self->do( $sql ); }The tablename came from a match of the table name with the datasetid on reset_dataset:
foreach my $table ( @tables ) { next unless( $table =~ m/^$datasetid/ ); print "Erasing table $table\n" if( $noise >= 2 ); $db->clear_table($table); }
- Follow-Ups:
- Re: [EP-tech] Reset an archive before going live
- From: Yuri <yurj@alfa.it>
- Re: [EP-tech] Reset an archive before going live
- References:
- [EP-tech] Reset an archive before going live
- From: Yuri <yurj@alfa.it>
- Re: [EP-tech] Reset an archive before going live
- From: Yuri <yurj@alfa.it>
- Re: [EP-tech] Reset an archive before going live
- From: John Salter <J.Salter@leeds.ac.uk>
- Re: [EP-tech] Reset an archive before going live
- From: Yuri <yurj@alfa.it>
- [EP-tech] Reset an archive before going live
- Prev by Date: [EP-tech] OEmbed & EPrints
- Next by Date: Re: [EP-tech] Reset an archive before going live
- Previous by thread: [EP-tech] Sort view with creators_name and corp_creators
- Index(es):