+#!/bin/sh -xe
+
+from=ffzg
+to=bibliografija
+
+bin="sudo -u eprints /usr/share/eprints3/bin"
+
+dir=/tmp/eprints-clone
+test -d $dir || mkdir $dir
+
+test -e $dir/$from.archive.xml || $bin/export $from archive XMLFiles > $dir/$from.archive.xml
+test -e $dir/$from.subject.xml || $bin/export $from subject XML > $dir/$from.subject.xml
+test -e $dir/$from.user.xml || $bin/export $from user XML > $dir/$from.user.xml
+
+#$bin/epadmin erase_data $to
+#$bin/import --verbose $to user XML $dir/$from.user.xml
+#$bin/import_subjects --verbose --xml $to $dir/$from.subject.xml
+$bin/import --verbose $to eprint XML $dir/$from.archive.xml