15
15
along with this program; if not, write to the Free Software
16
16
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
33
35
The data is stored in an SQL dump file, in ``examples/db/sample.sql``.
35
You must import this data into a **fresh** IVLE database. You can
36
re-initialise your database by running ``sudo -u postgres dropdb ivle``, and
37
then following the database setup instructions, in the section
38
:ref:`database-setup`.
40
The data may be imported by running the following command::
42
sudo -u postgres psql ivle < examples/db/sample.sql
45
.. warning:: Instructions on fixing up the user's repositories and file
37
You must import this data into a **fresh** IVLE database. If you already have
38
a working IVLE install, it will have to be erased. A script is provided
39
which performs the following tasks:
41
* Unmounts all users with accounts in the current database,
42
* Drops the IVLE database if it already exists (prompting first),
43
* Creates and initialises a new IVLE database, as per :ref:`database-setup`,
44
* Populates the database with the sample data,
45
* Creates data directories and subversion repositories for all users, backing
46
up directories for any existing users.
48
The script is executed with the following command::
50
sudo ivle-loadsampledata examples/db/sample.sql
52
.. warning:: This script essentially destroys all contents in an existing IVLE
53
installation. Be sure you wish to do this.
55
.. note:: The script may fail at the "dropping database" phase if Apache or
56
another process are using the database. It is best to stop Apache before
59
If the database exists, but is not properly initialised, then the script
60
may fail. In this case, you should manually run ``ivle-mountallusers -u``,
61
then drop the database, to ensure a clean build.